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

Improve documentation for plugin translation, advice a way to ensure unique translation keys #3974

Open
lutzhelm opened this issue Nov 4, 2024 · 0 comments
Assignees

Comments

@lutzhelm
Copy link
Contributor

lutzhelm commented Nov 4, 2024

Mirodor allows the translation of plugins by providing a translations object via the config property of the plugin object, e.g.

https://github.com/ProjectMirador/mirador-image-tools/blob/9556d016f238f7bf2fa09f0f155907391a1543ff/src/plugins/miradorImageToolsPlugin.js#L23-L25

  1. We should add this info to the plugin documentation in the wiki.
  2. Any two different plugins might accidentally use the same key for different translations, resulting in one plugin overriding the other plugin's translation. Additionally, we might add new translation keys to the core Mirador that already exist within any third party plugin, resulting in overriding the Mirador core translation. Therefore, we should advice the use of plugin specific prefixes or namespaces to ensure unique translation keys.
@lutzhelm lutzhelm self-assigned this Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant