diff --git a/app/helpers/i18n_helper.rb b/app/helpers/i18n_helper.rb index bd9c1bbb5..b2d82bd1d 100644 --- a/app/helpers/i18n_helper.rb +++ b/app/helpers/i18n_helper.rb @@ -62,23 +62,17 @@ def association_owner_key(assoc, key) k << key.to_s end - def inheritable_translation_defaults(key, partial) # rubocop:disable Metrics/MethodLength,Metrics/AbcSize + def inheritable_translation_defaults(key, partial) defaults = [] current = controller.class while current < ActionController::Base folder = current.controller_path if folder.present? - folders = get_all_parent_folders(folder) - folders += get_all_parent_folders(folder.gsub('/', '.'), '.') - folders = folders.uniq.sort_by(&:length).reverse - folders.each do |f| - append_controller_translation_keys(defaults, f, partial, key) - end + append_controller_translation_keys(defaults, folder, partial, key) end current = current.superclass end defaults << :"global.#{key}" - defaults.uniq end def append_controller_translation_keys(defaults, folder, partial, key) @@ -87,9 +81,4 @@ def append_controller_translation_keys(defaults, folder, partial, key) defaults << :"#{folder}.global.#{key}" end - def get_all_parent_folders(folder, splitter = '/') - folder.split(splitter).inject([]) do |acc, part| - acc.empty? ? [part] : acc + ["#{acc.last}#{splitter}#{part}"] - end.reverse - end end diff --git a/config/locales/de.yml b/config/locales/de.yml index 32d059a87..405024619 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -186,15 +186,6 @@ de: welcome: Willkommen bei new: personals: Personalien - people_skills: - edit_form: - rate: Bewerten - unrate: Nicht bewerten - index: - new_skills_to_rate: Neue Skills zur Bewertung - scroll_to_menu: - link: - add: Skill hinzufügen profile: add_function: Funktion hinzufügen add_language: Sprache hinzufügen @@ -212,22 +203,15 @@ de: search: new_profile: Neues Profil updated_at: Zuletzt bearbeitet - people-skills: - certificate: Certificato - core-competence: Competenza di base - filter: - all: Tutti - rated: Valutazione - unrated: Non valutato - interest: Interesse per - levels: - expert: Esperto - junior: Junior - level: Esperienza - professional: Professionale - senior: Senior - trainee: Apprendista - unweighted: Non valutato + people/people_skills: + edit_form: + rate: Bewerten + unrate: Nicht bewerten + index: + new_skills_to_rate: Neue Skills zur Bewertung + scroll_to_menu: + link: + add: Skill hinzufügen people_skills: global: link: @@ -245,11 +229,5 @@ de: radar: Radar skill: Skill subcategory: Subkategorie - header: - all: Tutti - category: Categoria - default: Predefinito - new: Nuovo - search: Capacità di ricerca show: title: 'Skill: %{title} (%{amount} Members)' diff --git a/config/locales/en.yml b/config/locales/en.yml index 82d27263c..862a72b11 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -25,9 +25,9 @@ en: advanced_trainings: one: Further training other: Further training - birthdate: Birthdate + birthdate: Date of birth competence_notes: Notes Member - department: Department + department: Organizational unit dual_citizen: Dual citizens educations: one: Education @@ -36,7 +36,7 @@ en: languages: one: Language other: Languages - location: Place + location: Location marital_status: Marital status name: Name nationality: Nationality @@ -54,7 +54,7 @@ en: skills: one: Skill other: Skills - title: Degree + title: Conclusion project: description: Description role: Role and tasks @@ -65,7 +65,7 @@ en: category: Category models: activity: Station - advanced_training: Advanced training + advanced_training: Further training company: one: Company other: Companies @@ -97,8 +97,8 @@ en: messages: cannot_remove: must not be deleted. invalid_date_range: must be before the end date. - max_size_10MB: should not be larger than 10MB. - max_size_error: should not be larger than 10MB. + max_size_10MB: must not be larger than 10MB. + max_size_error: must not be larger than 10MB. profile-not-found: Profile could not be found. valid_percent_range: must be between 0 and 200. global: @@ -112,10 +112,10 @@ en: year: Year devise: admin: "(Admin)" - admin_panel: Admin Panel + admin_panel: Admin area devise: Motto mockdata: Mockdata - no_omniauth_providers: An error, no Omniauth providers are available, please contact the administrator. + no_omniauth_providers: An error has occurred, there are no Omniauth providers available, please contact the administrator. sign_in: Log in sign_in_with: 'Log in with %{provider} ' sign_out: Log out @@ -145,10 +145,10 @@ en: levels: expert: Expert junior: Junior - level: Experience + level: Level professional: Professional senior: Senior - trainee: Trainee + trainee: Apprentice unweighted: Not rated search: found_in: Found in @@ -186,25 +186,16 @@ en: welcome: Welcome to new: personals: Personal details - people_skills: - edit_form: - rate: Rate - unrate: Do not rate - index: - new_skills_to_rate: New skills for evaluation - scroll_to_menu: - link: - add: Add skill profile: add_function: Add function add_language: Add language change_image: Change picture core_competences: Core competencies - personals: Personal data + personals: Personal details upload_image: Upload image scroll_to_menu: activities: Station - advanced-trainings: Advanced trainings + advanced-trainings: Further training core-competences: Core competencies educations: Trainings personal-data: Personal data @@ -212,22 +203,15 @@ en: search: new_profile: New profile updated_at: Last edited - people-skills: - certificate: Certificate - core-competence: Core competence - filter: - all: All - rated: Rated - unrated: Not rated - interest: Interest - levels: - expert: Expert - junior: Junior - level: Experience - professional: Professional - senior: Senior - trainee: Trainee - unweighted: Not rated + people/people_skills: + edit_form: + rate: Rate + unrate: Do not rate + index: + new_skills_to_rate: New skills for evaluation + scroll_to_menu: + link: + add: Add skill people_skills: global: link: @@ -245,11 +229,5 @@ en: radar: Radar skill: Skill subcategory: Subcategory - header: - all: All - category: Category - default: Default - new: New - search: Search skills show: title: 'Skill: %{title} (%{amount} Members)' diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 9bfe11c50..966b5b7d7 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -27,7 +27,7 @@ fr: other: Formations continues birthdate: Date de naissance competence_notes: Notes Member - department: Département + department: Unité organisationnelle dual_citizen: Double nationalité educations: one: Formation @@ -37,7 +37,7 @@ fr: one: Langue other: Langues location: Lieu - marital_status: Statut marital + marital_status: État civil name: Nom nationality: Nationalité person_roles: @@ -112,7 +112,7 @@ fr: year: Année devise: admin: "(Admin)" - admin_panel: Panneau d'administration + admin_panel: Zone d'administration devise: Devise mockdata: Mockdata no_omniauth_providers: Une erreur s'est produite, aucun fournisseur Omniauth n'est disponible, veuillez contacter l'administrateur. @@ -145,10 +145,10 @@ fr: levels: expert: Expert junior: Junior - level: Expérience + level: Niveau professional: Professionnel senior: Senior - trainee: Stagiaire + trainee: Apprenti unweighted: Non évalué search: found_in: Trouvé dans @@ -182,19 +182,10 @@ fr: link: add: Nouveau profil index: - choose_create_person: Choisis une personne ou saisis un nouveau profil + choose_create_person: Sélectionne une personne ou saisis un nouveau profil welcome: Bienvenue chez new: personals: Données personnelles - people_skills: - edit_form: - rate: Évaluer - unrate: Ne pas évaluer - index: - new_skills_to_rate: Nouvelles compétences pour l'évaluation - scroll_to_menu: - link: - add: Ajouter une compétence profile: add_function: Ajouter une fonction add_language: Ajouter une langue @@ -212,22 +203,15 @@ fr: search: new_profile: Nouveau profil updated_at: Dernièrement édité - people-skills: - certificate: Certificat - core-competence: Compétence clé - filter: - all: Tous les - rated: Évalué - unrated: Non évalué - interest: Intérêt - levels: - expert: Esperto - junior: Junior - level: Esperienza - professional: Professionnel - senior: Senior - trainee: Apprendista - unweighted: Non valutato + people/people_skills: + edit_form: + rate: Évaluer + unrate: Ne pas évaluer + index: + new_skills_to_rate: Nouvelles compétences pour l'évaluation + scroll_to_menu: + link: + add: Ajouter une compétence people_skills: global: link: @@ -245,11 +229,5 @@ fr: radar: Radar skill: Compétence subcategory: Sous-catégorie - header: - all: Tous les - category: Catégorie - default: Défaut - new: Nouveau - search: Chercher des compétences show: title: 'Compétence : %{title} (%{amount} Members)' diff --git a/config/locales/it.yml b/config/locales/it.yml index e642c8001..c634804d4 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -36,7 +36,7 @@ it: languages: one: Lingua other: Le lingue - location: Luogo + location: Posizione marital_status: Stato civile name: Nome nationality: Nazionalità @@ -97,8 +97,8 @@ it: messages: cannot_remove: non deve essere cancellato. invalid_date_range: deve essere precedente alla data di scadenza. - max_size_10MB: non dovrebbe essere più grande di 10 MB. - max_size_error: non dovrebbe essere più grande di 10 MB. + max_size_10MB: non deve essere più grande di 10 MB. + max_size_error: non deve essere più grande di 10 MB. profile-not-found: Il profilo non è stato trovato. valid_percent_range: deve essere compreso tra 0 e 200. global: @@ -112,10 +112,10 @@ it: year: Anno devise: admin: "(Admin)" - admin_panel: Pannello di amministrazione + admin_panel: Area amministrativa devise: Motto mockdata: Mockdata - no_omniauth_providers: Errore, non sono disponibili provider Omniauth, contattare l'amministratore. + no_omniauth_providers: Si è verificato un errore, non sono disponibili provider Omniauth, contattare l'amministratore. sign_in: Accedi sign_in_with: "%{provider} Accedere con" sign_out: Disconnettersi @@ -145,7 +145,7 @@ it: levels: expert: Esperto junior: Junior - level: Esperienza + level: Livello professional: Professionale senior: Senior trainee: Apprendista @@ -186,15 +186,6 @@ it: welcome: Benvenuti a new: personals: Dati personali - people_skills: - edit_form: - rate: Tasso - unrate: Non valutare - index: - new_skills_to_rate: Nuove competenze per la valutazione - scroll_to_menu: - link: - add: Aggiungi abilità profile: add_function: Aggiungi funzione add_language: Aggiungi lingua @@ -212,22 +203,15 @@ it: search: new_profile: Nuovo profilo updated_at: Ultima modifica - people-skills: - certificate: Certificato - core-competence: Competenza di base - filter: - all: Tutti - rated: Valutazione - unrated: Non valutato - interest: Interesse per - levels: - expert: Esperto - junior: Junior - level: Esperienza - professional: Professionale - senior: Senior - trainee: Apprendista - unweighted: Non valutato + people/people_skills: + edit_form: + rate: Tasso + unrate: Non valutare + index: + new_skills_to_rate: Nuove competenze per la valutazione + scroll_to_menu: + link: + add: Aggiungi abilità people_skills: global: link: @@ -245,11 +229,5 @@ it: radar: Radar skill: Abilità subcategory: Sottocategoria - header: - all: Tutti - category: Categoria - default: Predefinito - new: Nuovo - search: Capacità di ricerca show: title: "%{title}%{amount} Abilità: ( Membri)"