-
Notifications
You must be signed in to change notification settings - Fork 92
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 literal 'wp-auth0' rather than WPA0_LANG constant #311
Conversation
Can you fix conflicts please, also why doesn't a constant work? |
WordPress strongly suggests against it because Thanks for taking a look, I will fix up the conflicts. |
ef73f2c
to
28a4a75
Compare
Ah good thanks for the reference. |
It seems this once again has conflicts; I'm not inclined to continue fixing conflicts for every minor typo fix that is committed. Please let me know whether this will actually be merged. |
Sorry about this @glena any feelings against this? seems to be the preferred method. |
@idpaterson Can you rebase to master and fix conflicts thanks. |
I am happy to rebase and fix the conflicts if this is en route to acceptance but will wait until you've all agreed that this is an acceptable change. |
This should be fine, please rebase 😄 |
28a4a75
to
66d3f95
Compare
This should be good to go, note that there are both text domains switched from the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this looks fine, I was a little hesistant on this however it is the preferred method from the WP docs. Although I am unsure how PHP processes a define vs a variable. @glena any thoughts here?
Oh, sorry @idpaterson can you rebase to dev please, same goes for your other PR Thx. So close 😄 |
…action of translatable text.
66d3f95
to
fb535e4
Compare
Rebased this and #312 back to dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still think it's odd in some ways. However, is the WP preferred way and you also ran into issues with it so no harm in doing so. Any concerns @glena ? The define is still there in case something somewhere in the shadows references it 😄
LGTM |
Translation tools are generally not able to map a runtime constant like
WPA0_LANG
to a value for the text domain and therefore most of the text within this plugin was not automatically available for translating. A literal string value for the text domain ensures better compatibility.This pull request updates all occurrences of
WPA0_LANG
to the literal'wp-auth0'
and adds the text domain in a few places where it was missing. The literal value uses either single or double quotes for consistency with the adjacent translated text. TheWPA0_LANG
constant is still defined to avoid backwards compatibility issues for anything that may still use it.This problem was discovered when working on #308. I attempted to use the popular Loco translation plugin to change the error message text but only a few strings (those with the default text domain) were available for translation. I was able to use
*
as a wildcard in Loco but then the particular error message that I needed to change was not translatable (see #312).