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

[Bug] Localization issue in the ribbon group menu under the three dots on tablets and smaller screens #1081

Open
SeryiEvgenii opened this issue Nov 27, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@SeryiEvgenii
Copy link

We have found issues with the translations of the ribbon menu when it's hidden under the three-dots menu. Whatever language was chosen, it will always be in English. How to fix it?

WebViewer version
11.0.0

The current behavior
Wrong localization under the three-dots menu.

The expected behavior
Localization is the same as in the items not under the three-dots menu.

Steps to reproduce
Open viewer on small screen devices such as tablets or in developer tools. Example on the demo page:
image

@bollain
Copy link
Collaborator

bollain commented Dec 2, 2024

Thanks for this report @SeryiEvgenii, I have verified the issue.

I will add it to our backlog and will schedule it to be part of our next release on January 8th. When it is fixed I will let you know.

@bollain bollain added the bug Something isn't working label Dec 2, 2024
@SeryiEvgenii
Copy link
Author

Thanks a lot, @bollain. We are waiting for this fix

@IV-R
Copy link

IV-R commented Dec 20, 2024

Possible Workarounds:
1. Inspect the Language Initialization Logic:
• Ensure the setLanguage() method is properly configured in your implementation.
• Confirm the language pack files are loaded correctly for smaller screens or tablet-specific configurations.
2. Custom Menu Overwrite:
• Manually override the ribbon menu localization by creating a custom menu and injecting the translations dynamically using WebViewer’s customization APIs.
• Example:

WebViewer({
path: 'lib',
initialDoc: 'example.pdf',
fullAPI: true,
}, document.getElementById('viewer'))
.then(instance => {
const { UI } = instance;
const currentLanguage = 'fr'; // Replace with your localization logic
UI.setLanguage(currentLanguage);
// Inject localized text for the menu
const customMenuItems = {
toolsButton: { label: 'Outils', dataElement: 'toolsButton' },
saveButton: { label: 'Enregistrer', dataElement: 'saveButton' },
};
UI.updateElement('toolsButton', customMenuItems.toolsButton);
UI.updateElement('saveButton', customMenuItems.saveButton);
});

3.	Update to the Latest Release:
•	Check for updates in the WebViewer UI library. If the Apryse team resolves the issue, they will likely include the fix in an upcoming release.
4.	CSS Media Queries:
•	Debug and modify any CSS styles or media queries that might prevent the language-specific classes from being applied correctly in smaller screens or tablets.
5.	Open a Temporary Issue with Apryse Support:
•	Report the workaround you are using and request guidance. They might have a faster resolution internally or provide additional insights.

@bollain
Copy link
Collaborator

bollain commented Jan 9, 2025

hey @SeryiEvgenii - 11.2 is out now and it includes this fix. Let me know once you get a chance to check it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants