-
Notifications
You must be signed in to change notification settings - Fork 699
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
Remove all instances of the crossComponentTranslator
before the next string freeze
#9037
Comments
Hi!!, Is this issue still valid? |
Hello @photon0205, yes it is still valid, are you asking because you'd like to work on it? |
Yes, I would like to work on this |
Thank you, we appreciate that. I'll assign you. Feel free to start and let me know if you encountered any issues. Depending on how many instances of |
I would like to would on this issue. If its still valid, please assign it to me. |
@shark-lamp I am working on it |
I did not review the code, but noting that moving the identical strings used in different components into |
Hi @MisRob @marcellamaki , |
Thank you, @Akila-I, we appreciate your interest. This particular issue is currently time-sensitive so it's been already been assigned to @marcellamaki, who will start working on it soon. I saw that you've already posted a comment of interest to one another issue, so I'd recommend focusing on that. |
Observed behavior
After the string freeze for the
0.15
release, we couldn't modify strings and their namespaces anymore. That also means that we couldn't move strings between components. We have thecrossComponentTranslator
utility which allowed us to access translation strings in a component from another component so that we could temporarily work around this. Before the next string freeze, we should clean up all places where thecrossComponentTranslator
is used, move strings to components from where they are really used or to common string files, and remove all components that are not used but needed to be left in the codebase because they contain some translations.Example
Translations strings from the
OverallStatus
componentkolibri/kolibri/plugins/learn/assets/src/views/AssessmentWrapper/OverallStatus.vue
Lines 16 to 23 in 2f93cb0
should be moved to the
LessonMasteryBar
componentkolibri/kolibri/plugins/learn/assets/src/views/AssessmentWrapper/LessonMasteryBar.vue
Line 30 in 2f93cb0
and used directly instead of using the
crossComponentTranslator
kolibri/kolibri/plugins/learn/assets/src/views/AssessmentWrapper/LessonMasteryBar.vue
Line 28 in 2f93cb0
kolibri/kolibri/plugins/learn/assets/src/views/AssessmentWrapper/LessonMasteryBar.vue
Line 8 in 2f93cb0
OverallStatus
component should then be removed.Note that removing a component might not be desired at all places that need to be cleaned up since sometimes we share strings between components that are all used. In such cases, the
crossComponentTranslator
should still be removed and strings can be duplicated in both components, alternatively, they could be moved to shared string files like for examplecommonCoreStrings
,commonLearnStrings
, etc. depending on what location is appropriate.Search codebase for the
crossComponentTranslator
term to find more.The text was updated successfully, but these errors were encountered: