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

Added i18n support for SS4 #48

Merged
merged 3 commits into from
Nov 20, 2020
Merged

Added i18n support for SS4 #48

merged 3 commits into from
Nov 20, 2020

Conversation

AndreasL50
Copy link
Contributor

This pull request adds i18n translation functionality, usable with .yml Files in the lang folder as usual.
I've already included the English and German translation files.

And while I was on it, I decided to add title attributes for the last links in the debugging section with the descriptions copied from the official SilverStripe Document.

Changelog:

  • Replaced hard coded Text with translation Tags/Methods.
  • Made very few adjustments in BetterNavigatorExtension.php to maintain functionality (A few styles broke).
  • Added title attributes to the debug links (Copied Descriptions from the URL Variable Tools Document)

added title attributes for the debugging links
Copy link
Owner

@jonom jonom left a comment

Choose a reason for hiding this comment

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

Thanks so much @AndreasLang50! Will be great to have i18n in this module. I will take a closer look soon, but one thing that jumps out is that all of the translation entries should be fully namespaced. Currently 3 keys are under JonoM\BetterNavigator\Extension\BetterNavigatorExtension while the rest are simply under BetterNavigator. I'm happy for all of the keys to go under JonoM\BetterNavigator:, I don't think we need to be any more specific than that.

@AndreasL50
Copy link
Contributor Author

Yeah, you're right, I thought of it as the root scope, therefore not having any namespaces, but they do make a lot of sense.
I've now put all translations into JonoM\BetterNavigator as requested.

@AndreasL50
Copy link
Contributor Author

@jonom Any updates on this please? Thanks :)

@jonom
Copy link
Owner

jonom commented Nov 17, 2020

@AndreasLang50 sorry for the delay on this! Have been super busy but it's on my to do list to check this, aiming to test and merge this week.

@AndreasL50
Copy link
Contributor Author

Alright, thx!

@jonom jonom merged commit 19eb60b into jonom:master Nov 20, 2020
@jonom
Copy link
Owner

jonom commented Nov 20, 2020

Great work @AndreasLang50, thank you! Sorry for the delay in reviewing. Merged and tagged a 5.1.0 release.

@AndreasL50 AndreasL50 deleted the i18n branch November 23, 2020 07:10
@AndreasL50
Copy link
Contributor Author

thanks :)

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