-
-
Notifications
You must be signed in to change notification settings - Fork 174
Translating ElevenClock
- Home
- Documentation
- Installation
- Running and building the source code
- Translating ElevenClock (You are here)
Since ElevenClock is an app that wants to reach every single person in the world running Windows 11, on issue #111 it was requested to add this feature. And here we are. On this page you will find useful information about how does the ElevenClock translation program works and how to participate on it, because anyone can contribute here!
You can check the supported languages here
The method ElevenClock uses to translate the UI is based on dictionaries
, containing a reference sentence and a translated sentence. Those dictionaries are stored in python files and divided into sections, to make them easier to read and to maintain. Every languagge file codes for a different language, and every language is stored on one signle file. If a translation is missing, the program will fallback to english, providing always a readable UI for everyone. Those language files need to be registered to be used, and this is done in languages.py. The addition of language files is not dynamic in order to prevent hackers from inserting malicious .py
files into the code.
To translate ElevenClock to a new language:
- Download this file. This file has all the language definitions.
- Rename so it matches the following pattern:
lang_[LANG_CODE].py
. For example,lang_en.py
for english orlang_ca.py
for catalan. More information about language codes can be found Here - Translate the sentences that you will find on each line. DO NOT replace the english reference strings, but rather write the translation between the quotation marks present at th end of the line. Please follow the rules established in the Rules section in order to provide a functional translation.
- When the translation job is done, you can either submit a pull request (If you know how to) or, if you don't know how to, just send me the translated file at [email protected]. I'll review it and publish it with the new version.
Example translation: (On the left the english references which SHOULD NOT be modified. On the right the catalan translations)
- Go to this folder and download language file which corresponds to the languge you want to update.
- Translate every non-translated sentence in between the quotation marks that you will find at the very end of every line. The non-translated sentences will be at the top of the document. Please follow the rules established in the Rules section in order to provide a functional translation.
- In order to publish changes, you can either submit a pull request (If you know how to) or, if you don't know how to, just send me the updated file at [email protected]. I'll review it and publish it with the new version.
- Make sure not to modify the original strings. If this happened the translation wouldn't work at all.
- Make sure to add any final stop/colon/semicolon/hyphen/etc.
- Make sure to add the {0} symbols, since they code for variable values
- If you are creating a new translation, you can give you credits in a specific place (marked in the file). If you update a language file, you can also add your credits but without removing the previous one. Thi could be achieved by writing something like "Translated to Catalan by @user1 and @user2"!
- Catalan
- Czech (Čeština)
- Danish
- Dutch
- English
- Finnish
- French
- German
- Greek
- Hebrew
- Hungarian
- Indonesian
- Italian
- Japanese
- Korean
- Latvian
- Lithuanian
- Norwegian
- Polish
- Portuguese (Brazil)
- Portuguese (Portugal)
- Russian
- Simplified Chinese (China)
- Serbian
- Slovak
- Spanish
- Swedish
- Traditional Chinese (Taiwan)
- Turkish
- Ukranian
- Vietnamese
- Arabic
ElevenClock - Made with ❤️ by Martí Climent