Merge pull request #3265 from overleaf/jpa-i18n-drop-html-from-vars

[misc] i18n: drop html from vars

GitOrigin-RevId: 3cf2aa5a70cc8710693c24bd4b65bddcd4ba09e8
This commit is contained in:
Jakob Ackermann 2020-10-30 13:33:35 +01:00 committed by Copybot
parent b99690d365
commit 36f81a93b9
15 changed files with 58 additions and 32 deletions

View file

@ -20,7 +20,7 @@ script(type="text/ng-template", id="historyRestoreDiffModalTemplate")
span(aria-hidden="true") ×
h3 #{translate("restore")} {{diff.doc.name}}
.modal-body.modal-body-share
p !{translate("sure_you_want_to_restore_before", {filename:"<strong>{{diff.doc.name}}</strong>", date:"{{diff.start_ts | formatDate}}"})}
p !{translate("sure_you_want_to_restore_before", {filename: "{{diff.doc.name}}", date:"{{diff.start_ts | formatDate}}"}, ['strong'])}
.modal-footer
button.btn.btn-default(
ng-click="cancel()",

View file

@ -275,7 +275,7 @@ script(type="text/ng-template", id="ownershipTransferConfirmTemplate")
span(aria-hidden="true") &times;
h3 #{translate("change_project_owner")}
.modal-body
p !{translate('project_ownership_transfer_confirmation_1', { user: '<strong>{{ member.email }}</strong>', project: '<strong>{{ project.name }}</strong>' })}
p !{translate('project_ownership_transfer_confirmation_1', { user: '{{ member.email }}', project: '{{ project.name }}' }, ['strong', 'strong'])}
p #{translate('project_ownership_transfer_confirmation_2')}
.modal-footer
.modal-footer-left

View file

@ -90,9 +90,9 @@ block content
- if (refered_user_count == 0)
p.thanks !{translate("you_not_introed_anyone_to_sl")}
- else if (refered_user_count == 1)
p.thanks !{translate("you_introed_small_number", {numberOfPeople:"<strong>" + refered_user_count + "</strong>"})}
p.thanks !{translate("you_introed_small_number", {numberOfPeople: refered_user_count}, ['strong'])}
- else
p.thanks !{translate("you_introed_high_number", {numberOfPeople:"<strong>" + refered_user_count + "</strong>"})}
p.thanks !{translate("you_introed_high_number", {numberOfPeople: refered_user_count}, ['strong'])}
script(type="text/ng-template", id="BonusLinkToUsModal")
.modal-header

View file

@ -31,4 +31,4 @@
p #{translate('faq_how_to_pay_answer')}
.col-md-6
h3 #{translate('faq_pay_by_invoice_question')}
p !{translate('faq_pay_by_invoice_answer', { payByInvoiceLinkOpen: '<a href="#pay-by-invoice" ng-controller="ContactGeneralModal" ng-click="openModal()">', payByInvoiceLinkClose: '</a>' })}
p !{translate('faq_pay_by_invoice_answer', {}, [{ name: 'a', attrs: { href: "#pay-by-invoice", 'ng-controller': "ContactGeneralModal", 'ng-click': "openModal()" }}])}

View file

@ -7,12 +7,12 @@ div(ng-controller="RecurlySubscriptionController")
div(ng-show="!showCancellation")
case personalSubscription.recurly.state
when "active"
p !{translate("currently_subscribed_to_plan", {planName:"<strong>" + personalSubscription.plan.name + "</strong>"})}
p !{translate("currently_subscribed_to_plan", {planName: personalSubscription.plan.name}, ['strong'])}
|
a(href, ng-click="switchToChangePlanView()", ng-if="showChangePlanButton") &nbsp;!{translate("change_plan")}.
-if (personalSubscription.recurly.trialEndsAtFormatted && personalSubscription.recurly.trial_ends_at > Date.now())
p You're on a free trial which ends on <strong ng-non-bindable>#{personalSubscription.recurly.trialEndsAtFormatted}</strong>
p !{translate("next_payment_of_x_collectected_on_y", {paymentAmmount:"<strong>" + personalSubscription.recurly.price + "</strong>", collectionDate:"<strong>" + personalSubscription.recurly.nextPaymentDueAt + "</strong>"})}
p !{translate("next_payment_of_x_collectected_on_y", {paymentAmmount: personalSubscription.recurly.price, collectionDate: personalSubscription.recurly.nextPaymentDueAt}, ['strong', 'strong'])}
include ./../_price_exceptions
p.pull-right
p
@ -22,8 +22,8 @@ div(ng-controller="RecurlySubscriptionController")
| &nbsp;
a(href, ng-click="switchToCancellationView()", ng-hide="recurlyLoadError").btn.btn-danger !{translate("cancel_your_subscription")}
when "canceled"
p !{translate("currently_subscribed_to_plan", {planName:"<strong>" + personalSubscription.plan.name + "</strong>"})}
p !{translate("subscription_canceled_and_terminate_on_x", {terminateDate:"<strong>" + personalSubscription.recurly.nextPaymentDueAt + "</strong>"})}
p !{translate("currently_subscribed_to_plan", {planName: personalSubscription.plan.name}, ['strong'])}
p !{translate("subscription_canceled_and_terminate_on_x", {terminateDate: personalSubscription.recurly.nextPaymentDueAt}, ['strong'])}
p
a(href=personalSubscription.recurly.accountManagementLink, target="_blank").btn.btn-info #{translate("view_your_invoices")}
p: form(action="/user/subscription/reactivate",method="post")
@ -83,7 +83,7 @@ script(type='text/ng-template', id='confirmChangePlanModalTemplate')
.modal-header
h3 #{translate("change_plan")}
.modal-body
p !{translate("sure_you_want_to_change_plan", {planName:"<strong>{{plan.name}}</strong>"})}
p !{translate("sure_you_want_to_change_plan", {planName: '{{plan.name}}'}, ['strong'])}
.modal-footer
button.btn.btn-default(
ng-disabled="inflight"

View file

@ -8,7 +8,7 @@
.alert.alert-success(ng-show="updateAccountEmailAddress.response.success")
| #{translate('recurly_email_updated')}
div(ng-hide="updateAccountEmailAddress.response.success")
p !{translate("recurly_email_update_needed", { recurlyEmail: "<i>" + personalSubscription.recurly.account.email + "</i>", userEmail: "<i>" + user.email + "</i>" })}
p !{translate("recurly_email_update_needed", { recurlyEmail: personalSubscription.recurly.account.email, userEmail: user.email }, ['em', 'em'])}
.actions
button.btn-primary.btn(
type='submit',

View file

@ -49,15 +49,15 @@ block content
span(ng-if="coupon.discountMonths && coupon.discountRate") &nbsp; - {{coupon.discountMonths}} #{translate("month")}s {{coupon.discountRate}}% Off
div(ng-if="price")
- var priceAngularExp = "<strong>{{ availableCurrencies[currencyCode]['symbol'] }}{{ price.total }}</strong>";
- var priceVars = { price: "{{ availableCurrencies[currencyCode]['symbol'] }}{{ price.total }}"};
span(ng-if="!coupon.singleUse && monthlyBilling")
| !{translate("x_price_per_month", { price: priceAngularExp } )}
| !{translate("x_price_per_month", priceVars, ['strong'] )}
span(ng-if="!coupon.singleUse && !monthlyBilling")
| !{translate("x_price_per_year", { price: priceAngularExp } )}
| !{translate("x_price_per_year", priceVars, ['strong'] )}
span(ng-if="coupon.singleUse && monthlyBilling")
| !{translate("x_price_for_first_month", { price: priceAngularExp } )}
| !{translate("x_price_for_first_month", priceVars, ['strong'] )}
span(ng-if="coupon.singleUse && !monthlyBilling")
| !{translate("x_price_for_first_year", { price: priceAngularExp } )}
| !{translate("x_price_for_first_year", priceVars, ['strong'] )}
div(ng-if="coupon && coupon.normalPrice")
- var noDiscountPriceAngularExp = "{{ availableCurrencies[currencyCode]['symbol']}}{{coupon.normalPrice | number:2 }}";
@ -230,22 +230,19 @@ block content
div.price-breakdown(
ng-show="taxes.length"
)
- var priceBreakdownAngularExp = "<strong>{{ availableCurrencies[currencyCode]['symbol'] }}{{ price.total }}</strong>";
- priceBreakdownAngularExp += " ({{availableCurrencies[currencyCode]['symbol']}}{{ price.subtotal }}";
- priceBreakdownAngularExp += " + " ;
- priceBreakdownAngularExp += "{{availableCurrencies[currencyCode]['symbol']}}{{ price.tax }} tax)";
- var priceBreakdownVars = { total: "{{ availableCurrencies[currencyCode]['symbol'] }}{{ price.total }}", subtotal: "{{availableCurrencies[currencyCode]['symbol']}}{{ price.subtotal }}", tax: "{{availableCurrencies[currencyCode]['symbol']}}{{ price.tax }}" };
hr.thin
span
| Total:
|
span(ng-if="!coupon.singleUse && monthlyBilling")
| !{translate("x_price_per_month", { price: priceBreakdownAngularExp } )}
| !{translate("x_price_per_month_tax", priceBreakdownVars, ['strong'] )}
span(ng-if="!coupon.singleUse && !monthlyBilling")
| !{translate("x_price_per_year", { price: priceBreakdownAngularExp } )}
| !{translate("x_price_per_year_tax", priceBreakdownVars, ['strong'] )}
span(ng-if="coupon.singleUse && monthlyBilling")
| !{translate("x_price_for_first_month", { price: priceBreakdownAngularExp } )}
| !{translate("x_price_for_first_month_tax", priceBreakdownVars, ['strong'] )}
span(ng-if="coupon.singleUse && !monthlyBilling")
| !{translate("x_price_for_first_year", { price: priceBreakdownAngularExp } )}
| !{translate("x_price_for_first_year_tax", priceBreakdownVars, ['strong'] )}
hr.thin
div.payment-submit

View file

@ -38,7 +38,7 @@ block content
.row.row-spaced-large.text-centered
.col-xs-12
p.text-centered !{translate('also_provides_free_plan', { appName:'{{settings.appName}}', registerLinkOpen: '<a href="/register">', registerLinkClose: '</a>' })}
p.text-centered !{translate('also_provides_free_plan', { appName:'{{settings.appName}}' }, [{ name: 'a', attrs: { href: '/register' }}])}
i.fa.fa-cc-mastercard.fa-2x(aria-hidden="true") &nbsp;
span.sr-only Mastercard accepted
i.fa.fa-cc-visa.fa-2x(aria-hidden="true") &nbsp;

View file

@ -11,7 +11,7 @@ block content
.alert.alert-success
- if (personalSubscription.recurly.trial_ends_at)
p !{translate("next_payment_of_x_collectected_on_y", {paymentAmmount:"<strong>"+personalSubscription.recurly.price+"</strong>", collectionDate:"<strong>"+personalSubscription.recurly.nextPaymentDueAt+"</strong>"})}
p !{translate("next_payment_of_x_collectected_on_y", {paymentAmmount: personalSubscription.recurly.price, collectionDate: personalSubscription.recurly.nextPaymentDueAt}, ['strong', 'strong'])}
include ./_price_exceptions
p #{translate("to_modify_your_subscription_go_to")}
a(href="/user/subscription") #{translate("manage_subscription")}.
@ -33,4 +33,4 @@ block content
window.ab = [
{step:1, bucket:"student_control", testName:"editor_plan"},
{step:1, bucket:"collab_test", testName:"editor_plan"},
]
]

View file

@ -11,7 +11,7 @@ block content
h1.text-centered #{translate("move_to_annual_billing")}
div(ng-hide="upgradeComplete")
.row
div.col-md-12 !{translate("change_to_annual_billing_and_save", {percentage:'<strong>20%</strong>', yearlySaving:"<strong>${{yearlySaving}}</strong>"})}
div.col-md-12 !{translate("change_to_annual_billing_and_save", {percentage:'20%', yearlySaving:'${{yearlySaving}}'}, ['strong', 'strong'])}
.row &nbsp;
.row
div.col-md-12

View file

@ -1,7 +1,7 @@
- if(typeof(suggestedLanguageSubdomainConfig) != "undefined")
span(ng-controller="TranslationsPopupController", ng-cloak)
.translations-message(ng-hide="hidei18nNotification")
a(href=suggestedLanguageSubdomainConfig.url+currentUrl) !{translate("click_here_to_view_sl_in_lng", {lngName:"<strong>" + translate(suggestedLanguageSubdomainConfig.lngCode) + "</strong>"})}
a(href=suggestedLanguageSubdomainConfig.url+currentUrl) !{translate("click_here_to_view_sl_in_lng", {lngName: translate(suggestedLanguageSubdomainConfig.lngCode)}, ['strong'])}
img(src=buildImgPath("flags/24/" + suggestedLanguageSubdomainConfig.lngCode + ".png"))
button(ng-click="dismiss()").close.pull-right
span(aria-hidden="true") &times;

View file

@ -9,7 +9,7 @@ block content
.card(ng-controller="UserMembershipController")
.page-header
.pull-right(ng-cloak)
small(ng-show="groupSize && selectedUsers.length == 0") !{translate("you_have_added_x_of_group_size_y", {addedUsersSize:"<strong>{{ users.length }}</strong>", groupSize:"<strong>{{ groupSize }}</strong>"})}
small(ng-show="groupSize && selectedUsers.length == 0") !{translate("you_have_added_x_of_group_size_y", {addedUsersSize:'{{ users.length }}', groupSize: '{{ groupSize }}'}, ['strong', 'strong'])}
a.btn.btn-danger(
href,
ng-show="selectedUsers.length > 0"

View file

@ -41,6 +41,10 @@
"x_price_per_year": "__price__ per year",
"x_price_for_first_month": "__price__ for your first month",
"x_price_for_first_year": "__price__ for your first year",
"x_price_per_month_tax": "<0>__total__</0> (__subtotal__ + __tax__ tax) per month",
"x_price_per_year_tax": "<0>__total__</0> (__subtotal__ + __tax__ tax) per year",
"x_price_for_first_month_tax": "<0>__total__</0> (__subtotal__ + __tax__ tax) for your first month",
"x_price_for_first_year_tax": "<0>__total__</0> (__subtotal__ + __tax__ tax) for your first year",
"normally_x_price_per_month": "Normally __price__ per month",
"normally_x_price_per_year": "Normally __price__ per year",
"then_x_price_per_month": "Then __price__ per month",

View file

@ -13,7 +13,29 @@
localeKey: ['key1', 'key2']
click_here_to_view_sl_in_lng: ['lngName']
*/
const MAPPING = {}
const MAPPING = {
support_lots_of_features: ['help_guides_link'],
nothing_to_install_ready_to_go: ['start_now'],
all_packages_and_templates: ['templatesLink'],
github_merge_failed: ['sharelatex_branch', 'master_branch'],
kb_suggestions_enquiry: ['kbLink'],
sure_you_want_to_restore_before: ['filename'],
you_have_added_x_of_group_size_y: ['addedUsersSize', 'groupSize'],
x_price_per_month: ['price'],
x_price_per_year: ['price'],
x_price_for_first_month: ['price'],
x_price_for_first_year: ['price'],
sure_you_want_to_change_plan: ['planName'],
subscription_canceled_and_terminate_on_x: ['terminateDate'],
next_payment_of_x_collectected_on_y: ['paymentAmmount', 'collectionDate'],
currently_subscribed_to_plan: ['planName'],
recurly_email_update_needed: ['recurlyEmail', 'userEmail'],
change_to_annual_billing_and_save: ['percentage', 'yearlySaving'],
project_ownership_transfer_confirmation_1: ['user', 'project'],
you_introed_high_number: ['numberOfPeople'],
you_introed_small_number: ['numberOfPeople'],
click_here_to_view_sl_in_lng: ['lngName']
}
const { transformLocales } = require('./transformLocales')

View file

@ -13,7 +13,10 @@
localeKey: ['keyLinkOpen', 'keyLinkClose']
faq_pay_by_invoice_answer: ['payByInvoiceLinkOpen', 'payByInvoiceLinkClose']
*/
const MAPPING = {}
const MAPPING = {
also_provides_free_plan: ['registerLinkOpen', 'registerLinkClose'],
faq_pay_by_invoice_answer: ['payByInvoiceLinkOpen', 'payByInvoiceLinkClose']
}
const { transformLocales } = require('./transformLocales')