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 main
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:
- Help to translate: add/improve translations in your language's
<locale_code>.po
file - Help to collect: collect not yet known keys to populate the master mapping
In either case, you'll need to fork and clone this repository, ensuring you're on the appropriate branch:
- Use the latest release or the current preview version of SmartGit
- Fork the repository
- Clone your fork, e.g. to
C:\temp\smartgit-translations.git
- Checkout the appropriate branch:
main
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.
-
Open SmartGit's configuration directory. (Help -> About SmartGit, Information Tab)
-
Exit SmartGit. (Repository -> Exit)
-
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 likezh_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 inmsgstr
. In SmartGit, every entry has amsgctxt
andmsgid
, 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 "编辑仓库设置"
- Prepare as described above
- Check pending pull requests to see which translations are in progress
- Open Poedit and set it not to wrap words.
- Open
<locale_code>.po
and proceed with the translation. - In Poedit, 'Needs work' corresponds to the 'fuzzy' flag in the file. Remove the flag once verified.
- Check the file differences, and revert any changes made to the header by Poedit.
- Send a pull request with a prefix like
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:
- Prepare as described above (enable viewing translation results in the actual GUI).
- Restart SmartGit.
- SmartGit will create several new files in the specified
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.- These two files are yours to ignore, hence 'you own them'.
- Shut down SmartGit.
- Occasionally check two files, compress them, and send them to
[email protected]
- Prefix your email with "Language mappings: new/changed keys"
- Delete all two files, to start collecting new keys again
- Restart SmartGit and continue collecting new keys
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!