mirror of
https://github.com/akuker/RASCSI.git
synced 2025-08-15 08:27:34 +00:00
Swedish translation tweaks & readme updates (#567)
* Add flask_babel 2.0.0 to requirements * Partial i18n * Use current locale for protobuf requests * Don't store generated messages.pot in git * Internationalize all python code * Formatting fixes * Partial internationalization of html * Iterate on html i18n * Completed i18n of code * Improve i18n of strings * Blurb about i18n in the readme * Improve i18n strings * Add the compiled messages.mo files to .gitignore * Add complete Swedish localization * Generate localizations in start.sh * Only compile messages.mo in start.sh; better sequence * Fix bug * Flesh out readme * Flesh out readme * Tweak Swedish translations
This commit is contained in:
@@ -51,6 +51,13 @@ $ git push pi master
|
||||
|
||||
We use the Flask-Babel library and Flask/Jinja2 extension for i18n.
|
||||
|
||||
It uses the 'pybabel' command line tool for extracting and compiling localizations.
|
||||
Activate the Python venv in src/web/ to use it:
|
||||
|
||||
$ cd src/web/
|
||||
$ source venv/bin/activate
|
||||
$ pybabel --help
|
||||
|
||||
To create a new localization, it needs to be added to accept_languages in
|
||||
the get_locale() method, and also to localizer.cpp in the RaSCSI C++ code.
|
||||
|
||||
@@ -58,3 +65,13 @@ Once this is done, follow the steps in the [Flask-Babel documentation](https://f
|
||||
to generate the messages.po for the new language.
|
||||
|
||||
Updating an existing messages.po is also covered above.
|
||||
|
||||
When you are ready to contribute new or updated localizations, use the same Gitflow Workflow as used for any code contributions to submit PRs against the develop branch.
|
||||
|
||||
### (Optional) See translation stats for a localization
|
||||
Install the gettext package and use msgfmt to see the translation progress.
|
||||
|
||||
$ sudo apt install gettext
|
||||
$ cd src/web/
|
||||
$ msgfmt --statistics translations/sv/LC_MESSAGES/messages.po
|
||||
215 translated messages.
|
||||
|
@@ -690,7 +690,7 @@ msgid ""
|
||||
"If RaSCSI was unable to detect the device type associated with the image,"
|
||||
" you can choose the type from the dropdown."
|
||||
msgstr ""
|
||||
"Om RaSCSI inte kunde detektera enhetstypen för en skivbild, kan du välja "
|
||||
"Om RaSCSI inte känner igen enhetstypen för en skivbild kan du välja "
|
||||
"en enhetstyp från rullgardinsmenyn."
|
||||
|
||||
#: templates/index.html:159
|
||||
@@ -699,7 +699,7 @@ msgid ""
|
||||
"Magneto-Optical | SCCD = CD-ROM | SCBR = Host Bridge | SCDP = DaynaPORT"
|
||||
msgstr ""
|
||||
"Typer: SAHD = SASI-hårddisk | SCHD = SCSI-hårddisk | SCRM = utmatsbar | "
|
||||
"SCMO = magnet optisk | SCCD = cd-rom | SCBR = Host Bridge | SCDP = "
|
||||
"SCMO = magnet-optisk | SCCD = cd-rom | SCBR = Host Bridge | SCDP = "
|
||||
"DaynaPORT"
|
||||
|
||||
#: templates/index.html:167
|
||||
@@ -831,8 +831,8 @@ msgid ""
|
||||
"CD-ROM images to '.iso', and removable drive images to '.hdr' before "
|
||||
"uploading."
|
||||
msgstr ""
|
||||
"Om en fil inte känns igen, du kan försöka döpa om hårddiskbildfiler till "
|
||||
"'.hds', cd-bildfiler till '.iso', och uttagbara bildfiler till '.hdr' "
|
||||
"Om RaSCSI inte känner igen in filtyp kan du försöka döpa om hårddiskbildfiler till "
|
||||
"'.hds', cd-bildfiler till '.iso', och utmatbara bildfiler till '.hdr' "
|
||||
"innan du laddar upp den."
|
||||
|
||||
#: templates/index.html:356
|
||||
@@ -842,7 +842,7 @@ msgstr "Kända filtyper: %(valid_file_suffix)s"
|
||||
|
||||
#: templates/index.html:383
|
||||
msgid "Download File to Images"
|
||||
msgstr "Ladda ner fil till Images"
|
||||
msgstr "Ladda ner fil till skivbildsfilskatalogen"
|
||||
|
||||
#: templates/index.html:386
|
||||
#, python-format
|
||||
@@ -863,7 +863,7 @@ msgstr "Ladda ner"
|
||||
|
||||
#: templates/index.html:396
|
||||
msgid "Downloading File to Images..."
|
||||
msgstr "Laddar ner filen till Images..."
|
||||
msgstr "Laddar ner filen till skivbildsfilskatalogen..."
|
||||
|
||||
#: templates/index.html:406
|
||||
msgid "Download File to AppleShare"
|
||||
|
Reference in New Issue
Block a user