Skip to content

Commit

Permalink
Fix formatting of .po and integrate npm run format
Browse files Browse the repository at this point in the history
This patch unifies formatting between Weblate and
local tooling and reformats .po files. Markdowns
are also reformatted after re-generation.

Signed-off-by: Roman Tsisyk <[email protected]>
  • Loading branch information
rtsisyk committed Dec 24, 2022
1 parent 95bf54d commit c81436e
Show file tree
Hide file tree
Showing 12 changed files with 477 additions and 238 deletions.
2 changes: 1 addition & 1 deletion .po4a.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[po4a_langs] id pt-BR es nl eu
[po4a_paths] po/content.pot $lang:po/content.$lang.po

[options] opt:"--verbose" opt:"--package-name='Organic Maps Website'" opt:"--package-version=1.0" opt:"--copyright-holder='Organic Maps'" opt:"--addendum-charset=UTF-8" opt:"--localized-charset=UTF-8" opt:"--master-charset=UTF-8" opt:"--master-language=en_US" opt:"--msgmerge-opt='--no-wrap'" opt:"--porefs=file" opt:"--wrap-po=newlines"
[options] opt:"--verbose" opt:"--package-name='Organic Maps Website'" opt:"--package-version=1.0" opt:"--copyright-holder='Organic Maps'" opt:"--addendum-charset=UTF-8" opt:"--localized-charset=UTF-8" opt:"--master-charset=UTF-8" opt:"--master-language=en_US" opt:"--porefs=file"

[po4a_alias:markdown] text opt:"--option markdown" opt:"--option keyvalue" opt:"--option yfm_keys=title,description,menu_title" opt:"--addendum-charset=UTF-8" opt:"--localized-charset=UTF-8" opt:"--master-charset=UTF-8" opt:"--keep=80"

Expand Down
1 change: 0 additions & 1 deletion TRANSLATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ brew install po4a

## Known Limitations

- `./tools/i18n.sh` removes line wrapping in `.po` files when a new language is added initially via WebLate.
- New web-site pages and languages should be added to `.po4a.cfg` configuration file manually.

[po4a]: https://po4a.org/index.php.en
Expand Down
2 changes: 1 addition & 1 deletion content/terms/index.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ completa de los avisos de copyright para la aplicación Organic Maps.
Si tienes preguntas o sugerencias, por favor contacta con nosotros en
[[email protected]](mailto:[email protected]).

[github]: https://github.com/organicmaos/organicmaos
[github]: https://github.com/organicmaps/organicmaps
[license]: http://www.apache.org/licenses/LICENSE-2.0
[copyright]: https://github.com/organicmaps/organicmaps/blob/master/data/copyright.html
2 changes: 1 addition & 1 deletion content/terms/index.eu.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ Galdera edo iradokizunik baduzu, mesedez jarri gurekin harremanetan helbide
honetan [[email protected]](mailto:[email protected]).

[github]: https://github.com/organicmaps/organicmaps
[lizentzia]: http://www.apache.org/licenses/LICENSE-2.0
[license]: http://www.apache.org/licenses/LICENSE-2.0
[copyright]: https://github.com/organicmaps/organicmaps/blob/master/data/copyright.html
2 changes: 1 addition & 1 deletion content/terms/index.nl.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ Als u vragen of opmerkingen heeft, neem alstublieft contact met ons op
via[[email protected]](mailto:[email protected]).

[github]: https://github.com/organicmaps/organicmaps
[licentie]: http://www.apache.org/licenses/LICENSE-2.0
[license]: http://www.apache.org/licenses/LICENSE-2.0
[copyright]: https://github.com/organicmaps/organicmaps/blob/master/data/copyright.html
369 changes: 270 additions & 99 deletions po/content.es.po

Large diffs are not rendered by default.

22 changes: 8 additions & 14 deletions po/content.eu.po
Original file line number Diff line number Diff line change
Expand Up @@ -784,20 +784,14 @@ msgstr "Irakurri baita ere [data/copyright.html][copyright] fitxategia, Organic
#. type: Plain text
#: content/terms/index.md
#, no-wrap
msgid "[github]: https://github.com/organicmaps/organicmaps\n"
msgstr "[github]: https://github.com/organicmaps/organicmaps\n"

#. type: Plain text
#: content/terms/index.md
#, no-wrap
msgid "[license]: http://www.apache.org/licenses/LICENSE-2.0\n"
msgstr "[lizentzia]: http://www.apache.org/licenses/LICENSE-2.0\n"

#. type: Plain text
#: content/terms/index.md
#, no-wrap
msgid "[copyright]: https://github.com/organicmaps/organicmaps/blob/master/data/copyright.html\n"
msgstr "[copyright]: https://github.com/organicmaps/organicmaps/blob/master/data/copyright.html\n"
msgid ""
"[github]: https://github.com/organicmaps/organicmaps\n"
"[license]: http://www.apache.org/licenses/LICENSE-2.0\n"
"[copyright]: https://github.com/organicmaps/organicmaps/blob/master/data/copyright.html\n"
msgstr ""
"[github]: https://github.com/organicmaps/organicmaps\n"
"[license]: http://www.apache.org/licenses/LICENSE-2.0\n"
"[copyright]: https://github.com/organicmaps/organicmaps/blob/master/data/copyright.html\n"

#. type: Hash Value: address
#: translations.yaml
Expand Down
27 changes: 9 additions & 18 deletions po/content.id.po
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,7 @@ msgstr "Berdonasi untuk mendukung pengembangan Organic Maps"
#. type: Plain text
#: content/donate/index.md
msgid "We wish you a Merry Christmas 🎅 and a Happy New Year 🎄! The best gift for us is to know that we are doing The Right Thing and that our time and efforts are helping someone on the Planet."
msgstr ""
"Kami mengucapkan Selamat Natal 🎅 dan Tahun Baru 🎄! Hadiah terbaik bagi "
"kami adalah mengetahui bahwa kami melakukan Hal yang Benar dan bahwa waktu "
"dan upaya kami membantu seseorang di Planet ini."
msgstr "Kami mengucapkan Selamat Natal 🎅 dan Tahun Baru 🎄! Hadiah terbaik bagi kami adalah mengetahui bahwa kami melakukan Hal yang Benar dan bahwa waktu dan upaya kami membantu seseorang di Planet ini."

#. type: Plain text
#: content/donate/index.md
Expand Down Expand Up @@ -787,20 +784,14 @@ msgstr "Lihat juga berkas [data/copyright.html][copyright] untuk daftar lengkap
#. type: Plain text
#: content/terms/index.md
#, no-wrap
msgid "[github]: https://github.com/organicmaps/organicmaps\n"
msgstr "[github]: https://github.com/organicmaps/organicmaps\n"

#. type: Plain text
#: content/terms/index.md
#, no-wrap
msgid "[license]: http://www.apache.org/licenses/LICENSE-2.0\n"
msgstr "[license]: http://www.apache.org/licenses/LICENSE-2.0\n"

#. type: Plain text
#: content/terms/index.md
#, no-wrap
msgid "[copyright]: https://github.com/organicmaps/organicmaps/blob/master/data/copyright.html\n"
msgstr "[copyright]: https://github.com/organicmaps/organicmaps/blob/master/data/copyright.html\n"
msgid ""
"[github]: https://github.com/organicmaps/organicmaps\n"
"[license]: http://www.apache.org/licenses/LICENSE-2.0\n"
"[copyright]: https://github.com/organicmaps/organicmaps/blob/master/data/copyright.html\n"
msgstr ""
"[github]: https://github.com/organicmaps/organicmaps\n"
"[license]: http://www.apache.org/licenses/LICENSE-2.0\n"
"[copyright]: https://github.com/organicmaps/organicmaps/blob/master/data/copyright.html\n"

#. type: Hash Value: address
#: translations.yaml
Expand Down
32 changes: 10 additions & 22 deletions po/content.nl.po
Original file line number Diff line number Diff line change
Expand Up @@ -394,14 +394,8 @@ msgstr "Doneer om de ontwikkeling van Organic Maps te ondersteunen"

#. type: Plain text
#: content/donate/index.md
msgid ""
"We wish you a Merry Christmas 🎅 and a Happy New Year 🎄! The best gift for us "
"is to know that we are doing The Right Thing and that our time and efforts "
"are helping someone on the Planet."
msgstr ""
"Wij wensen u een vrolijk kerstfeest 🎅 en een gelukkig nieuwjaar 🎄! Het "
"mooiste geschenk voor ons is te weten dat we Het Goede Doen en dat onze tijd "
"en inspanningen iemand op de Planeet helpen."
msgid "We wish you a Merry Christmas 🎅 and a Happy New Year 🎄! The best gift for us is to know that we are doing The Right Thing and that our time and efforts are helping someone on the Planet."
msgstr "Wij wensen u een vrolijk kerstfeest 🎅 en een gelukkig nieuwjaar 🎄! Het mooiste geschenk voor ons is te weten dat we Het Goede Doen en dat onze tijd en inspanningen iemand op de Planeet helpen."

#. type: Plain text
#: content/donate/index.md
Expand Down Expand Up @@ -790,20 +784,14 @@ msgstr "Zie ook het bestand [data/copyright.html][copyright] voor een volledige
#. type: Plain text
#: content/terms/index.md
#, no-wrap
msgid "[github]: https://github.com/organicmaps/organicmaps\n"
msgstr "[github]: https://github.com/organicmaps/organicmaps\n"

#. type: Plain text
#: content/terms/index.md
#, no-wrap
msgid "[license]: http://www.apache.org/licenses/LICENSE-2.0\n"
msgstr "[licentie]: http://www.apache.org/licenses/LICENSE-2.0\n"

#. type: Plain text
#: content/terms/index.md
#, no-wrap
msgid "[copyright]: https://github.com/organicmaps/organicmaps/blob/master/data/copyright.html\n"
msgstr "[copyright]: https://github.com/organicmaps/organicmaps/blob/master/data/copyright.html\n"
msgid ""
"[github]: https://github.com/organicmaps/organicmaps\n"
"[license]: http://www.apache.org/licenses/LICENSE-2.0\n"
"[copyright]: https://github.com/organicmaps/organicmaps/blob/master/data/copyright.html\n"
msgstr ""
"[github]: https://github.com/organicmaps/organicmaps\n"
"[license]: http://www.apache.org/licenses/LICENSE-2.0\n"
"[copyright]: https://github.com/organicmaps/organicmaps/blob/master/data/copyright.html\n"

#. type: Hash Value: address
#: translations.yaml
Expand Down
Loading

0 comments on commit c81436e

Please sign in to comment.