Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #998 from Shinsina/rmi-form-translations
Browse files Browse the repository at this point in the history
RMI Form Translations
  • Loading branch information
brandonbk authored Oct 28, 2024
2 parents 28efe4a + 03ec84a commit c0c155c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 32 deletions.
9 changes: 4 additions & 5 deletions packages/marko-web-inquiry/components/form.marko
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { getAsObject } from "@parameter1/base-cms-object-path";
import defaultValue from "@parameter1/base-cms-marko-core/utils/default-value";
import i18n from '../i18n-marko'

$ const { site } = out.global;
$ const { site, i18n } = out.global;
$ const inquiry = site.getAsObject("inquiry");

$ const content = getAsObject(input, "content");
Expand All @@ -11,7 +10,7 @@ $ const withDescription = defaultValue(input.withDescription, true);

$ const blockName = "inquiry-form";
$ const { RECAPTCHA_V3_SITE_KEY } = require('../env');
$ const lang = defaultValue(input.lang, "en");
$ const lang = defaultValue(site.config.lang, "en");

<if(inquiry.enabled)>
<marko-web-block name=blockName modifiers=input.modifiers>
Expand All @@ -21,7 +20,7 @@ $ const lang = defaultValue(input.lang, "en");
<${input.header} inquiry=inquiry />
</if>
<else>
Request More Information
${i18n("Request More Information")}
</else>
</marko-web-element>
</if>
Expand All @@ -31,7 +30,7 @@ $ const lang = defaultValue(input.lang, "en");
<${input.description} inquiry=inquiry />
</if>
<else>
${i18n(lang, "fillOutLabel")}<marko-web-content-name tag="span" block-name=blockName obj=content />
${i18n("Fill out the form below to request more information about ")}<marko-web-content-name tag="span" block-name=blockName obj=content />
</else>
</marko-web-element>
</if>
Expand Down
11 changes: 0 additions & 11 deletions packages/marko-web-inquiry/i18n-marko.js

This file was deleted.

8 changes: 0 additions & 8 deletions packages/marko-web-inquiry/translations-marko.js

This file was deleted.

14 changes: 7 additions & 7 deletions packages/marko-web-inquiry/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ export default {
submitLabel: 'Submit',
},
es: {
firstNameLabel: 'Primer nombre',
surnameLabel: 'Apellidos',
emailLabel: 'Correo electrónico',
phoneLabel: 'Número telefónico',
companyLabel: 'Nombre de compañía',
jobTitleLabel: 'Título de trabajo',
firstNameLabel: 'Nombre',
surnameLabel: 'Apellido',
emailLabel: 'Dirección de correo electrónico',
phoneLabel: 'Telefóno',
companyLabel: 'Nombre de la compañía',
jobTitleLabel: 'Cargo/Posición',
countryLabel: 'País',
countryPlaceholder: 'Selecciona un país...',
countryPlaceholder: 'Seleccione el país...',
zipLabel: 'Código postal',
commentsLabel: 'Comentarios',
submitLabel: 'Enviar',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import defaultValue from "@parameter1/base-cms-marko-core/utils/default-value";

$ const { i18n } = out.global
$ const { content, consentCheckboxes } = input;
$ const initiallyExpanded = defaultValue(input.initiallyExpanded, true);
$ const modifiers = defaultValue(input.modifiers, []);
$ if (initiallyExpanded) modifiers.push("open");
$ const before = i18n("Request More Info");

<marko-web-node-list class="node-list" block-name="inquiry-form" modifiers=modifiers collapsible=false>
<@header>
<marko-web-browser-component
name="ThemeMenuToggleButton"
props={
className: 'inquiry-form-button btn btn-primary',
before: 'Request More Info',
before: before,
targets: ['.node-list.inquiry-form'],
toggleClass: 'inquiry-form--open',
iconName: 'chevron-down',
Expand Down

0 comments on commit c0c155c

Please sign in to comment.