Nice to see you want to contribute! 👍
As I do not want to duplicate the instructions all over, please find the common contributors docs here: https://github.com/TinyWebEx/common/blob/master/CONTRIBUTING.md
Some links and potential special rules for this repo only are listed below.
- Direct link to online translator: Web-Ext-Translator for this add-on.
- English locales dir:
src/_locales/en
- Text assets to translate:
assets/texts
- Screenshots:
assets/screenshots
- Wiki to translate: wiki
- Sidebar file for adding language:
_Sidebar
file
If you want to add symbols to be replaced, do it like this:
Add the item to the symbols
object in the src/common/modules/data/Symbols.js
file.
The syntax is a simple "key": "value"
replacement.
Note: Make sure the key does not conflict with any of the existing symbols. The value must be an Unicode symbol. Note: Emoji autocorrections should instead be added to the Awesome Emoji Picker.
If you want to add a transformation for an Unicode font with a context menu entry, do it like this:
- Add the item to the
fonts
object in thesrc/common/modules/data/Fonts.js
file. The syntax is again a["key"]: "value"
JavaScript object.
- The key should start with the
FONT_ID_PREFIX
. - The value of the item lists all replacement characters and needs to include either
- all uppercase letters (A-Z) in alphabetical order
- all upper and lowercase letters (A-Z, a-z) in alphabetical order (all upper case letters first)
- all uppercase letters and numbers (A-Z, 0-9) with letters first,
- all upper and lowercase letters and numbers (A-Z, a-z, 0-9) in this order or
- all printable ASCII characters (!-~).
- Add the name to the
menuStructure[TRANSFORMATION_TYPE.FONT]
array in the same file at the position, where the context menu entry should appear.
Note: Casing transformations do have a different prefix and are separately handling in the source code (src/common/modules/UnicodeTransformationHandler.js
), so to change something there, you have to do some “real” code changes.
- Test dir:
src/tests/
- EsLint config for tests:
src/tests/.eslintrc