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

i18n - extracting new, pulling from tx #10325

Merged
merged 4 commits into from
Sep 18, 2024

Conversation

ColeHiggins2
Copy link
Contributor

No description provided.

@ColeHiggins2 ColeHiggins2 self-assigned this Sep 17, 2024
@pr-processor pr-processor bot added Not yet reviewed Stable branch PRs that are opened against a stable branch. Usually a cherry pick Waiting on contributor labels Sep 17, 2024
@github-actions github-actions bot added the Legacy JS PRs making changes in the legacy Javascript stack label Sep 17, 2024
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Can you cherry pick #10326 and rebase on top of that? I'd expect it to pull all translations then.

ekohl and others added 2 commits September 18, 2024 09:54
The Ruby gettext library wants the .po.time_stamp file to be at least as
new as the .po file. If it doesn't exist or is older, it will remove the
.edit.po file and then copy the .po file to .edit.po. In practice the
Makefile doesn't guarantee this, causing translations to be ignored.

A more concrete example what ends up happening:

    make -C locale tx-pull # updates $domain.edit.po

    # This all assumes $domain.po exists
    if [ ! -f $domain.po.time_stamp ] -o [ $domain.po -nt $domain.po.time_stamp ] ; then
        rm -f $domain.edit.po
    fi
    if [ ! -f $domain.edit.po ] ; then
        cp $domain.po $domain.edit.po

        # Merge in the new messages from the template
        msgmerge --update --sort-by-file --no-wrap $domain.edit.po $domain.pot
        if [ -f $domain.po ] -a [ $domain.po -nt $domain.edit.po ] ; then
            msgmerge --output $domain.edit.po --sort-by-file --no-wrap --no-obsolete-entries $domain.po $domain.edit.po
        fi
    fi

This ensures that $domain.po.time_stamp is always the same mtime as
$domain.po which prevents the gettext library from removing the updated
$domain.edit.po file.

It means there is no message merging and we rely on Transifex for doing
that part for us.
@ekohl
Copy link
Member

ekohl commented Sep 18, 2024

I had one small bug that only affected this repo (ekohl/transync@2e9bf74):

Uploading foreman in fr
  243 created; 0 updated
Uploading foreman in ja
  289 created; 0 updated
Uploading foreman in ko
  112 created; 50 updated
Uploading foreman in zh_CN
  288 created; 268 updated

Please pull again.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

I think the notes on French can be summarized as lots of spacing errors.

For Korean I saw a lot of Context|value being filled in as literal. I haven't flagged all of them because it'd be too much work.

I do see that a lot of string interpolation issues (especially in Chinese) were fixed, so that's good.

What I really don't know the escaping of slashes. It looks really inconsistent and I wonder how that ends up working at runtime, but I don't have time to investigate that before my PTO.

For now I lean to merging this to get the 3.12 release train rolling and address the issues in a patch release. Overall it's probably still an improvement.

@@ -435,7 +437,7 @@ msgid "A Smart Proxy with an External IPAM feature enabled must be selected in t
msgstr "Un Smart Proxy avec une fonctionnalité IPAM externe activée doit être sélectionné dans l'onglet Proxies."

msgid "A class representing %s object"
msgstr ""
msgstr "Une classe représentant%s objet"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
msgstr "Une classe représentant%s objet"
msgstr "Une classe représentant %s objet"


msgid "Change the host group of {hosts}. Some hosts may already be in your chosen host group."
msgstr ""
msgstr "Changer le groupe d’hôtes de{hosts} Certains hôtes peuvent déjà faire partie du groupe d'hôtes que vous avez choisi."
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
msgstr "Changer le groupe d’hôtes de{hosts} Certains hôtes peuvent déjà faire partie du groupe d'hôtes que vous avez choisi."
msgstr "Changer le groupe d’hôtes de {hosts}. Certains hôtes peuvent déjà faire partie du groupe d'hôtes que vous avez choisi."

@@ -1574,10 +1577,10 @@ msgid "Choose a server type"
msgstr "Sélectionner un type de serveur"

msgid "Choose an action that will be performed on {hosts}."
msgstr ""
msgstr "Choisissez une action qui sera effectuée sur{hosts} ."
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
msgstr "Choisissez une action qui sera effectuée sur{hosts} ."
msgstr "Choisissez une action qui sera effectuée sur {hosts}."


msgid "Delete report for %s?"
msgstr "Supprimer les rapports concernant %s ?"

msgid "Delete report?"
msgstr ""
msgstr "Souhaitez-vous supprimer le rapport ?"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
msgstr "Souhaitez-vous supprimer le rapport ?"
msgstr "Souhaitez-vous supprimer le rapport?"

@@ -2624,13 +2627,13 @@ msgid "Delete realm entry for %s"
msgstr "Supprimer l'entrée du domaine %s"

msgid "Delete report"
msgstr ""
msgstr "Supprimer le rapport"

msgid "Delete report for %s?"
msgstr "Supprimer les rapports concernant %s ?"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
msgstr "Supprimer les rapports concernant %s ?"
msgstr "Supprimer les rapports concernant %s?"


msgid "Please contact your administrator, the request id for finding the logs: \"%s\""
msgstr "请与管理员联系,以找到日志的请求ID:“%s”"
msgstr "请与管理员联系,以找到日志的请求ID:\"%s\""
Copy link
Member

Choose a reason for hiding this comment

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

Like earlier, I wonder if this shouldn't be

Suggested change
msgstr "请与管理员联系,以找到日志的请求ID:\"%s\""
msgstr "请与管理员联系,以找到日志的请求ID:\\\"%s\\\""

@@ -7862,7 +7854,7 @@ msgstr[0] "提示:<strong>选择了一个主机 </strong>"

msgid "Reminder: <strong> One host is selected </strong> for query filter %{query}"
msgid_plural "Reminder: <strong> All %{count} hosts are selected </strong> for query filter %{query}"
msgstr[0] "提示:<strong>选择了一个主机</strong>用于查询过滤器 %{query}"
msgstr[0] "提示:<strong>选择了一个主机</strong>用于查询过滤器%{query}"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
msgstr[0] "提示:<strong>选择了一个主机</strong>用于查询过滤器%{query}"
msgstr[0] "提示:<strong>选择了一个主机</strong>用于查询过滤器 %{query}"

@@ -7933,7 +7924,7 @@ msgid "Rendering failed, no input with name \"%{s}\" for input macro found"
msgstr "处理失败,输入宏没有找到名为 \"%{s}\" 的输入"

msgid "Rendering failed, one or more unknown columns specified for ordering - \"%{unknown}\""
msgstr "呈现失败,指定了一个或多个用于排序的未知列 - %{unknown}"
msgstr "呈现失败,指定了一个或多个用于排序的未知列 - \"%{unknown}\""
Copy link
Member

Choose a reason for hiding this comment

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

Same quoting question here

Suggested change
msgstr "呈现失败,指定了一个或多个用于排序的未知列 - \"%{unknown}\""
msgstr "呈现失败,指定了一个或多个用于排序的未知列 - \\\"%{unknown}\\\""


msgid "Total hosts count"
msgstr "总主机数"

msgid "Total of one host"
msgid_plural "Total of %{hosts} hosts"
msgstr[0] "总共 %{hosts} 台主机"
msgstr[0] "总共一个主机"
Copy link
Member

Choose a reason for hiding this comment

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

This loses the interpolation string which I think can break at runtime.

@@ -10490,7 +10481,7 @@ msgid "Unknown status: %s"
msgstr "未知状态:%s"

msgid "Unkown '%{klass}' resource class"
Copy link
Member

Choose a reason for hiding this comment

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

Well, there's a typo here as well: #10329

@ekohl ekohl merged commit e3a6481 into theforeman:3.12-stable Sep 18, 2024
50 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Legacy JS PRs making changes in the legacy Javascript stack Stable branch PRs that are opened against a stable branch. Usually a cherry pick Waiting on contributor
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants