Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix brazilian portuguese translations #2803

Merged
merged 6 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion debian/po/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ MOS=$(POS:.po=.mo)

%.mo: %.po
mkdir -p usr/share/locale/$*/LC_MESSAGES
msgfmt $< -o usr/share/locale/$*/LC_MESSAGES/ubuntu-pro.mo
msgfmt --check-format $< -o usr/share/locale/$*/LC_MESSAGES/ubuntu-pro.mo

build: $(MOS)
61 changes: 30 additions & 31 deletions debian/po/pt_BR.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-17 19:30-0300\n"
"POT-Creation-Date: 2023-10-27 11:44-0300\n"
"PO-Revision-Date: 2023-09-25 12:29-0400\n"
"Last-Translator: Lucas Moura <[email protected]>\n"
"Language-Team: Brazilian Portuguese <[email protected]."
Expand Down Expand Up @@ -201,7 +201,7 @@ msgstr "Saiba mais sobre o Ubuntu Pro para a versão 16.04 no Azure em %s"
#: ../../apt-hook/json-hook.cc:412
#, c-format
msgid "Learn more about Ubuntu Pro for 16.04 at %s"
msgstr "Saiba mais sobre o Ubuntu Pro para a versão 16.04 em"
msgstr "Saiba mais sobre o Ubuntu Pro para a versão 16.04 em %s"

#: ../../apt-hook/json-hook.cc:423
#, c-format
Expand All @@ -211,7 +211,7 @@ msgstr "Saiba mais sobre o Ubuntu Pro para a versão 18.04 no Azure em %s"
#: ../../apt-hook/json-hook.cc:432
#, c-format
msgid "Learn more about Ubuntu Pro for 18.04 at %s"
msgstr "Saiba mais sobre o Ubuntu Pro para a versão 18.04 em"
msgstr "Saiba mais sobre o Ubuntu Pro para a versão 18.04 em %s"

#: ../../apt-hook/json-hook.cc:443
#, c-format
Expand Down Expand Up @@ -278,9 +278,8 @@ msgid "Are you sure? (y/N) "
msgstr "Tem certeza? (y/N) "

#: ../../uaclient/messages/__init__.py:48
#, fuzzy
msgid "Do you want to proceed? (y/N) "
msgstr "Tem certeza? (y/N) "
msgstr "Você quer prosseguir? (y/N) "

#: ../../uaclient/messages/__init__.py:50
msgid "Interrupt received; exiting."
Expand Down Expand Up @@ -347,7 +346,6 @@ msgid "Error while trying to parse a yaml file using 'yaml' from {path}"
msgstr "Erro ao analisar um arquivo yaml usando 'yaml' em {path}"

#: ../../uaclient/messages/__init__.py:92
#, fuzzy
msgid ""
"snapd does not have a wait command.\n"
"Enabling Livepatch can fail under this scenario.\n"
Expand All @@ -359,7 +357,7 @@ msgstr ""
"novamente."

#: ../../uaclient/messages/__init__.py:101
#, fuzzy, python-brace-format
#, python-brace-format
msgid ""
" A new version is available: {version}\n"
"Please run:\n"
Expand Down Expand Up @@ -465,12 +463,11 @@ msgid "The following package(s) will be REMOVED:"
msgstr ""

#: ../../uaclient/messages/__init__.py:148
#, fuzzy
msgid "The following package(s) will be reinstalled from the archive:"
msgstr "Você não tem pacotes instalados de terceitos."
msgstr "O(s) pacote(s) à seguir serão reinstalados:"

panlinux marked this conversation as resolved.
Show resolved Hide resolved
#: ../../uaclient/messages/__init__.py:159
#, fuzzy, python-brace-format
#, python-brace-format
msgid ""
"*Your Ubuntu Pro subscription has EXPIRED*\n"
"{{pkg_num}} additional security update(s) require Ubuntu Pro with "
Expand All @@ -482,18 +479,18 @@ msgid_plural ""
"'{{service}}' enabled.\n"
"Renew your service at {url}"
msgstr[0] ""
"*Sua assinatura do Ubuntu PRO EXPIROU*\n"
"{{pkg_num}} atualizações de segurança necessitam do ubuntu Pro com "
"*Sua assinatura do Ubuntu Pro EXPIROU*\n"
"{{pkg_num}} atualização de segurança necessitam do ubuntu Pro com "
"'{{service}}' habilitado.\n"
"Renove sua assinatura em {url}"
msgstr[1] ""
"*Sua assinatura do Ubuntu PRO EXPIROU*\n"
"*Sua assinatura do Ubuntu Pro EXPIROU*\n"
"{{pkg_num}} atualizações de segurança necessitam do ubuntu Pro com "
"'{{service}}' habilitado.\n"
"Renove sua assinatura em {url}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ubuntu Pro is lowercase in the translation, but Ubuntu Pro in the original text. Also, wasn't this translation meant to support singular and plural texts? Just wondering because both in the original string and in the translated one, it's plural (or at least using (s)).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, sorry, just saw it now, but the translated string is using PRO instead of Pro.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I have solved the issue


