-
Notifications
You must be signed in to change notification settings - Fork 677
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
Fix language preferentiality for duplicate resources #12152
Fix language preferentiality for duplicate resources #12152
Conversation
Build Artifacts
|
Hey @ellipsis, give me a code review |
OK! Reviewing this PR... Responding to this comment by @rtibbles. For more information about Ellipsis, check the documentation. |
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.
❌ Changes requested. Reviewed everything up to 2d074f3 in 2 minutes and 44 seconds
More details
- Looked at
280
lines of code in32
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. kolibri/core/device/upgrade.py:24
- Draft comment:
The functionset_device_settings
is not imported correctly. Ensure to import it fromkolibri.core.device.utils
to avoid runtime errors. - Reason this comment was not posted:
Confidence of 0% on close inspection, compared to threshold of 50%.
2. kolibri/plugins/learn/assets/src/views/CopiesModal.vue:7
- Draft comment:
The event emitted here should be@closeModal
instead of@submit
to match the event handler in the parent components.
@closeModal="$emit('closeModal')"
- Reason this comment was not posted:
Confidence of 0% on close inspection, compared to threshold of 50%.
Workflow ID: wflow_snNni4PbI8mB3BbG
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
⌛ 6 days left in your free trial, upgrade for $20/seat/month or contact us.
}; | ||
|
||
export const getContentLangActive = language => { | ||
const langCode = languageIdToCode(currentLanguage); |
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.
The variable currentLanguage
is used but not defined in the scope of getContentLangActive
. Ensure that currentLanguage
is correctly defined or passed as a parameter to this function.
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.
It's defined in the module scope.
No luck with seeing the Chewa UI after upgrading from 0.16.1 to asset from this PR. no-ny.mp4Tested on Ubuntu 20.04 with Firefox and Chrome. |
Thanks @radinamatic - I am pretty sure I have forgotten to update the language code in one place. I'll do a quick search for the whole codebase for |
Add intl locale data for ny language code.
Update duplicate resource prioritization with new function.
There were a couple of spots I had missed. Including the fact that Intl.js doesn't actually have a polyfill for Chewa locale data. Thankfully, I was able to generate one automatically from sources. I think it should all be working as intended now. |
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.
Manual QA passes, good to go! 👏🏽 💯
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.
Code review looks good to me. I think the sorting situation with the matching language codes is the better option for handling a bit of odd perfect/acceptable matching, and the comments are helpful to make it more parseable for other use cases.
Remains to be seen if future Marcella agrees with me.
32e1e94
into
learningequality:release-v0.16.x
Summary
References
Fixes #11751
Reviewer guidance
Import duplicate resources in the KA English channel. Search for them, confirm that the duplicate resource modal works there as well.
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)Summary:
This PR corrects the Chewa language code, adds necessary migrations, updates handling of duplicate resources, and enhances language matching logic.
Key points:
nyn
tony
.getContentLangActive
function.Generated with ❤️ by ellipsis.dev