-
Notifications
You must be signed in to change notification settings - Fork 42
[GAPRINDASHVILI] Update gettext catalogs for gaprindashvili update #440
[GAPRINDASHVILI] Update gettext catalogs for gaprindashvili update #440
Conversation
@mzazrivec It looks like not all For e.g, Check out the line below - https://github.com/ManageIQ/miq_v2v_ui_plugin/blob/master/app/javascript/react/screens/App/Overview/components/InfrastructureMappingsList/InfrastructureMappingsList.js#L122 Does the gettext rake task need
@priley86 Is it possible to remove the above |
Yes, having |
What is interesting is that substitution seems to work when gettext is spread over 1+ lines {__(
"Whatever"
)} For the above case, Substitution works Would be nice to keep it consistent for Substitution & Extraction.
|
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.
Jumped back, looked around 👍 (aside from missing translations)
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.
Well, a few translations are often missed due to human error factors like forgetting to add gettext.
@AllenBW This case however, is different... here we know that there is an issue. (and it's hard to ignore that)
The least we could do is at least discuss on how to resolve this.
I'm OK to merge this assuming there is a follow-up to fix the remainder strings either via the rake task fix or a fix from our end by ignoring the npm linter rules
@AparnaKarve yeah! all for discussing, apologies, my intention wasn't to seemingly ignore the issue 😆 When yah present the options that way, I'm in favor of fixing the rake task (which wouldn't be a thing for this repo) rather than linting rules, which would have far greater implications. Edit: furthermore, DANG you just wrote the thought on my mind... that this is applicable to other associated code ❤️ |
@AllenBW No worries :) Thanks. Agree that this should be fixed by the rake task -- since it could be applicable to other JS repos/sources too I'm not sure on the level of effort required to fix the rake task, but if it's not doable for the upcoming G release, then we just need to make a note of it here before merging this and fix it later. |
Looks like some action happens here 🤔 @skateman @martinpovolny ☝️ any thoughts on feasibility of extracting text across lines? |
@AparnaKarve @AllenBW yea - it would be ideal to not have to change this. Prettier is an opinionated formatter and unfortunately I don't know a simple fix other than ignoring the file w/ EDIT: it appears there is a Should just be used w/ caution. |
So....we have to write each string to use 3 lines instead of one, and prepare tooling just to support syntax that's not used elsewhere. Or, we can drop prettier, create a compatible eslint ruleset, and add a rule to support the strings as they should be. At least that's how I see it :) |
Here's the situation. We cannot easily fix this whole problem with a rake task fix, not on our (ManageIQ) end anyway. The parser which does the We could try to fix / extend the parser so that it works with our source, but the way things are, this would be an invasive & complicated change and quite a long shot. At this moment, I need to give our translators a complete V2V catalog to be translated into several languages for upcoming Gaprindashvili update release. Because of the problem described above, we're currently lacking approximately 300 words, which is quite a bit. So we need to find some solution quite fast here. I'm leaning towards the proposal suggested by @himdel above: use |
@himdel when yah put it that way 😬:godmode: naaaaahhhhh rewriting all strings to have 3 lines is no bueno... I guesssss the question is does miq manage its own getext parser? (if so where?) I was hoping it would be a simple regex rewrite to capture all the content contained within the leading oh well @mzazrivec kinda answered that ❤️ Edit: thinking ignoring prettier is gonna be a bit less painful than yanking it... looking at this presently... |
Sad...I would have expected better from the gem. |
No idea. On the Ruby side we use a parser. Here it's a regexp which, erhmh, well sucks.
Yes, that's what I'd do. The styling rules are meant to help us. If they don't help then don't use them. The goal is not to honor the rules the goal is to get the job done and have readable code. |
96d22af
to
234233c
Compare
234233c
to
47d5e24
Compare
This PR should be good to go. |
Thanks for the update @mzazrivec It looks like there would be a few more strings that would have to be included in the gettext catalog. This PR #476 contains strings from the .yaml files from the manageiq-content repo. Other than the above PR, there are a couple other unmerged PRs that would be introducing new strings in the UI soon. So it looks like another round of extraction would be necessary in about a week's time or so. Sorry for the trouble and thanks in advance. |
This PR needs to be tested & merged as it is. It contains the source catalogs ( |
Ok, if that is the purpose of the PR, then LGTM |
.pot
filezanata.xml
for gaprindashvili branch