#: ../../uaclient/messages/__init__.py:172
#, fuzzy, python-brace-format
#, python-brace-format
msgid ""
"CAUTION: Your Ubuntu Pro subscription will expire in {{remaining_days}} "
"day.\n"
Expand All @@ -516,7 +513,7 @@ msgstr[1] ""
"continuidade da cobertura de segurança para suas aplicações."

#: ../../uaclient/messages/__init__.py:185
#, fuzzy, python-brace-format
#, python-brace-format
msgid ""
"CAUTION: Your Ubuntu Pro subscription expired on {{expired_date}}.\n"
"Renew your subscription at {url} to ensure\n"
Expand Down Expand Up @@ -1318,7 +1315,7 @@ msgid ""
"repository until {date}."
msgstr ""
"Esta máquina está recebendo patches de segurança para o repositório\n"
"Main/Restricted do Ubuntu até"
"Main/Restricted do Ubuntu até {date}"

#: ../../uaclient/messages/__init__.py:703
msgid "This machine is attached to an Ubuntu Pro subscription."
Expand Down Expand Up @@ -2150,7 +2147,7 @@ msgstr ""

#: ../../uaclient/messages/__init__.py:1164
msgid "Common Criteria EAL2 Provisioning Packages"
msgstr ""
msgstr "Pacotes de Provisionamento do Common Criteria EAL2"

#: ../../uaclient/messages/__init__.py:1166
msgid ""
Expand Down Expand Up @@ -2182,7 +2179,7 @@ msgstr ""

#: ../../uaclient/messages/__init__.py:1182
msgid "Security compliance and audit tools"
msgstr ""
msgstr "Ferramentas de auditoria e conformidade de segurança"

#: ../../uaclient/messages/__init__.py:1184
#, python-brace-format
Expand Down Expand Up @@ -2214,7 +2211,7 @@ msgstr ""

#: ../../uaclient/messages/__init__.py:1205
msgid "Expanded Security Maintenance for Applications"
msgstr ""
msgstr "Manutenção de Segurança Expandida para Aplicações"

#: ../../uaclient/messages/__init__.py:1208
#, python-brace-format
Expand All @@ -2230,7 +2227,7 @@ msgstr ""

#: ../../uaclient/messages/__init__.py:1219
msgid "Expanded Security Maintenance for Infrastructure"
msgstr ""
msgstr "Manutenção de Segurança Expandida para Infraestrutura"

#: ../../uaclient/messages/__init__.py:1222
#, python-brace-format
Expand All @@ -2251,7 +2248,7 @@ msgstr ""

#: ../../uaclient/messages/__init__.py:1232
msgid "NIST-certified FIPS crypto packages"
msgstr ""
msgstr "Pacotes FIPS de criptografia certificados pelo NIST"

#: ../../uaclient/messages/__init__.py:1234
#, python-brace-format
Expand Down Expand Up @@ -2350,9 +2347,10 @@ msgid "FIPS Updates"
msgstr ""

#: ../../uaclient/messages/__init__.py:1320
#, fuzzy
msgid "FIPS compliant crypto packages with stable security updates"
msgstr "Pacotes instalados com atualizações disponíveis por {service}:"
msgstr ""
"Pacotes de criptografia compatíveis com FIPS com atualizações de segurança "
"estáveis"

panlinux marked this conversation as resolved.
Show resolved Hide resolved
#: ../../uaclient/messages/__init__.py:1323
#, python-brace-format
Expand All @@ -2370,6 +2368,7 @@ msgstr ""
#: ../../uaclient/messages/__init__.py:1331
msgid "Preview of FIPS crypto packages undergoing certification with NIST"
msgstr ""
"Prévia de pacotes FIPS de criptografia em processo de certificação pelo NIST"

#: ../../uaclient/messages/__init__.py:1334
msgid ""
Expand All @@ -2395,7 +2394,7 @@ msgstr ""

#: ../../uaclient/messages/__init__.py:1352
msgid "Management and administration tool for Ubuntu"
msgstr ""
msgstr "Ferramenta de gerenciamento e administração para o Ubuntu"

#: ../../uaclient/messages/__init__.py:1355
#, python-brace-format
Expand All @@ -2416,7 +2415,7 @@ msgstr ""

#: ../../uaclient/messages/__init__.py:1369
msgid "Canonical Livepatch service"
msgstr ""
msgstr "Serviço de Livepatch da Canonical"

#: ../../uaclient/messages/__init__.py:1371
#, python-brace-format
Expand Down Expand Up @@ -2466,7 +2465,7 @@ msgstr ""

#: ../../uaclient/messages/__init__.py:1398
msgid "Ubuntu kernel with PREEMPT_RT patches integrated"
msgstr ""
msgstr "Kernel do Ubuntu com patches PREEMPT_RT integrados"

#: ../../uaclient/messages/__init__.py:1401
msgid ""
Expand All @@ -2483,23 +2482,23 @@ msgstr ""

#: ../../uaclient/messages/__init__.py:1411
msgid "Generic version of the RT kernel (default)"
msgstr ""
msgstr "Versão genérica do kernel RT (padrão)"

#: ../../uaclient/messages/__init__.py:1413
msgid "Real-time NVIDIA Tegra Kernel"
msgstr ""

