diff --git a/src/web/README.md b/src/web/README.md index b5c61325..2dde4d34 100644 --- a/src/web/README.md +++ b/src/web/README.md @@ -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. diff --git a/src/web/translations/sv/LC_MESSAGES/messages.po b/src/web/translations/sv/LC_MESSAGES/messages.po index a3c31a8c..ef76d3fd 100644 --- a/src/web/translations/sv/LC_MESSAGES/messages.po +++ b/src/web/translations/sv/LC_MESSAGES/messages.po @@ -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"