Format code using prettier

This commit is contained in:
jo 2021-05-27 16:20:34 +02:00
parent 65f7b41487
commit efe4fa027e
47 changed files with 1023 additions and 992 deletions

View file

@ -18,13 +18,13 @@ GNU **gettext** means using a .po file for each language or dialect, a specially
The first of these three lines starts with the hash symbol, and references where this string of text is found in the source code by its file name and line number. If this string is found more than once in the source code, you will see other reference lines here. The second line contains the **msgid**, which is the original version of the string. The third line contains the **msgstr**, which is the translation of that string for the localization that this particular .po file relates to.
If you use the cross-platform program **Poedit** (<http://www.poedit.net/>) to edit the .po file, this formatting of the text is hidden by an easy-to-use GUI. The *poedit* package can be installed on most GNU/Linux distributions using the standard software installer. Versions of Poedit for Mac and Windows are available for free download from the project's homepage.
If you use the cross-platform program **Poedit** (<http://www.poedit.net/>) to edit the .po file, this formatting of the text is hidden by an easy-to-use GUI. The _poedit_ package can be installed on most GNU/Linux distributions using the standard software installer. Versions of Poedit for Mac and Windows are available for free download from the project's homepage.
Before manually translating strings in Poedit from scratch, you should take a look at the online translation services available, such as Lingohub (<https://lingohub.com>) or Google's Translator Toolkit (<http://translate.google.com/toolkit/>), which both support gettext .po files. If using automatic translation, you can then use Poedit to fine-tune the localization and fix any formatting errors.
If you don't already have a GitHub account, you can sign up at <https://github.com/signup/free>. Once you have a GitHub account, you can fork a copy (<https://help.github.com/articles/fork-a-repo>) of the LibreTime project. Work for the next major version of the software is done in the **master** branch of each project, so that's the branch to **checkout** after you have made the initial **git clone**.
In the locale code *de\_CH*, for example, *de* represents the German language and the suffix *\_CH* indicates the dialect spoken in Switzerland. Some languages have a wide variety of dialect localizations, which can be differentiated with a suffix in this way. You should update the header information in the .po file, which includes the language code and a country code, using one of the existing .po files as a guide.
In the locale code _de_CH_, for example, _de_ represents the German language and the suffix _\_CH_ indicates the dialect spoken in Switzerland. Some languages have a wide variety of dialect localizations, which can be differentiated with a suffix in this way. You should update the header information in the .po file, which includes the language code and a country code, using one of the existing .po files as a guide.
After forking the LibreTime git repository, make sure you're in the **master** branch:
@ -32,15 +32,15 @@ After forking the LibreTime git repository, make sure you're in the **master** b
devel
* master
Create a new locale directory (e.g. *airtime\_mvc/locale/de\_CH/LC\_MESSAGES/* for German as spoken in Switzerland):
Create a new locale directory (e.g. _airtime_mvc/locale/de_CH/LC_MESSAGES/_ for German as spoken in Switzerland):
mkdir -p airtime_mvc/locale/de_CH/LC_MESSAGES/
Copy the template *airtime.po* file into the directory you just created:
Copy the template _airtime.po_ file into the directory you just created:
cp airtime_mvc_locale/template/airtime.po airtime_mvc/locale/de_CH/LC_MESSAGES
and update the header information in the new copy of the *airtime.po* file using the **nano** editor:
and update the header information in the new copy of the _airtime.po_ file using the **nano** editor:
nano airtime_mvc/locale/de_CH/LC_MESSAGES/airtime.po