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

Add missing localization strings #983

Merged
merged 17 commits into from
Dec 9, 2020
Merged

Conversation

hishamco
Copy link
Contributor

@hishamco hishamco commented Dec 6, 2020

I'm working to localize Oqtane in Arabic, this PR should fix all the missing localizations strings

@sbwalker
Copy link
Member

sbwalker commented Dec 7, 2020

since this is still a Draft let me know when I can merge it

@hishamco
Copy link
Contributor Author

hishamco commented Dec 7, 2020

Sure, I'm trying to translate a full installation of Oqtane

@hishamco hishamco marked this pull request as ready for review December 9, 2020 13:40
@hishamco
Copy link
Contributor Author

hishamco commented Dec 9, 2020

@sbwalker we ready to merge, just 2 or 3 items that I should follow into other separated small PRs:

  • Localize ModuleMessage

  • Localize ModuleTitle

  • Localize ModuleInstance which is I don't know where it's used

@sbwalker
Copy link
Member

sbwalker commented Dec 9, 2020

We had a conversation about ModuleMessage previously and I thought we concluded that it could not be localized because it displays dynamic content? Module developers should use the AddModuleMessage() helper method as part of ModuleBase - which passes text to the ModuleInstance component and displays the message.

ModuleTitle would not be localized as its sole purpose is to display information from the database - not static content.

ModuleInstance is a component that is part of the dynamic page compositing engine. There is some static content that is displayed on various error conditions.

@hishamco
Copy link
Contributor Author

hishamco commented Dec 9, 2020

We had a conversation about ModuleMessage previously and I thought we concluded that it could not be localized because it displays dynamic content?

Ya, we can choose one of two options:

  1. Localize message inside ModuleMessage

  2. Make localization outside ModuleMessage

The advantages for first option is all the resource strings will be in one file ModuleMessage.{culture}.resx, no need to localize strings outside

The advantages for the second option is the Resx files will follow the regular convention, all the resources strings will be in the place where the message are set

ModuleTitle would not be localized as its sole purpose is to display information from the database - not static content.

Aha, no need

ModuleInstance is a component that is part of the dynamic page compositing engine. There is some static content that is displayed on various error conditions.

Thanks for clarification

@sbwalker
Copy link
Member

sbwalker commented Dec 9, 2020

@hishamco if you consider the fact that Oqtane is a modular framework - and the primary development approach is to create modules EXTERNAL to the framwork - then I don't see how localizing messages inside of ModuleMessage would actually work? If an external module wants to localize their messages then isn't the only solution for localization to be managed outside of ModuleMessage? Maybe I am missing something?

@hishamco
Copy link
Contributor Author

hishamco commented Dec 9, 2020

then I don't see how localizing messages inside of ModuleMessage would actually work?

Good point, so I think localize the strings outside will be better to support both Oqtane Framework & External modules, I think I will change how the logging is localized to follow the same principle

Thanks

@hishamco
Copy link
Contributor Author

hishamco commented Dec 9, 2020

So let us merge this, I will push 2 other PRs for ModulesMessage and logging ASAP

@sbwalker
Copy link
Member

sbwalker commented Dec 9, 2020

@hishamco the external module perspective should always be the primary use case we consider

@sbwalker sbwalker merged commit 08f2877 into oqtane:dev Dec 9, 2020
@hishamco hishamco deleted the translations branch December 9, 2020 14:57
@hishamco hishamco mentioned this pull request Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants