i18n: refs to lang.de.yml
Description
Currently the code can be messy with german bits in the code.
Goal
Rid the code of german text bits, lead the refs to yang.de.yml
Solution
Search all vue and js files for non translated strings.
-
in JavaScript the referrer is:
this.$i18n('KEY.KEY')
-
in vue parameters:
"$i18n('KEY.KEY')"
-
in vue templates:
{{ $i18n('KEY.KEY') }}
... see examples for all three in GenderList.vue -
in twig:
'KEY.KEY|trans'
... see events.twig -
in symfony components:
'KEY.KEY'
... see ForumCreateThreadForm.php
also php would eventually need to be addressed: $this->translator->trans(
List tasks/files to process here:
-
move the RegionControl to the Control class and check if it is still working
/lib-folders won't be touched, also JqueryUI.
Concerning View files see in the comments. It just remains here so we don't forget the information:
- adding it to the View class. In other classes the developer could inject it on demand
removing the duplicated inputs of the legacy translation style from ...View.php classes as these are duplicated -> use 'Foodsharing\Helpers\TranslationHelper;' in SettingsView.php could be a start. Just checking afterwards if translations still work fine.- Settingsview.php, row 165, something is up with the male/female choice in the translation helper, that might be old code, row 219, row 221, row 232, 236, 240, 246, 287, 291, 315, 318, 322, 327, 330, 338-407, (all quiz stuff), 422 (mail), 430ff (calendar), 449 (delete account), 454 hat deutsche Variablen drin, 501ff (quiz stuff again), 639 (picture)
DONE:
vue files with hardcoded strings:
-
/client/src/components/Topbar/SearchResults.vue -
/client/src/components/Topbar/MenuRegion.vue -
/client/src/components/Topbar/MenuMessages.vue Row 34 -
/client/src/components/Topbar/MenuInformation.vue -
/client/src/components/Topbar/MenuGroups.vue -
/client/src/components/Topbar/MenuEnvelope.vue -
/client/src/components/Topbar/MenuBullhorn.vue -
/client/src/components/Topbar/MenuBells.vue Row 23 -
/client/src/components/Topbar/Login.vue Row 121 -
/client/src/components/Topbar/index.vue Row 80,118 -
/src/Modules/Basket/components/RequestForm.vue -
/src/Modules/Region/components/Thread.vue -
/src/Modules/Region/components/ThreadForm.vue -
/src/Modules/Region/components/ThreadPostAction.vue -
/src/Modules/Register/components/RegisterMobilephone.vue -
/src/Modules/WallPost/components/Wall.vue -
/src/Modules/StoreUser/components/PickupList.vue -
/src/Modules/Store/components/StoreStatusIcon.vue -
/src/Modules/Stores/components/storelist.vue
twig files with hardcoded strings:
-
/views/emailTemplates/basket/request.de-de.body.html.twig -
/views/emailTemplates/basket/request.de-de.subject.twig -
/views/emailTemplates/chat/fetch_warning.de-de.body.html.twig -
/views/emailTemplates/chat/fetch_warning.de-de.subject.twig -
/views/emailTemplates/chat/message.de-de.body.html.twig -
/views/emailTemplates/foodSharePoint/new_message.de-de.body.html.twig -
/views/emailTemplates/forum/activation.de-de.body.html.twig -
/views/emailTemplates/forum/activation.de-de.subject.twig -
/views/emailTemplates/forum/answer.de-de.body.html.twig -
/views/emailTemplates/forum/new_message.de-de.body.html.twig -
/views/emailTemplates/forum/new_region_ambassador_message.de-de.body.html.twig -
/views/emailTemplates/general/body.html.twig -
/views/emailTemplates/general/invalid_email_address.de-de.body.html.twig -
/views/emailTemplates/general/invalid_email_address.de-de.subject.twig -
/views/emailTemplates/general/unsubscribe_newsletter.html.twig -
/views/emailTemplates/general/unsubscribe.html.twig -
/views/emailTemplates/general/workgroup_contact.de-de.body.html.twig -
/views/emailTemplates/general/workgroup_contact.de-de.subject.twig -
/views/emailTemplates/user/change_email.de-de.body.html.twig -
/views/emailTemplates/user/change_email.de-de.subject.twig -
/views/emailTemplates/user/join.de-de.body.html.twig -
/views/emailTemplates/user/join.de-de.subject.twig -
/views/emailTemplates/user/privacy_notice.de-de.body.html.twig -
/views/emailTemplates/user/privacy_notice.de-de.subject.twig -
/views/emailTemplates/user/reset_password.de-de.body.html.twig -
/views/emailTemplates/user/reset_password.de-de.subject.twig -
/views/emailTemplates/user/sleeping_automated.de-de.body.html.twig -
/views/emailTemplates/user/sleeping_automated.de-de.subject.twig -
/views/emailTemplates/user/sleeping_warning.de-de.body.html.twig -
/views/emailTemplates/user/reset_password.de-de.subject.twig -
/views/emailTemplates/user/sleeping_automated.de-de.body.html.twig -
/views/emailTemplates/user/sleeping_automated.de-de.subject.twig -
/views/emailTemplates/user/sleeping_warning.de-de.body.html.twig -
/views/emailTemplates/user/sleeping_warning.de-de.subject.twig -
/views/layouts/base.twig -
/views/pages/ForgotPassword/ForgotPasswordForm.twig -
/views/pages/Index/page.twig -
/views/pages/WorkGroup/sidenav.twig -
/views/partials/becomeBezirk.twig -
/views/partials/footer.twig -
/views/partials/tablesorter.twig
Links / references
(Here you can add references to related issues, best-practice examples, and links to anything you feel is relevant)
Reasoning with details in Slack:
https://yunity.slack.com/archives/C1T1ZM9A4/p1584400015349700