-
-
Notifications
You must be signed in to change notification settings - Fork 234
Translating
All translations are thanks to our community of contributors. Saber is currently available in:
- English (en)
- Arabic (ar)
- Czech (cs)
- German (de)
- Esperanto (eo)
- Spanish (es)
- Persian (fa)
- French (fr)
- Hebrew (he)
- Hungarian (hu)
- Italian (it)
- Japanese (ja)
- Brazilian Portuguese (pt_BR)
- Russian (ru)
- Turkish (tr)
- Chinese Simplified (zh_Hans_CN)
- Chinese Traditional (zh_Hant_TW)
We may in the future use Weblate to crowd-source translations without requiring contributors to manually edit yaml files or use git.
I am currently experiencing some issues with integrating it. Any updates will be posted here.
Check _missing_translations.yaml to see if any translations are missing.
To add missing translations:
- Log in to GitHub.
- Use this link
to edit
_missing_translations.yaml. - Update the file with your translations, e.g. updating German (de)
de: editor: newerFileFormat: title: Diese Notiz wurde mit einer neueren Version von Saber bearbeitet subtitle: Wenn du diese Notiz bearbeitest, können Daten verloren gehen. Möchtest du die Notiz trotzdem öffnen? openAnyway: Trotzdem öffnen cancel: Abbruch # ignore the other languages...
- Click the green button to open a pull request! I'll do the rest
- Look for your locale code here,
e.g.
hifor Hindi,frfor French,bnfor Bengali,arfor Arabic, etc. - Use this link
to create a new file in
lib/i18n/calledXX.i18n.yamlwhereXXis your locale code. - Copy the contents of an existing file like
lib/i18n/en.i18n.yamland replace the translations with your own. If you don't know the translation for a string, just delete the line. - Open a pull request!
We have 3 formats for app store descriptions:
-
F-Droid/Play Store:
i. Open
metadata/en-US/and copy thefull_description.txtandshort_description.txtfiles into themetadata/XX/folder whereXXis your locale code. Then translate the contents of the files.ii. I machine-translate changelogs every release so they may not be perfect. If you spot a mistake, please edit the translated changelog in
metadata/XX/changelogs/<version-code>.txtwhereXXis your locale code. -
Linux .desktop file:
i. Open
flatpak/com.adilhanney.saber.desktopand add a line for theCommentkey with the following format whereXXis your locale code:Comment[XX]=Your translation
If you also need to translate the
Namekey, do the same thing. -
Flathub (optional):
i. This may be a bit too technical for some contributors. If that's the case, just skip this step and let me know in your PR to copy the translations from the above section.
ii. In
flatpak/com.adilhanney.saber.metainfo.xmlbefore the</description>closing tag, add a line for your translation with the following format whereXXis your locale code:<p xml:lang="XX">Your translation</p>