Skip to content

Commit f349d68

Browse files
authored
Merge pull request #42 from ilo-token/master
v0.3.0
2 parents 2184ec9 + 5d9205b commit f349d68

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+7458
-3443
lines changed

.github/workflows/deno.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Upload artifact
3636
uses: actions/upload-pages-artifact@v3
3737
with:
38-
path: "."
38+
path: "/dist/"
3939
- name: Deploy to GitHub Pages
4040
id: deployment
4141
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
main.js
1+
.vscode/
2+
dictionary/dictionary.ts
3+
dist/main.js
4+
telo-misikeke/rules.js
5+
telo-misikeke/Parser.js

.vscode/settings.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,42 @@
11
# Changelog
22

3-
You may need to force restart the page in order to use the latest version: shift + click the restart button; or ctrl + shift + R.
3+
<!-- <details>
4+
<summary>On development changelog</summary>
5+
The latest on-development version can be accessed by building the source code. On this on-development version, things can be broken.
6+
</details> -->
7+
8+
## 0.3.0
9+
10+
This is a huge update now with better quality translations, configurable settings, UCSUR support, and expanded vocabulary!
11+
12+
- Reimplement the word "a". This were dropped due to parser rewrite.
13+
- The vocabulary has been expanded to _nimi ku suli_ plus _nimi su!_.
14+
- New "dictionary mode", just enter a single word and ilo Token will output all definition from its own dictionary. This also works for particles. To bypass this and translate the word as if it is the whole sentence, just add a period.
15+
- Reimplement the "a" particle.
16+
- Implement UCSUR support! It supports:
17+
- Cartouche with nasin sitelen kalama
18+
- Combined glyphs
19+
- Long glyphs
20+
- (Deprecated characters and combiners are not supported)
21+
- Implement [nasin nanpa pona](https://sona.pona.la/wiki/nasin_nanpa_pona).
22+
- Implement settings dialog. [More info](https://github.com/ilo-token/ilo-token.github.io/wiki/Settings-Help).
23+
- Changes in error messages:
24+
- All possible errors will now be listed.
25+
- ilo Token now uses telo misikeke for error messages. This can be disabled from the settings.
26+
- Multiline text will no longer be recognized.
27+
- Add icons.
28+
29+
You may not notice this, we take good grammar for granted, but ilo Token now has generally better quality translations thanks to the following:
30+
31+
- It is now aware determiners are separate from adjectives. So you won't see adjectives like "nicely my", since adverbs can't modify determiners.
32+
- It tries to ensure adjectives are in proper order. Yes this matters, it's "big red fruit" and not "red big fruit".
33+
- Just like adjectives, determiners are also ordered, but unlike adjectives, they're also filtered (some combinations are not shown). You won't see "my your animal".
34+
- It is aware of grammatical numbers. So you won't see "2 stick" or "1 sticks".
35+
36+
Inside update (intended for developers):
37+
38+
- Implement lexer and english AST.
39+
- Overhaul dictionary: It is now a separate file with nicer syntax as opposed to written inside the code.
440

541
## 0.2.2
642

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

CONTRIBUTING.md

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,56 @@
11
# Contributing
22

3-
You can do the usual github stuff: Open issue if there's an issue or you have a suggestion; Open pull request if you want to propose changes. If you want to propose a large change however, please open an issue first (or comment on an already existing issue page), and wait for my signal before beginning to work.
3+
Thank you so much for considering to contribute! Here are useful information about the pages to get you started. Remember you can always ask for help in the [discussion](#Discussion) or privately through my email: [[email protected]](mailto:[email protected])
44

5-
## The wiki
5+
## [Wiki](https://github.com/ilo-token/ilo-token.github.io/wiki)
66

7-
The wiki provides useful information for contributors, although it's not complete yet. Check it out: [Visit wiki](https://github.com/neverRare/ilo-token/wiki).
7+
The wiki is a place full of useful information for contributors from how the code works to guidelines for editing the dictionary!
8+
9+
It's not perfect however. If you spot a mistake, please open an issue.
10+
11+
## [Issue](https://github.com/ilo-token/ilo-token.github.io/issues)
12+
13+
The issue page is intended for tracking the development of ilo Token as well as its wiki. You may open an issue for:
14+
15+
- Bug report
16+
- Feature request
17+
- Fix suggestion to the wiki
18+
19+
Please remember to search first before opening an issue, it might already exist! Duplicate issues are unnecessary.
20+
21+
## [Discussion](https://github.com/ilo-token/ilo-token.github.io/discussions)
22+
23+
This GitHub repository have discussion, a dedicated forum page and shall serve as a public space for ilo Token development. You may open a new page for:
24+
25+
- Suggestion for translation e.g. how it can be improved
26+
- Questions
27+
- Any opinions or suggestions you want to share
28+
29+
Please search first before opening a new page! Duplicate pages are unnecessary.
30+
31+
## [Pull request](https://github.com/ilo-token/ilo-token.github.io/pulls)
32+
33+
Before forking and editing, please claim an issue first or open an issue then claim it. After that, you can start away. This is necessary to avoid wasted duplicate efforts.
34+
35+
You **don't** have to do this if:
36+
37+
- It is a contribution to the dictionary
38+
- It is a minor edit e.g. a typo fix
39+
40+
[The wiki](https://github.com/ilo-token/ilo-token.github.io/wiki) contains useful for contributors.
41+
42+
As a thank you for contributing, you'll get a shout out in the changelog!
43+
44+
## Alternative contact options
45+
46+
If you have no github account or want to provide feedback privately, these are alternative contact options:
47+
48+
- [Google forms](https://docs.google.com/forms/d/e/1FAIpQLSfdDEMbde9mieybZdbZr8haRzNzGsg0BVkuTIzuHaATCdcrlw/viewform?usp=sf_link)
49+
50+
51+
ilo Token have a dedicated space for the following Discord server. Although these server themselves serves as a space for broader topics, not just ilo Token.
52+
53+
- [ma pona pi toki pona](https://discord.gg/Byqn5z9) ([Thread for ilo Token](https://discord.com/channels/301377942062366741/1053538532993548320)): A Discord server for Toki Pona.
54+
- [r/ProgrammingLanguages](https://discord.gg/4Kjt3ZE) ([Channel for ilo Token](https://discord.com/channels/530598289813536771/1224854915214737522)): A Discord server for programming language development. While ilo Token isn't a programming language, it uses similar techniques found in programming language development e.g. parsing.
55+
56+
These are unnoficial spaces and are not subject to the [Contributor Covenant Code of Conduct](https://github.com/ilo-token/ilo-token.github.io/blob/master/CODE_OF_CONDUCT.md). Instead, each have its own rules and different moderators.

README.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,39 @@
11
# ilo Token
22

3-
> The repository and the website uses to old name, it will be renamed on the next update.
4-
53
A rule-based Toki Pona to English translator that translates into multiple sentences. This emphasizes how broad Toki Pona can be. Everything is hardcoded, no machine learning involved.
64

7-
[Try it](https://neverrare.github.io/ilo-token/)
5+
[Try it](https://ilo-token.github.io/)
86

9-
## Building
7+
**It is work in progress!** [We welcome contributors however!](./CONTRIBUTING.md)
108

11-
This builds `./main.js` as a minified file ready for production use.
9+
## Dependencies
1210

13-
You'll need [Deno](https://deno.com/). Run the following command.
11+
You'll need the following in order to run commands:
12+
13+
- [Deno](https://deno.com/)
14+
15+
## Building
16+
17+
This fetches more dependencies needed, builds the dictionary, and builds `./dist/main.js` as a minified file ready for production use. If you made changes to the dictionary, you'll need to run this again.
1418

1519
```
1620
deno task build
1721
```
1822

1923
## Watching
2024

21-
This builds `./main.js` as a non-minified file with source mapping, intended for testing and debugging. This command also watches the source codes in `./src/` path and rebuilds `./main.js` whenever there are changes.
25+
Before running this command, you'll need to run `deno task build` first. This is because `deno task watch` doesn't fetch dependencies nor builds the dictionary. You'll only need to run this command once.
2226

23-
You'll need [Deno](https://deno.com/). Run the following command.
27+
This builds `./dist/main.js` as a non-minified file with source mapping, intended for testing and debugging. This command also watches the source codes in `./src/` path and rebuilds `./dist/main.js` whenever there are changes.
2428

2529
```
2630
deno task watch
2731
```
2832

2933
To stop this command, simply press Ctrl + C.
3034

31-
## About the source codes
35+
## Running locally
36+
37+
After building or watching, you can directly run `./dist/index.js` using your favorite browser with some caveat however: UCSUR characters will display as tofu.
3238

33-
With exception to `./src/main.ts`, every source codes in `./src/` are environment agnostic. Meaning it can be run on Deno as well. This makes it convenient to directly test codes by using `deno run`.
39+
This could be mitigated by making use of local server but I didn't do that, there's little need for that.

0 commit comments

Comments
 (0)