Commit d1777e39 authored by nvazquez's avatar nvazquez
Browse files

Add internationalization test to the CI pipeline

parent 0cbf2d80
Pipeline #3648 passed with stages
in 10 minutes and 31 seconds
......@@ -15,6 +15,26 @@ job-compile:
- examples/
- tests/
stage: test
# Generate latest .pot file with every key that needs translation
- sh -g
# Add a new language. A .po file is created. Translations need to be added to the .po file
- sh -a pt
# Translations into the .po file
- sed -i '/msgid "No File"/{n;s/msgstr ""/msgstr "Nao Arquivo"/;}' internationalization/pt.po
- sed -i '/msgid "exit"/{n;s/msgstr ""/msgstr "sair"/;}' internationalization/pt.po
- sed -i '/msgid "Bye!!"/{n;s/msgstr ""/msgstr "Tchau!!"/;}' internationalization/pt.po
# Generate .mo file from the translations .po file
- sh -m pt
# Invoke MateFun using the new language and verify translations
- LANGUAGE=pt dist/build/MateFun/MateFun <<< $'!sair' | grep "Nao Arquivo"
# Test template
.test-language: &matefun-tests
stage: test
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment