-
Notifications
You must be signed in to change notification settings - Fork 357
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
Translating availabilities/status for Domains/Servers/Deploys #2323
Translating availabilities/status for Domains/Servers/Deploys #2323
Conversation
c5ba76a
to
e7936b3
Compare
@xeviknal : how do these strings get to the catalog? Are we sure all of them are in the catalog? Thx! |
@xeviknal Also, what's the point of calling |
@martinpovolny two of the statuses are merged to Master (Server and Deployment). Domain availability is pending to merge (ManageIQ/manageiq-providers-hawkular#67). @mzazrivec Thanks for comments guys! |
@xeviknal : please, take a look at http://manageiq.org/docs/guides/i18n the problem is the strings you are passwing throught i18n will not be in the gettext catalog unless you mark those somewhere the string collecting task would reach them |
Also, you should not be doing any more transformations with the strings coming out of |
@martinpovolny then it means that I have to explicitly set the if value == 'Disabled'
_('Disabled')
elsif value == 'Enabled'
_('Enabled')
else
_('Unknowkn')
end @mzazrivec I understand what you mean. We fully trust on what translators do, and we don't have to manipulate anything from there. 👍 |
@miq-bot add_label middleware |
I am not sure what is the best pattern to use here. A case statement is probably quite ok or maybe something like:
Or you might leave the unknown message untranslated, that might be the best option for the user.
I'd refer to @mzazrivec as our i18n expert ;-) |
@martinpovolny okay, apart from the pattern followed, I got how the system works now. 🎉 |
@xeviknal : the textual_summary files are actually helpers. If you need to share code bettween those files, there are mixing included in several: So you might reuse one or create a new one if needed. |
@xeviknal where does this PR stand? any more changes needed or it can be merged? |
e7936b3
to
f191a04
Compare
@martinpovolny @mzazrivec could you please check it out? |
ec3a002
to
63eaae8
Compare
63eaae8
to
d40de8e
Compare
Checked commit xeviknal@d40de8e with ruby 2.3.3, rubocop 0.47.1, and haml-lint 0.20.0 |
Status literals of Domain/Server/Deployment translated and
titleized
.Deployment status:
Domain state:
Server state: