-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
hack/update-translations.sh: Improve backslash handling #114053
hack/update-translations.sh: Improve backslash handling #114053
Conversation
Please note that we're already in Test Freeze for the Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Mon Nov 21 21:28:31 UTC 2022. |
/hold for review |
/sig cli |
/retest |
The call to `i18n.LoadTranslations` needs to occur on init so that package-level variables that call `i18n.T()` to initialize their values will be able to receive the translated string. Added new integration tests to test help output translation.
afa14d1
to
34d980e
Compare
/assign @deads2k Let me know if you think I should remove the |
/unhold I don't think I need to hold this since I'm not an approver in the hack directory. |
@soltysh thoughts on this change? It looks like you are an approver in I think we either need to make this change, or remove the I feel like this more generalized regex should work and allow us not to have to worry about |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/triage accepted |
/remove-lifecycle rotten |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
LGTM label has been added. Git tree hash: 0a8459533729f36769611545a47aa16080b9cbd2
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brianpursley, soltysh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Replace specific backslash escape handling with generalized backslash handling.
Fixes bug where
\
would not be escaped when it should, resulting inhack/update-translations.sh
failing or producing the wrong output.Which issue(s) this PR fixes:
Fixes kubernetes/kubectl#1326
Special notes for your reviewer:
I regenerated
template.pot
now that the script works again. This picked up a bunch of changes since it hasn't been updated in 17 months.This doesn't update translations, but the updated
template.pot
enables translations to be updated again as it contains the updated msgid keys.Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: