Verified Commit b9ef27fe authored by Elger Jonker's avatar Elger Jonker

optimized translations as far as possible

parent abbce74c
Pipeline #37484322 passed with stages
in 19 minutes
......@@ -31,19 +31,33 @@ class Command(BaseCommand):
"""
def handle(self, *args, **options):
# try and find new strings for all languages
call_command('makemessages', '-a')
# django-admin compilemessages
# -a means _all_ languages in the config. Only makes the languages for the "django" domain, so no javascript.
# all *.py, *.html and *.txt files
# only show a pointer to the file, instead of file+line number. The line number causes pollution when updating
# and it's pretty easy to discover the translation anyway.
log.debug("Making messages for all locales from *.py, *.html and *.txt files.")
call_command('makemessages', '--ignore', 'vendor', '--ignore', '.tox', '-a', '--add-location', 'file')
# -d djangojs =
# https://docs.djangoproject.com/en/2.0/topics/i18n/translation/#creating-message-files-from-js-code
# Now add messages for *.js files
log.debug("Making messages for all locales from *.js files.")
call_command('makemessages', '--ignore', 'vendor', '--ignore', '.tox',
'--add-location', 'file', '-a', '-d', 'djangojs')
log.debug("Compiling messages")
for language in settings.LANGUAGES:
# -d djangojs =
# https://docs.djangoproject.com/en/2.0/topics/i18n/translation/#creating-message-files-from-js-code
call_command('makemessages', '-d', 'djangojs', '-l', language[0])
# Compiles .po files created by makemessages to .mo files for use with the built-in gettext support.
# Default is to process all.
# if you don't specify the locale, it will do ALL LOCALES IT KNOWS! which takes a long time to do nothing
# This command is not feature complete and WILL also compile messages in the .tox directory which is a
# waste of time and obfuscates output.
# https://code.djangoproject.com/ticket/29973#ticket
call_command('compilemessages', '-l', language[0])
log.info('You can find the locale files in ./locale/(language code)/LC_MESSAGES/django(js).po')
log.info('Compiled files are located in ./locale/(language code)/LC_MESSAGES/django(js).mo')
log.info('')
log.info('Run this command again to have your changes compiled.')
log.info('Remember to keep the amount of translations in javascript as low as possible.')
log.info('Remember to keep the amount of translations in javascript as low as possible. Design > translation.')
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-19 16:54+0000\n"
"POT-Creation-Date: 2018-11-21 12:10+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -18,65 +18,65 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: failmap/game/forms.py:32
#: failmap/game/forms.py
msgid "This contest does not exist."
msgstr ""
#: failmap/game/forms.py:76
#: failmap/game/forms.py
msgid "Incorrect secret or team. Try again!"
msgstr ""
#: failmap/game/forms.py:159
#: failmap/game/forms.py
#, python-format
msgid ""
"This organization %(organization)s already exists in the database for this "
"type / layer."
msgstr ""
#: failmap/game/models.py:16
#: failmap/game/models.py
msgid "Contest name"
msgstr ""
#: failmap/game/models.py:48
#: failmap/game/models.py
msgid "contest"
msgstr ""
#: failmap/game/models.py:49
#: failmap/game/models.py
msgid "contests"
msgstr ""
#: failmap/game/models.py:61
#: failmap/game/models.py
msgid "Team name"
msgstr ""
#: failmap/game/models.py:91
#: failmap/game/models.py
msgid "team"
msgstr ""
#: failmap/game/models.py:92
#: failmap/game/models.py
msgid "teams"
msgstr ""
#: failmap/game/models.py:190
#: failmap/game/models.py
msgid "organisation submission"
msgstr ""
#: failmap/game/models.py:191
#: failmap/game/models.py
msgid "organisation submissions"
msgstr ""
#: failmap/game/models.py:256
#: failmap/game/models.py
msgid "url submission"
msgstr ""
#: failmap/game/models.py:257
#: failmap/game/models.py
msgid "url submissions"
msgstr ""
#: failmap/game/templates/game/base.html:73
#: failmap/game/templates/game/base.html
msgid "Game"
msgstr ""
#: failmap/game/templates/game/base.html:74
#: failmap/game/templates/game/base.html
msgid "Toggle navigation"
msgstr ""
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-19 16:54+0000\n"
"POT-Creation-Date: 2018-11-21 12:10+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -18,15 +18,15 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: failmap/game/forms.py:32
#: failmap/game/forms.py
msgid "This contest does not exist."
msgstr ""
#: failmap/game/forms.py:76
#: failmap/game/forms.py
msgid "Incorrect secret or team. Try again!"
msgstr "Verkeerd geheim of team. Probeer opnieuw!"
#: failmap/game/forms.py:159
#: failmap/game/forms.py
#, fuzzy, python-format
#| msgid ""
#| "This organization %(organization)s already exists in the database for "
......@@ -36,53 +36,53 @@ msgid ""
"type / layer."
msgstr "De organisatie %(organization)s zit al in deze groep."
#: failmap/game/models.py:16
#: failmap/game/models.py
msgid "Contest name"
msgstr "Naam van de wedstrijd"
#: failmap/game/models.py:48
#: failmap/game/models.py
msgid "contest"
msgstr "wedstrijd"
#: failmap/game/models.py:49
#: failmap/game/models.py
msgid "contests"
msgstr "wedstrijden"
#: failmap/game/models.py:61
#: failmap/game/models.py
msgid "Team name"
msgstr "Team-naam"
#: failmap/game/models.py:91
#: failmap/game/models.py
msgid "team"
msgstr "team"
#: failmap/game/models.py:92
#: failmap/game/models.py
msgid "teams"
msgstr "teams"
#: failmap/game/models.py:190
#: failmap/game/models.py
msgid "organisation submission"
msgstr "organisatie inzending"
#: failmap/game/models.py:191
#: failmap/game/models.py
msgid "organisation submissions"
msgstr "organisatie inzendingen"
#: failmap/game/models.py:256
#: failmap/game/models.py
msgid "url submission"
msgstr "url inzending"
#: failmap/game/models.py:257
#: failmap/game/models.py
#, fuzzy
#| msgid "submissions"
msgid "url submissions"
msgstr "url inzendingen"
#: failmap/game/templates/game/base.html:73
#: failmap/game/templates/game/base.html
msgid "Game"
msgstr ""
#: failmap/game/templates/game/base.html:74
#: failmap/game/templates/game/base.html
msgid "Toggle navigation"
msgstr ""
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-19 16:54+0000\n"
"POT-Creation-Date: 2018-11-21 12:10+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -17,65 +17,65 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: failmap/game/forms.py:32
#: failmap/game/forms.py
msgid "This contest does not exist."
msgstr ""
#: failmap/game/forms.py:76
#: failmap/game/forms.py
msgid "Incorrect secret or team. Try again!"
msgstr ""
#: failmap/game/forms.py:159
#: failmap/game/forms.py
#, python-format
msgid ""
"This organization %(organization)s already exists in the database for this "
"type / layer."
msgstr ""
#: failmap/game/models.py:16
#: failmap/game/models.py
msgid "Contest name"
msgstr ""
#: failmap/game/models.py:48
#: failmap/game/models.py
msgid "contest"
msgstr ""
#: failmap/game/models.py:49
#: failmap/game/models.py
msgid "contests"
msgstr ""
#: failmap/game/models.py:61
#: failmap/game/models.py
msgid "Team name"
msgstr ""
#: failmap/game/models.py:91
#: failmap/game/models.py
msgid "team"
msgstr ""
#: failmap/game/models.py:92
#: failmap/game/models.py
msgid "teams"
msgstr ""
#: failmap/game/models.py:190
#: failmap/game/models.py
msgid "organisation submission"
msgstr ""
#: failmap/game/models.py:191
#: failmap/game/models.py
msgid "organisation submissions"
msgstr ""
#: failmap/game/models.py:256
#: failmap/game/models.py
msgid "url submission"
msgstr ""
#: failmap/game/models.py:257
#: failmap/game/models.py
msgid "url submissions"
msgstr ""
#: failmap/game/templates/game/base.html:73
#: failmap/game/templates/game/base.html
msgid "Game"
msgstr ""
#: failmap/game/templates/game/base.html:74
#: failmap/game/templates/game/base.html
msgid "Toggle navigation"
msgstr ""
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-19 16:54+0000\n"
"POT-Creation-Date: 2018-11-21 12:10+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -18,111 +18,111 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: failmap/app/dashboard.py:60
#: failmap/app/dashboard.py
msgid "Content"
msgstr ""
#: failmap/app/dashboard.py:68
#: failmap/app/dashboard.py
msgid "Administration"
msgstr ""
#: failmap/app/dashboard.py:76
#: failmap/app/dashboard.py
msgid "Recent Actions"
msgstr ""
#: failmap/app/dashboard.py:83
#: failmap/app/dashboard.py
msgid "Task Processing Status (WIP)"
msgstr ""
#: failmap/app/dashboard.py:89
#: failmap/app/dashboard.py
msgid "Failmap resources"
msgstr ""
#: failmap/app/dashboard.py:92
#: failmap/app/dashboard.py
msgid "Gitlab Repository"
msgstr ""
#: failmap/app/dashboard.py:97
#: failmap/app/dashboard.py
msgid "Admin repository"
msgstr ""
#: failmap/app/dashboard.py:102
#: failmap/app/dashboard.py
msgid "Failmap Website"
msgstr ""
#: failmap/app/dashboard.py:118
#: failmap/app/dashboard.py
#, python-format
msgid "Recent Actions for %s"
msgstr ""
#: failmap/scanners/models.py:145 failmap/scanners/models.py:146
#: failmap/scanners/models.py
msgid "endpoint"
msgstr ""
#: failmap/scanners/models.py:203 failmap/scanners/models.py:204
#: failmap/scanners/models.py
msgid "urlip"
msgstr ""
#: failmap/scanners/models.py:400 failmap/scanners/models.py:401
#: failmap/scanners/models.py
msgid "tlsscan"
msgstr ""
#: failmap/settings.py:908
#: failmap/settings.py
msgid "🔧 configuration"
msgstr ""
#: failmap/settings.py:911
#: failmap/settings.py
msgid "configuration"
msgstr ""
#: failmap/settings.py:912
#: failmap/settings.py
msgid "map configuration"
msgstr ""
#: failmap/settings.py:913
#: failmap/settings.py
msgid "import regions"
msgstr ""
#: failmap/settings.py:916
#: failmap/settings.py
msgid "🏢 organizations"
msgstr ""
#: failmap/settings.py:925
#: failmap/settings.py
msgid "🔬 scanners"
msgstr ""
#: failmap/settings.py:937
#: failmap/settings.py
msgid "🗺️ map (autogenerated)"
msgstr ""
#: failmap/settings.py:944
#: failmap/settings.py
msgid "🕒 periodic tasks"
msgstr ""
#: failmap/settings.py:966
#: failmap/settings.py
msgid "☁️ hypersh cloud scans"
msgstr ""
#: failmap/settings.py:967
#: failmap/settings.py
msgid "Environment variables"
msgstr ""
#: failmap/settings.py:968
#: failmap/settings.py
msgid "Container configuration"
msgstr ""
#: failmap/settings.py:969
#: failmap/settings.py
msgid "Container instances"
msgstr ""
#: failmap/settings.py:973
#: failmap/settings.py
msgid "👾️ the game"
msgstr ""
#: failmap/settings.py:977
#: failmap/settings.py
msgid "New organizations"
msgstr ""
#: failmap/settings.py:981
#: failmap/settings.py
msgid "New urls"
msgstr ""
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-19 16:54+0000\n"
"POT-Creation-Date: 2018-11-21 12:10+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -18,111 +18,111 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: failmap/app/dashboard.py:60
#: failmap/app/dashboard.py
msgid "Content"
msgstr ""
#: failmap/app/dashboard.py:68
#: failmap/app/dashboard.py
msgid "Administration"
msgstr ""
#: failmap/app/dashboard.py:76
#: failmap/app/dashboard.py
msgid "Recent Actions"
msgstr ""
#: failmap/app/dashboard.py:83
#: failmap/app/dashboard.py
msgid "Task Processing Status (WIP)"
msgstr ""
#: failmap/app/dashboard.py:89
#: failmap/app/dashboard.py
msgid "Failmap resources"
msgstr ""
#: failmap/app/dashboard.py:92
#: failmap/app/dashboard.py
msgid "Gitlab Repository"
msgstr ""
#: failmap/app/dashboard.py:97
#: failmap/app/dashboard.py
msgid "Admin repository"
msgstr ""
#: failmap/app/dashboard.py:102
#: failmap/app/dashboard.py
msgid "Failmap Website"
msgstr ""
#: failmap/app/dashboard.py:118
#: failmap/app/dashboard.py
#, python-format
msgid "Recent Actions for %s"
msgstr ""
#: failmap/scanners/models.py:145 failmap/scanners/models.py:146
#: failmap/scanners/models.py
msgid "endpoint"
msgstr ""
#: failmap/scanners/models.py:203 failmap/scanners/models.py:204
#: failmap/scanners/models.py
msgid "urlip"
msgstr ""
#: failmap/scanners/models.py:400 failmap/scanners/models.py:401
#: failmap/scanners/models.py
msgid "tlsscan"
msgstr ""
#: failmap/settings.py:908
#: failmap/settings.py
msgid "🔧 configuration"
msgstr ""
#: failmap/settings.py:911
#: failmap/settings.py
msgid "configuration"
msgstr ""
#: failmap/settings.py:912
#: failmap/settings.py
msgid "map configuration"
msgstr ""
#: failmap/settings.py:913
#: failmap/settings.py
msgid "import regions"
msgstr ""
#: failmap/settings.py:916
#: failmap/settings.py
msgid "🏢 organizations"
msgstr ""
#: failmap/settings.py:925
#: failmap/settings.py
msgid "🔬 scanners"
msgstr ""
#: failmap/settings.py:937
#: failmap/settings.py
msgid "🗺️ map (autogenerated)"
msgstr ""
#: failmap/settings.py:944
#: failmap/settings.py
msgid "🕒 periodic tasks"
msgstr ""
#: failmap/settings.py:966
#: failmap/settings.py
msgid "☁️ hypersh cloud scans"
msgstr ""
#: failmap/settings.py:967
#: failmap/settings.py
msgid "Environment variables"
msgstr ""
#: failmap/settings.py:968
#: failmap/settings.py
msgid "Container configuration"
msgstr ""
#: failmap/settings.py:969
#: failmap/settings.py
msgid "Container instances"
msgstr ""
#: failmap/settings.py:973
#: failmap/settings.py
msgid "👾️ the game"
msgstr ""
#: failmap/settings.py:977
#: failmap/settings.py
msgid "New organizations"
msgstr ""
#: failmap/settings.py:981
#: failmap/settings.py
msgid "New urls"
msgstr ""
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-19 16:54+0000\n"
"POT-Creation-Date: 2018-11-21 12:10+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -17,111 +17,111 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: failmap/app/dashboard.py:60
#: failmap/app/dashboard.py
msgid "Content"
msgstr ""
#: failmap/app/dashboard.py:68
#: failmap/app/dashboard.py
msgid "Administration"
msgstr ""
#: failmap/app/dashboard.py:76
#: failmap/app/dashboard.py
msgid "Recent Actions"
msgstr ""
#: failmap/app/dashboard.py:83
#: failmap/app/dashboard.py
msgid "Task Processing Status (WIP)"
msgstr ""
#: failmap/app/dashboard.py:89
#: failmap/app/dashboard.py
msgid "Failmap resources"
msgstr ""
#: failmap/app/dashboard.py:92
#: failmap/app/dashboard.py
msgid "Gitlab Repository"
msgstr ""
#: failmap/app/dashboard.py:97
#: failmap/app/dashboard.py
msgid "Admin repository"
msgstr ""
#: failmap/app/dashboard.py:102
#: failmap/app/dashboard.py
msgid "Failmap Website"
msgstr ""
#: failmap/app/dashboard.py:118
#: failmap/app/dashboard.py
#, python-format
msgid "Recent Actions for %s"
msgstr ""
#: failmap/scanners/models.py:145 failmap/scanners/models.py:146
#: failmap/scanners/models.py
msgid "endpoint"
msgstr ""
#: failmap/scanners/models.py:203 failmap/scanners/models.py:204
#: failmap/scanners/models.py
msgid "urlip"
msgstr ""
#: failmap/scanners/models.py:400 failmap/scanners/models.py:401
#: failmap/scanners/models.py
msgid "tlsscan"
msgstr ""
#: failmap/settings.py:908
#: failmap/settings.py
msgid "🔧 configuration"
msgstr ""
#: failmap/settings.py:911
#: failmap/settings.py
msgid "configuration"
msgstr ""
#: failmap/settings.py:912
#: failmap/settings.py
msgid "map configuration"
msgstr ""
#: failmap/settings.py:913
#: failmap/settings.py
msgid "import regions"
msgstr ""
#: failmap/settings.py:916
#: failmap/settings.py
msgid "🏢 organizations"
msgstr ""
#: failmap/settings.py:925
#: failmap/settings.py
msgid "🔬 scanners"
msgstr ""
#: failmap/settings.py:937
#: failmap/settings.py
msgid "🗺️ map (autogenerated)"
msgstr ""
#: failmap/settings.py:944
#: failmap/settings.py
msgid "🕒 periodic tasks"
msgstr ""
#: failmap/settings.py:966
#: failmap/settings.py
msgid "☁️ hypersh cloud scans"
msgstr ""
#: failmap/settings.py:967
#: failmap/settings.py
msgid "Environment variables"
msgstr ""
#: failmap/settings.py:968