-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/728 language clean up (#743)
* create language selector dropdown * translate languages * change position of selector * add translations check * add attr translation for object * update translations for people profile and add cancel form button * add translations for people_skills and language select * fix human_attribute_name method * use instance for translations * add translation for sv_export * Update translate and action_link helper * update translations * add more action_link helper * update translations till _cv.html * Fix translations for people * update translations for people_skills * translate all person_relations * update translations for admin panel * update skills translations * add custom rubocop * finish translations * update translations * add missing translations for everything * start adding custom scanner * update i18n-tasks config * normalize translation files * add missing tranlatins * Fix failing tests * fix complex tests * try to fix people skills * add translations and fix tests * add french tranlatiions * fix search * fix tests * make rubocop happy * fix language selector and belive * language gets persistend after changing person * fix i18n tests * fix all failing tests * improve person routing behavior * improve translations * fix i18n-tasks * fix topbar * add translations via url path * Fix bug related to the new way to set locale * update locale files * fix rspec locale bug * fix failing tests * normalize locale files * clean up * normalize locale files * Make rubocop happy * Implement feedback * fix translation of adminpanel and fix export icon * use tabbar partial for main navbar and improve tabbar * works * fix translations of cv search * clean up language files * update translations * simplify routing logic * simplify i18n helper logic * regenerate language files * clean up translations * start fixing cv search * fix translations * translate people skills search * fix people_skills search * reimplement placeholder in skills_search * fix translations * fix all tests * normalize files * add routing and tabbar specs * readd instant login for keycloak * Fix controller specs * use options_for_select in people_search * clean up people search * add tests to check lanugage selection * fix routing and tabbar specs * add translation for tabbar * add more model translations * change name of cancel.svg and use correct language to display language * Return languages capitalized for language dropdown --------- Co-authored-by: Robin Steiner <[email protected]>
- Loading branch information
1 parent
c67153c
commit d3a7f14
Showing
124 changed files
with
2,261 additions
and
806 deletions.
There are no files selected for viewing
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
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
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
File renamed without changes
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
module CvSearchHelper | ||
def translate_found_in(result) | ||
I18n.t("cv_search.#{result[:found_in].underscore}") | ||
end | ||
|
||
def found_in_skills?(result) | ||
result[:found_in].include?('skills') | ||
result[:found_in].include?('Skills') | ||
end | ||
end |
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,35 @@ | ||
# frozen_string_literal: true | ||
|
||
module TabHelper | ||
LOCALE_REGEX = /(\/(?:#{I18n.available_locales.join('|')}))/ | ||
GLOBAL_NAVBAR_REGEX = /^#{LOCALE_REGEX}?(\/[^\/]+)(?:\/|$)/ | ||
PERSON_NAVBAR_REGEX = /^(.*)/ | ||
|
||
def person_tabs(person) | ||
[ | ||
{ title: 'CV', path: person_path(person) }, | ||
{ title: 'Skills', path: person_people_skills_path(person) } | ||
{ title: ti('tabbar.cv'), path: person_path(person) }, | ||
{ title: ti('tabbar.skills'), path: person_people_skills_path(person) } | ||
] | ||
end | ||
|
||
def global_tabs | ||
[ | ||
{ title: ti('navbar.profile'), path: people_path }, | ||
{ title: ti('navbar.skill_search'), path: people_skills_path }, | ||
{ title: ti('navbar.cv_search'), path: cv_search_index_path }, | ||
{ title: ti('navbar.skillset'), path: skills_path } | ||
] | ||
end | ||
|
||
def extract_path(regex) | ||
request.path.match(regex)&.captures&.join | ||
end | ||
|
||
def global_navbar_path | ||
extract_path(GLOBAL_NAVBAR_REGEX) | ||
end | ||
|
||
def person_navbar_path | ||
extract_path(PERSON_NAVBAR_REGEX) | ||
end | ||
end |
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
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
Oops, something went wrong.