Incorrect id for a message
Because one of our users complained of a wrong translation, I found something that may be confusing.
In src/alerts/course-start-alert/CourseStartAlert.jsx shouldn't id="learning.outline.alert.end.long" really be id="learning.outline.alert.start.long" ?
@sambapete can you be more specific about which translation was incorrect?
Note: There is no learning.outline.alert.start.long, but there is a learning.outline.alert.start.short.
That's the problem. In the code, in src/alerts/course-start-alert/CourseStartAlert.jsx, learning.outline.alert.end.long should really be learning.outline.alert.start.long
Line 71 should be learning.outline.alert.start.long instead of learning.outline.alert.end.long. Look at the code, it does not make sense that it would be end.long.
Hi @sambapete I was trying to point out that none of the translation json files reference that variable name. For example, see https://github.com/openedx/frontend-app-learning/blob/master/src/i18n/messages/de.json#L9-L10
Check some of the other translation files too. There is a learning.outline.alert.start.short but there is no learning.outline.alert.start.long, so you might consider updating your PR to reflect that. https://github.com/openedx/frontend-app-learning/pull/1167
Exactly. That's because the id used on line 71 is "wrong". As I said it should be learning.outline.alert.start.long and it does not exist. And if you modify the code, the harvest of strings for Transifex will pick up the new id and add it to the translation files. We're basically saying the same thing.
@sambapete Ah, gotcha. Thanks for clarifying!
This was fixed by https://github.com/openedx/frontend-app-learning/pull/1173