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

MBS-13117: Prevent localizing admin-only messages #3091

Merged
merged 13 commits into from
Dec 5, 2023

Commits on Dec 4, 2023

  1. Exclude admin files from source message extraction

    Part of MBS-13117
    yvanzo committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    12cb746 View commit details
    Browse the repository at this point in the history
  2. Skip extracting messages from non-module files

    There is no non-module file **.pl under lib/ anyway,
    but even if there was any it would be for admin only.
    yvanzo committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    2c52f68 View commit details
    Browse the repository at this point in the history
  3. Add ((t)exp.)l[np]_admin for admin messages

    Implement all eventually needed functions to prevent translating
    messages destinated to admin in both admin and non-admin pages,
    as part of MBS-13117.
    yvanzo committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    2fd5dcc View commit details
    Browse the repository at this point in the history
  4. Use l_admin as appropriate in non-admin pages

    Prevent translating messages destinated to admin in non-admin pages,
    as part of MBS-13117.
    yvanzo committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    1b18529 View commit details
    Browse the repository at this point in the history
  5. Use exp.l_admin in admin-only pages

    It is equivalent to expand2react(cleanMsgid) but it makes it explicit
    that it is intentionally to not translate messages destinated to admin,
    as part of MBS-13117.
    yvanzo committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    e5567d3 View commit details
    Browse the repository at this point in the history
  6. Test in CI that admin pages avoid localization

    To prevent any further accidental localization in admin pages,
    this patch makes CI tests to exit with error with a non-empty list of
    lines calling localization functions (l, ln, lp, N_l, N_ln, N_lp).
    yvanzo committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    983dd5d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3c23d62 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e3f425e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    05960f8 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ae72a3a View commit details
    Browse the repository at this point in the history
  11. Drop unused and useless lp_admin

    There will never be any context needed for not translatable messages.
    yvanzo committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    4e7fdb3 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    7e2e74e View commit details
    Browse the repository at this point in the history

Commits on Dec 5, 2023

  1. Preserve some messages after commit 05960f8

    The column labels for languages and scripts were exposed to admins only
    but still translated. These messages would be removed from translations
    after the previous commit 05960f8 from the following files:
    
    - root/admin/attributes/Attribute.js
    - root/admin/attributes/Language.js
    - root/admin/attributes/Script.js
    
    However those will likely be needed again after resolving MBS-11178.
    
    This patch preserves column labels and their translations by temporarily
    defining these in a unused file until MBS-11178 gets resolved.
    yvanzo committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    e76ec04 View commit details
    Browse the repository at this point in the history