This repository contains translation files for the Git client SmartGit:
https://www.syntevo.com/smartgit/download/
SmartGit includes various UI texts ('strings') directly in its source code. Many of these strings are dynamically composed. Major UI components are assigned keys, which are used to search for translations from localization files.
The ./po
directory contains a messages.pot
file ('master mapping') which includes all currently known keys and their original English texts. Localization files for all currently supported locales, named <locale_code>.po
, contain similar keys and original texts, along with their translations (or are yet to be translated).
The 'master mapping' is updated by us from the SmartGit source at regular intervals. <locale_code>.po
files are primarily updated by contributors and then synchronized with the SmartGit source by us.
The translations for the latest Preview release are managed in the master
branch, and each stable version of SmartGit has its separate branch, like smartgit-23.1
.
[!NOTE] Starting with SmartGit 24.1, we have migrated the format of localization files to one of the de facto standard formats, the PO file format. For previous versions, please refer to the README.md of each version's branch.
You can contribute to the localization of SmartGit in two ways:
<locale_code>.po
fileIn either case, you'll need to fork and clone this repository, ensuring you're on the appropriate branch:
C:\temp\smartgit-translations.git
master
contains translations for the current Preview versionsmartgit-...
contains translations for the corresponding SmartGit version[!IMPORTANT] Please only send pull requests for one of these two versions.
This is not mandatory for translation-only contributions, but it enables you to work while checking how your translations appear in the actual GUI.
Find smartgit.properties
in the configuration directory and add the following lines:
smartgit.i18n=<locale>
smartgit.debug.i18n.development=<path-to-localization-directory>
Set <locale>
to one of the locales like zh_CN
, ja_JP
.
For example, if the repository is cloned to the location shown and you are translating for the zh_CN
locale, it would look like this:
smartgit.i18n=zh_CN
smartgit.debug.i18n.development=C\:/temp/smartgit-translations.git/po
smartgit.properties
also has options to display marks on UI elements of the GUI with untranslated sections or unknown keys, which is especially useful for key collection, so activate it as needed.
For more details, refer to About smartgit.properties.
[!IMPORTANT] This setting is mandatory when collecting keys.
For translating po files, a basic text editor is possible, but you may find translation support tools like the following convenient. Use whichever tool you prefer:
All new translations are welcome! To contribute, please follow these steps:
Prepare as described above
Check pending pull requests to see which translations are in progress
Review the contents of <locale_code>.po
to find the text to translate.
Translate the text. Here's an example entry to explain:
msgctxt "(wndLog|wndProject).lblStatusBarMessage:"
msgid "Please wait ..."
msgstr ""
In po files, msgctxt
is a string for identifying context, msgid
serves as both the key and original text, and the translated message is written in msgstr
.
In SmartGit, every entry has a msgctxt
and msgid
, which are used internally as the key.
Write your translated message in msgstr
.
msgctxt "(wndLog|wndProject).lblStatusBarMessage:"
msgid "Please wait ..."
msgstr "请稍等..."
Send a pull request with a prefix like Chinese translation update:
(or the appropriate language name)
[!IMPORTANT] Ensure your pull request does not include unnecessary changes like end-of-line alterations (e.g., newline) or reordering (entry are automatically sorted by us).
Below is an example of an untranslated entry. Entries where msgstr
is an empty string.
msgctxt "(wndLog|wndProject).lblStatusBarMessage:"
msgid "Please wait ..."
msgstr ""
For items that should remain as the original text, like product names, set msgstr
to the same string as msgid
.
msgctxt "dlgSgHostingProviderEdit.tle:"
msgid "GitHub"
msgstr "GitHub"
Entries deemed to need verification for some reason are tagged with the fuzzy
flag.
Also, entries whose original text has changed will have the previous original text written in a comment line starting with #| msgid
.
Review the content and adjust msgstr
as needed.
#, fuzzy
#| msgid "Edit the effective repository settings"
msgctxt "dlgSgRepositorySettings.hdl"
msgid "Edit the repository settings"
msgstr "编辑有效的仓库设置"
Once verification or modification is complete, remove the 'fuzzy' flag and the previous original text line.
msgctxt "dlgSgRepositorySettings.hdl"
msgid "Edit the repository settings"
msgstr "编辑仓库设置"
<locale_code>.po
and proceed with the translation.Chinese translation update:
(or the appropriate language name)[!IMPORTANT]
- To avoid conflicts due to unnecessary changes, always revert header changes before committing.
- Change your editor settings not to wrap words.
- In Poedit, go to File -> Preferences..., open the Advanced tab, and turn on 'Preserving formatting of existing files'.
- If word wrapping has changed, turn off 'Preserving formatting of existing files' and set 'Wrap at' to a sufficiently large value like 1000, then save the po file over it.
Since SmartGit dynamically generates texts, the master mapping does not include all keys, only those currently known to us and contributors collected. To help collect keys:
development
directory. The most important ones are:
unknown.*
, containing yet unknown keys, i.e., keys without a matching entry in the master mapping filemismatch.*
, containing already known keys with differences in the original text between the code and master mapping file.smartgit@syntevo.com
We need reviews by native speakers of each language.
Pending pull requests and existing translations in mapping.dev
may sometimes need refinement.
We welcome review comments and suggestions for improving existing translations!