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

[WIP] Convert private WebUI strings to i18next #20610

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Commits on Mar 25, 2024

  1. Convert translatable strings part1

    Search: (<((?!class=).)*?)>QBT_TR\((.+?)\)QBT_TR(\[CONTEXT=.+?\])?
    Replace: $1 class="qbt-translatable" data-i18n="$3">$3
    File glob: src/webui/www/private/**/*.html
    sledgehammer999 committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    93a4b98 View commit details
    Browse the repository at this point in the history
  2. Convert translatable strings part2

    Search: (<.+?class=".+?)(".*?)>QBT_TR\((.+?)\)QBT_TR(\[CONTEXT=.+?\])?
    Replace: $1 qbt-translatable$2 data-i18n="$3">$3
    File glob: src/webui/www/private/**/*.html
    sledgehammer999 committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    ec528f2 View commit details
    Browse the repository at this point in the history
  3. Convert translatable strings part3

    Search: (<(?:(?!class=).)+?)(\S+?)="QBT_TR\((.+?)\)QBT_TR(?:\[CONTEXT=.+?\])?"
    Replace: $1class="qbt-translatable" data-i18n="[$2]$3" $2="$3"
    File glob: src/webui/www/private/**/*.html
    sledgehammer999 committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    2c6f63d View commit details
    Browse the repository at this point in the history
  4. Convert translatable strings part4

    Search: (<.+?class=".+?)(".*?)(\S+?)="QBT_TR\((.+?)\)QBT_TR(?:\[CONTEXT=.+?\])?"
    Replace: $1 qbt-translatable$2data-i18n="[$3]$4" $3="$4"
    File glob: src/webui/www/private/**/*.html
    sledgehammer999 committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    74274e7 View commit details
    Browse the repository at this point in the history
  5. Convert translatable strings part5

    Search: (<.+?data-i18n=".+?)(".*?)(\S+?)="QBT_TR\((.+?)\)QBT_TR(?:\[CONTEXT=.+?\])?"
    Replace: $1;[$3]$4$2$3="$4"
    File glob: src/webui/www/private/**/*.html
    sledgehammer999 committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    45f1891 View commit details
    Browse the repository at this point in the history
  6. Convert translatable strings part6

    Search: (["'])QBT_TR\((.+?)\)QBT_TR(?:\[CONTEXT=.+?\])?\1
    Replace: i18next.t($1$2$1)
    File glob: src/webui/www/private/**/*.html
    sledgehammer999 committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    e45c36d View commit details
    Browse the repository at this point in the history
  7. Convert translatable strings part7

    Manual conversion to template literal
    
    Search: (["'])QBT_TR\((.+?)\)QBT_TR(?:\[CONTEXT=.+?\])?\s*?\1
    Replace: i18next.t($1$2$1)
    File glob: src/webui/www/private/**/*.html
    sledgehammer999 committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    9cc3f16 View commit details
    Browse the repository at this point in the history
  8. Convert translatable strings part8

    Search: `(.*?)QBT_TR\((.+?)\)QBT_TR(?:\[CONTEXT=.+?\])?
    Replace: `$1\${i18next.t('$2')}
    File glob: src/webui/www/private/**/*.html
    sledgehammer999 committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    709bee0 View commit details
    Browse the repository at this point in the history
  9. Convert translatable strings part9

    Search: (["'])(\s*? )?QBT_TR\((.+?)\)QBT_TR(?:\[CONTEXT=.+?\])?((\\n)*?)\1
    Replace: `$2${i18next.t($1$3$1)}$4`
    File glob: src/webui/www/private/**/*.html
    sledgehammer999 committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    ccb2cce View commit details
    Browse the repository at this point in the history
  10. Convert translatable strings part10

    Search: (["'])QBT_TR\((.+?)\)QBT_TR(?:\[CONTEXT=.+?\])?\1
    Replace: i18next.t($1$2$1)
    File glob: src/webui/www/private/**/*.js
    sledgehammer999 committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    c4d67dd View commit details
    Browse the repository at this point in the history
  11. Convert translatable strings part11

    Search: (["'])(\s*? )?QBT_TR\((.+?)\)QBT_TR(?:\[CONTEXT=.+?\])?\1
    Replace: `$2${i18next.t($1$3$1)}`
    File glob: src/webui/www/private/**/*.js
    sledgehammer999 committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    e16ca08 View commit details
    Browse the repository at this point in the history
  12. Convert translatable strings part12

    Manual conversion
    sledgehammer999 committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    3179e29 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    e205291 View commit details
    Browse the repository at this point in the history