Skip to content

Commit

Permalink
Merge pull request #42 from ilo-token/master
Browse files Browse the repository at this point in the history
v0.3.0
  • Loading branch information
neverRare authored Aug 15, 2024
2 parents 2184ec9 + 5d9205b commit f349d68
Show file tree
Hide file tree
Showing 47 changed files with 7,458 additions and 3,443 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deno.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "."
path: "/dist/"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
main.js
.vscode/
dictionary/dictionary.ts
dist/main.js
telo-misikeke/rules.js
telo-misikeke/Parser.js
11 changes: 0 additions & 11 deletions .vscode/settings.json

This file was deleted.

38 changes: 37 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,42 @@
# Changelog

You may need to force restart the page in order to use the latest version: shift + click the restart button; or ctrl + shift + R.
<!-- <details>
<summary>On development changelog</summary>
The latest on-development version can be accessed by building the source code. On this on-development version, things can be broken.
</details> -->

## 0.3.0

This is a huge update now with better quality translations, configurable settings, UCSUR support, and expanded vocabulary!

- Reimplement the word "a". This were dropped due to parser rewrite.
- The vocabulary has been expanded to _nimi ku suli_ plus _nimi su!_.
- 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.
- Reimplement the "a" particle.
- Implement UCSUR support! It supports:
- Cartouche with nasin sitelen kalama
- Combined glyphs
- Long glyphs
- (Deprecated characters and combiners are not supported)
- Implement [nasin nanpa pona](https://sona.pona.la/wiki/nasin_nanpa_pona).
- Implement settings dialog. [More info](https://github.com/ilo-token/ilo-token.github.io/wiki/Settings-Help).
- Changes in error messages:
- All possible errors will now be listed.
- ilo Token now uses telo misikeke for error messages. This can be disabled from the settings.
- Multiline text will no longer be recognized.
- Add icons.

You may not notice this, we take good grammar for granted, but ilo Token now has generally better quality translations thanks to the following:

- It is now aware determiners are separate from adjectives. So you won't see adjectives like "nicely my", since adverbs can't modify determiners.
- It tries to ensure adjectives are in proper order. Yes this matters, it's "big red fruit" and not "red big fruit".
- 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".
- It is aware of grammatical numbers. So you won't see "2 stick" or "1 sticks".

Inside update (intended for developers):

- Implement lexer and english AST.
- Overhaul dictionary: It is now a separate file with nicer syntax as opposed to written inside the code.

## 0.2.2

Expand Down
128 changes: 128 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[email protected].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
55 changes: 52 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,56 @@
# Contributing

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.
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])

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

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).
The wiki is a place full of useful information for contributors from how the code works to guidelines for editing the dictionary!

It's not perfect however. If you spot a mistake, please open an issue.

## [Issue](https://github.com/ilo-token/ilo-token.github.io/issues)

The issue page is intended for tracking the development of ilo Token as well as its wiki. You may open an issue for:

- Bug report
- Feature request
- Fix suggestion to the wiki

Please remember to search first before opening an issue, it might already exist! Duplicate issues are unnecessary.

## [Discussion](https://github.com/ilo-token/ilo-token.github.io/discussions)

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:

- Suggestion for translation e.g. how it can be improved
- Questions
- Any opinions or suggestions you want to share

Please search first before opening a new page! Duplicate pages are unnecessary.

## [Pull request](https://github.com/ilo-token/ilo-token.github.io/pulls)

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.

You **don't** have to do this if:

- It is a contribution to the dictionary
- It is a minor edit e.g. a typo fix

[The wiki](https://github.com/ilo-token/ilo-token.github.io/wiki) contains useful for contributors.

As a thank you for contributing, you'll get a shout out in the changelog!

## Alternative contact options

If you have no github account or want to provide feedback privately, these are alternative contact options:

- [Google forms](https://docs.google.com/forms/d/e/1FAIpQLSfdDEMbde9mieybZdbZr8haRzNzGsg0BVkuTIzuHaATCdcrlw/viewform?usp=sf_link)
- Email: [[email protected]](mailto:[email protected])

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.

- [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.
- [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.

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.
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
# ilo Token

> The repository and the website uses to old name, it will be renamed on the next update.
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.

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

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

This builds `./main.js` as a minified file ready for production use.
## Dependencies

You'll need [Deno](https://deno.com/). Run the following command.
You'll need the following in order to run commands:

- [Deno](https://deno.com/)

## Building

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.

```
deno task build
```

## Watching

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.
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.

You'll need [Deno](https://deno.com/). Run the following command.
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.

```
deno task watch
```

To stop this command, simply press Ctrl + C.

## About the source codes
## Running locally

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.

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`.
This could be mitigated by making use of local server but I didn't do that, there's little need for that.
Loading

0 comments on commit f349d68

Please sign in to comment.