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

Ensure that GenericL10n works if the locale files cannot be loaded #17603

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Jan 30, 2024

  • Ensure that localization works in the GENERIC viewer, even if the necessary locale files cannot be loaded.
    This was the behaviour prior to the introduction of Fluent, and it seems worthwhile to keep that (especially since we already bundle the en-US strings anyway).

  • Let the GenericL10n-implementation use the bundled en-US strings directly when no language is provided.

  • Remove the NullL10n-implementation, and simply fallback to GenericL10n, to reduce the maintenance burden of viewer-components localization.

  • Indirectly, given the previous point, stop exporting NullL10n in the viewer-components since it's now removed.
    Note that it was never really intended to be used directly and only existed as a fallback.

Please note: This doesn't affect the Firefox PDF Viewer, thanks to the use of import maps.

@Snuffleupagus Snuffleupagus marked this pull request as draft January 31, 2024 11:21
@mozilla mozilla deleted a comment from moz-tools-bot Jan 31, 2024
@mozilla mozilla deleted a comment from moz-tools-bot Jan 31, 2024
@mozilla mozilla deleted a comment from moz-tools-bot Jan 31, 2024
@mozilla mozilla deleted a comment from moz-tools-bot Jan 31, 2024
@mozilla mozilla deleted a comment from moz-tools-bot Jan 31, 2024
@mozilla mozilla deleted a comment from moz-tools-bot Jan 31, 2024
@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/fb29af72e23a0ae/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/71b26d5d03decd4/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/fb29af72e23a0ae/output.txt

Total script time: 24.75 mins

  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 18
  different first/second rendering: 1

Image differences available at: http://54.241.84.105:8877/fb29af72e23a0ae/reftest-analyzer.html#web=eq.log

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/71b26d5d03decd4/output.txt

Total script time: 41.78 mins

  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: FAILED
  different ref/snapshot: 2

Image differences available at: http://54.193.163.58:8877/71b26d5d03decd4/reftest-analyzer.html#web=eq.log

 - Ensure that localization works in the GENERIC viewer, even if the necessary locale files cannot be loaded.
   This was the behaviour prior to the introduction of Fluent, and it seems worthwhile to keep that (especially since we already bundle the en-US strings anyway).

 - Let the `GenericL10n`-implementation use the *bundled* en-US strings directly when no language is provided.

 - Remove the `NullL10n`-implementation, and simply fallback to `GenericL10n`, to reduce the maintenance burden of viewer-components localization.

 - Indirectly, given the previous point, stop exporting `NullL10n` in the viewer-components since it's now removed.
   Note that it was never really intended to be used directly and only existed as a fallback.

*Please note:* This doesn't affect the Firefox PDF Viewer, thanks to the use of import maps.
@mozilla mozilla deleted a comment from moz-tools-bot Jan 31, 2024
@mozilla mozilla deleted a comment from moz-tools-bot Jan 31, 2024
@Snuffleupagus Snuffleupagus marked this pull request as ready for review January 31, 2024 13:07
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/f610faa8a4a59de/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/f610faa8a4a59de/output.txt

Total script time: 1.23 mins

Published

Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you.

@Snuffleupagus Snuffleupagus merged commit 9588bce into mozilla:master Jan 31, 2024
9 checks passed
@Snuffleupagus Snuffleupagus deleted the GenericL10n-fallback branch January 31, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants