issue number 2074 resolved#4350
Conversation
| methods: { | ||
| languageText(item) { | ||
| return this.$tr('languageItemText', { language: item.native_name, code: item.id }); | ||
| return this.$tr('languageItemText', { language: item.first_native_name, code: item.id }); |
There was a problem hiding this comment.
Hi @cerdo0! It seems like the value of item.first_native_name is undefined. The output now only shows the code of the language in the dropdown.
There was a problem hiding this comment.
may be something like this could work?
const firstNativeName = item.native_name.split(',')[0].trim()
cc @MisRob?
There was a problem hiding this comment.
#2074 is a pretty old issue, so yes, it seems first_native_name is obsolete. I don't see it anywhere in the codebase https://github.com/search?q=repo%3Alearningequality%2Fstudio+first_native_name&type=code.
@ozer550 your suggestion makes sense. I'd just suggest confirming that
native_name can be a comma separated list of names
is still a valid remark.
There was a problem hiding this comment.
Yes I think it is! If we see for the code (nv) then it shows comma separated name.
There was a problem hiding this comment.
The changes look correct to me. Please run the lint formatter to fix the linting issues reported on your pr(yarn run lint-frontend:format). Thanks @cerdo03. Adding @radinamatic for some more manual QA.
Also, noting that it looks like the value native_name may not require splitting afterall as similar code snippets in the code base suggest otherwise. @bjester?
|
@akolson I have run the lint formatter and fixed the lint issues. Please review. |
|
Thank you, @cerdo03, apologies for delayed response, we were on holidays. We will re-review. |
akolson
left a comment
There was a problem hiding this comment.
The changes checkout and manual QA done shows the dropdown works as expected. Thank you very much for your contribution @cerdo03!
You are welcome to help with more issues in any of our 3 repositories, if you'd like. Also, please review the community guidelines in the links below before contributing.
Summary
Description of the change(s) you made
Fixes #2074
As stated, the native_name has been changed to first_native_name as native_name can be a comma separated list of names.
Manual verification steps performed
References
Comments
Contributor's Checklist
PR process:
CHANGELOGlabel been added to this PR. Note: items with this label will be added to the CHANGELOG at a later timedocslabel has been added if this introduces a change that needs to be updated in the user docs?requirements.txtfiles also included in this PRStudio-specifc:
notranslateclass been added to elements that shouldn't be translated by Google Chrome's automatic translation feature (e.g. icons, user-generated text)pages,components, andlayoutsdirectories as described in the docsTesting:
Reviewer's Checklist
This section is for reviewers to fill out.
yarnandpip)