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

Load theme translations files automatically #1093

Merged
merged 1 commit into from
Mar 26, 2018

Conversation

ArthurHoaro
Copy link
Member

Fixes #1077

Take a look at the docs update to see how it works

"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Poedit 2.0.6\n"

msgid "cock"
Copy link
Member

Choose a reason for hiding this comment

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

this test should use reference data that is not likely to be interpreted as being suggestive :)

Copy link
Member Author

Choose a reason for hiding this comment

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

WHAT'S WRONG WITH OUR PROUD NATIONAL SYMBOL?!

Copy link
Member

Choose a reason for hiding this comment

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

Seems alright to me ;-)

$themeTransFolder = rtrim($this->conf->get('raintpl_tpl'), '/') .'/'. $theme .'/language';
if (is_dir($themeTransFolder)) {
try {
/** @var Translations $translations */
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

I use this for type hinting in the IDE but the lib should handle it.

@ArthurHoaro ArthurHoaro force-pushed the feature/theme-translation branch 3 times, most recently from 62e2425 to 54ad016 Compare March 26, 2018 17:17
Fixes shaarli#1077

Take a look at the docs update to see how it works
@ArthurHoaro ArthurHoaro force-pushed the feature/theme-translation branch from 54ad016 to 68c6afc Compare March 26, 2018 17:20
@ArthurHoaro
Copy link
Member Author

Rebased.

@ArthurHoaro ArthurHoaro merged commit 9b2bd66 into shaarli:master Mar 26, 2018
@ArthurHoaro ArthurHoaro deleted the feature/theme-translation branch March 26, 2018 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants