-
Notifications
You must be signed in to change notification settings - Fork 95
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
Add translations for tab-alpha.js and vocab-search.js (#1722) #1723
Open
miguelvaara
wants to merge
26
commits into
main
Choose a base branch
from
issue1722-add-translations-for-front-end-components
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add translations for tab-alpha.js and vocab-search.js (#1722) #1723
miguelvaara
wants to merge
26
commits into
main
from
issue1722-add-translations-for-front-end-components
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…it deprecation warnings
…ge-cookie Remove the search language cookie
Upgrade to PHPUnit 10
… in the search autocomplete have been changed from using the SKOSMOS object to the new method with Vue components
…ges were updated to fit with the agreed translation methodss used in Vue components
…e during a merge.
… in the search autocomplete have been changed from using the SKOSMOS object to the new method with Vue components
…ges were updated to fit with the agreed translation methodss used in Vue components
…ttps://github.com/NatLibFi/Skosmos into issue1722-add-translations-for-front-end-components
Quality Gate passedIssues Measures |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1723 +/- ##
============================================
- Coverage 73.13% 70.90% -2.24%
+ Complexity 1958 1650 -308
============================================
Files 33 33
Lines 4769 4330 -439
============================================
- Hits 3488 3070 -418
+ Misses 1281 1260 -21 ☔ View full report in Codecov by Sentry. |
miguelvaara
changed the title
Issue1722 add translations for front end components
Add translations for front end components (#1722)
Dec 20, 2024
miguelvaara
changed the title
Add translations for front end components (#1722)
Add translations for tab-alpha.js and vocab-search.js (#1722)
Dec 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Review guidelines
Visually observable changes in the browser are primarily related to parts generated by the following files:
Test the user interface:
Note:
Reasons for creating this PR
Improves frontend translation functionalityies.
Link to relevant issue(s), if any
#1722
Description of the changes in this PR
Added similar features as in the previous Vue-related translation implementations.
Known problems or uncertainties in this PR
What if we explore the ways to implement the translation functionality using JavaScript's promise features. By doing so, translations could be loaded in a lazy manner, meaning that if translations need to be awaited, the translation key would briefly appear to the user (likely some milliseconds), but as soon as the translations are ready, the key would be replaced with the actual translation.
This is a very common way to implement similar functionalities. The current implementation works but it has a weakness: if additional dependencies will be needed later that also need to be awaited before the page loads, they must be added to the same functionality (risk of excessive complexity).
Therefore, using the async -> await -> response -> .then -> .catch structure could be considered.
Checklist
.sr-only
class, color contrast)