#: ../../uaclient/messages/__init__.py:1415
msgid "RT kernel optimized for NVIDIA Tegra platform"
msgstr ""
msgstr "Kernel RT otimizado para a plataforma NVIDIA Tegra"

#: ../../uaclient/messages/__init__.py:1417
msgid "Real-time Intel IOTG Kernel"
msgstr ""

#: ../../uaclient/messages/__init__.py:1419
msgid "RT kernel optimized for Intel IOTG platform"
msgstr ""
msgstr "Kernel RT otimizado para a plataforma Intel IOTG"

#: ../../uaclient/messages/__init__.py:1422
#, python-brace-format
Expand Down Expand Up @@ -2537,7 +2536,7 @@ msgstr ""

#: ../../uaclient/messages/__init__.py:1450
msgid "Security Updates for the Robot Operating System"
msgstr ""
msgstr "Atualizações de Segurança para o Robot Operating System"

#: ../../uaclient/messages/__init__.py:1452
#, python-brace-format
Expand All @@ -2558,7 +2557,7 @@ msgstr ""

#: ../../uaclient/messages/__init__.py:1463
msgid "All Updates for the Robot Operating System"
msgstr ""
msgstr "Todas as Atualizações para o Robot Operating System"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Atualizações/atualizações

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept the uppercase to match the uppercase in All Updates.
I think we must have a policy for this, because it is not consistent across messages


#: ../../uaclient/messages/__init__.py:1466
#, python-brace-format
Expand Down
2 changes: 1 addition & 1 deletion debian/po/ubuntu-pro.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-17 19:30-0300\n"
"POT-Creation-Date: 2023-10-27 11:44-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
94 changes: 94 additions & 0 deletions sru/release-30/test-status-output-when-translated.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
#!/bin/bash
set -e

series=$1
token=$2
install_from=$3 # either path to a .deb, or 'staging', or 'proposed'
translation_deb=$4

name=$series-dev

function cleanup {
lxc delete $name --force
}

function on_err {
echo -e "Test Failed"
# cleanup
exit 1
}
trap on_err ERR


lxc launch ubuntu-daily:$series $name
sleep 5

# Install latest ubuntu-advantage-tools
lxc exec $name -- apt-get update > /dev/null
lxc exec $name -- apt-get install -y ubuntu-advantage-tools > /dev/null
echo -e "\n* Latest u-a-t is installed"
echo "###########################################"
lxc exec $name -- apt-cache policy ubuntu-advantage-tools
echo -e "###########################################\n"

# Attach with the current ubuntu-advantage-tools package
lxc exec $name -- pro attach $token &> /dev/null
echo -e "\n* Pro is attached, esm-infra is enabled"
echo "###########################################"
lxc exec $name -- pro status --wait
echo -e "###########################################\n"

# Upgrade u-a-t to new version
# ----------------------------------------------------------------
if [ $install_from == 'staging' ]; then
lxc exec $name -- sudo add-apt-repository ppa:ua-client/staging -y > /dev/null
lxc exec $name -- apt-get update > /dev/null
lxc exec $name -- apt-get install ubuntu-advantage-tools -y > /dev/null
elif [ $install_from == 'proposed' ]; then
lxc exec $name -- sh -c "echo \"deb http://archive.ubuntu.com/ubuntu $series-proposed main\" | tee /etc/apt/sources.list.d/proposed.list"
lxc exec $name -- apt-get update > /dev/null
lxc exec $name -- apt-get install ubuntu-advantage-tools -y > /dev/null
else
lxc file push $install_from $name/new-ua.deb
lxc file push $translation_deb $name/translation.deb
lxc exec $name -- dpkg -i /new-ua.deb > /dev/null
lxc exec $name -- dpkg -i /translation.deb > /dev/null
fi
# ----------------------------------------------------------------
echo -e "\n* u-a-t now has the change"
echo "###########################################"
lxc exec $name -- apt-cache policy ubuntu-advantage-tools
echo -e "###########################################\n"

echo -e "\n* Check translated status"
echo "###########################################"
lxc exec $name -- sh -c "LANGUAGE=pt_BR.UTF-8 pro status"
echo -e "###########################################\n"

echo -e "\n* Check unstranslated status"
echo "###########################################"
lxc exec $name -- pro status
echo -e "###########################################\n"

echo -e "\n* Check translated simulated status"
echo "###########################################"
lxc exec $name -- sh -c "LANGUAGE=pt_BR.UTF-8 pro status --simulate-with-token $token"
echo -e "###########################################\n"

echo -e "\n* Check unstranslated status"
echo "###########################################"
lxc exec $name -- pro status --simulate-with-token $token
echo -e "###########################################\n"

echo -e "\n* Check unattached translated status"
echo "###########################################"
lxc exec $name -- pro detach --assume-yes
lxc exec $name -- sh -c "LANGUAGE=pt_BR.UTF-8 pro status"
echo -e "###########################################\n"

echo -e "\n* Check unstranslated unattached status"
echo "###########################################"
lxc exec $name -- pro status
echo -e "###########################################\n"

cleanup
Loading
Loading