-
Notifications
You must be signed in to change notification settings - Fork 5
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
Use gettext for plugin translation #34
base: main
Are you sure you want to change the base?
Conversation
49bb5f8
to
c4ba485
Compare
Okay, so the switcher works, but there's a gotcha: the For example, I can only switch between @ovx, how much do you want to keep that setting? I'm thinking maybe it's not that useful when the language is properly selected automatically? Also, WP requires .mo files for the translation to work. I committed them to the repo, but I'm sure it's also possible to generate them before pushing the plugin to WordPress SVN instead. |
@rimas-kudelis Hi, thank you a lot for this PR, gettext was definitely planned. I think the language settings can be dropped since it works automatically now. Will review this a bit later. |
c4ba485
to
64cedaa
Compare
Cool, in that case I've updated the plugin to remove that setting. I kept some code, which should still make it possible to switch to a specific language when using the shortcode, but I didn't test that scenario. By the way, do you even ensure that altcha is correctly submitted if it was inserted via the shortcode? |
9eac807
to
64cedaa
Compare
64cedaa
to
d04e9aa
Compare
By the way, originally, the array of "cannot_submit" => "Cannot submit." I coudn't find this identifier in JS, meaning the seems to have been unused, so I have removed it. |
e55e986
to
573f727
Compare
Marked more strings for localization. |
This translates the widget using gettext, however, the language setting doesn't seem to work, needs some more digging or to be removed entirely.
I changed language codes because WP doesn't seem to be smart enough to fallback to
lt
when it can't findlt_LT
.Fixes #33.