Skip to content
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

localized form templates and updated instructions #11354

Merged

Conversation

danielfmiranda
Copy link
Collaborator

@danielfmiranda danielfmiranda commented Nov 1, 2023

Description

Link to sample test page: https://donate-foundation-s-11173-dona-co8e89.mofostaging.net/en/help/
Related PRs/issues: #11173

Using #10589 for reference, this PR makes the same localization updates to the FormAssembly form found on the donate help page.

@danielfmiranda danielfmiranda changed the base branch from main to feature/donate-help-page November 1, 2023 00:37
@danielfmiranda danielfmiranda temporarily deployed to foundation-s-11173-dona-co8e89 November 2, 2023 02:43 Inactive
Comment on lines 54 to 63
const localeMap = {
'zh-CN': 'tfa_218',
'zh-TW': 'tfa_218',
'cs': 'tfa_219',
'da': 'tfa_220',
'nl': 'tfa_221',
'en-CA': 'tfa_222',
'en-GB': 'tfa_222',
'en-US': 'tfa_222',
'en-ZA': 'tfa_222',
'fy-NL': 'tfa_221',
'en': 'tfa_222',
'fr': 'tfa_223',
'de': 'tfa_224',
'it': 'tfa_225',
'ja': 'tfa_226',
'pl': 'tfa_228',
'pt-BR': 'tfa_229',
'ru': 'tfa_230',
'es-MX': 'tfa_231',
'es-AR': 'tfa_231',
'es-ES': 'tfa_231',
'es-CL': 'tfa_231'
'es': 'tfa_231',
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mmmavis! As mentioned here, I have worked with stakeholders to update this list to language codes that are supported on the foundation site.

This update was done on FormAssembly, so we wont have to worry about updating this after a copy/paste. It will already be included!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the note!

@danielfmiranda danielfmiranda changed the title WIP: localized form templates and updated instructions localized form templates and updated instructions Nov 2, 2023
@@ -74,7 +69,7 @@
</script></div>
<form method="post" action="https://mozillafoundation.tfaforms.net/api_v2/workflow/processor" class=" labelsAbove" id="12" role="form" enctype="multipart/form-data" style="padding:0;">
<div class="oneField field-container-D labelsAbove " id="tfa_95-D">
<label id="tfa_95-L" class="label preField" for="tfa_95">I need</label><br><div class="inputWrapper"><select aria-required="true" id="tfa_95" name="tfa_95" title="I need" class="required"><option value="">Please select...</option>
<label id="tfa_95-L" class="label preField" for="tfa_95">{% trans "I need" %}</label><br><div class="inputWrapper"><select aria-required="true" id="tfa_95" name="tfa_95" title="{% trans "I need" %}" class="required"><option value="">{% trans "Please select..." %}</option>
<option value="tfa_194" id="tfa_194" data-conditionals="#tfa_212,#submit_button,#tfa_214,#tfa_163" class="">Help with the donation form</option>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great if we could show localized text for these dropdown options. Let's wrap them in trans

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback Mavis! This makes sense to me, I did not know that dropdown options can also be wrapped in trans! I have updated the PR, and re-requested review for whenever you have time 👍

@danielfmiranda danielfmiranda temporarily deployed to foundation-s-11173-dona-co8e89 November 2, 2023 22:40 Inactive
Copy link
Collaborator

@mmmavis mmmavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work. Thanks @danielfmiranda !

@danielfmiranda danielfmiranda merged commit 01b5634 into feature/donate-help-page Nov 3, 2023
@danielfmiranda danielfmiranda deleted the 11173-donate-help-fa-form-i18n branch November 3, 2023 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants