Skip to content

Conversation

SteveLauC
Copy link
Member

What does this PR do

This PR fixes some errors found by our checker:

$ ./topgrade_i18n_locale_file_checker --locale-file ../topgrade/locales/app.yml --rust-src-to-check ../topgrade/src
Errors Found:
  UseOfKeysDoNotExist
    file '../topgrade/src/self_update.rs' / line '52' / column '27' / key 'Respawning...'
    file '../topgrade/src/steps/os/windows.rs' / line '202' / column '21' / key 'Could not find Topgrade in any WSL disribution'
    file '../topgrade/src/steps/os/windows.rs' / line '209' / column '20' / key 'Windows Update'
    file '../topgrade/src/main.rs' / line '488' / column '19' / key '\n(R)eboot\n(S)hell\n(Q)uit'

For the first 3 errors, they are keys that have not been added to our locale file. The last one is interesting, we already have it in the locale file:

"\n(R)eboot\n(S)hell\n(Q)uit":
  en: "\n(R)eboot\n(S)hell\n(Q)uit"

But it was enclosed with double quotes, which treated the \n as a new line rather than a string literal, using single quotes fixes the issue.

Standards checklist

  • The PR title is descriptive.
  • I have read CONTRIBUTING.md
  • Optional: I have tested the code myself

For new steps

  • Optional: Topgrade skips this step where needed
  • Optional: The --dry-run option works with this step
  • Optional: The --yes option works with this step if it is supported by
    the underlying command

If you developed a feature or a bug fix for someone else and you do not have the
means to test it, please tag this person here.

@SteveLauC SteveLauC merged commit a021441 into topgrade-rs:main Oct 4, 2024
12 checks passed
@SteveLauC SteveLauC deleted the chore/locale_single_quote branch October 4, 2024 04:33
@AThePeanut4 AThePeanut4 mentioned this pull request Jul 17, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant