Skip to content

Commit

Permalink
Localize the intro messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbruens committed Sep 30, 2023
1 parent 376865b commit 502fc09
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
8 changes: 6 additions & 2 deletions src/www/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"contact-view-exit-cannot-add-server": "The Outline team is not able to assist with adding a server. Please try the troubleshooting steps listed {beginUrl}here{endUrl} and then contact the person who gave you the access key to troubleshoot this issue.",
"contact-view-exit-connection": "The Outline team is not able to assist with connecting to a server. Please try the troubleshooting steps listed {beginUrl}here{endUrl} and then contact the person who gave you the access key to troubleshoot this issue.",
"contact-view-exit-no-server": "The Outline team does not distribute free or paid access keys. {beginUrl}Learn more about how to get an access key.{endUrl}",
"contact-view-exit-open-ticket": "We are currently experiencing high support volume and appreciate your patience. Please do not submit a new request for this concern. If you have additional information to provide, please reply to the initial email about this request.",
"contact-view-intro": "Tell us how we can help. Please explain your issue in detail and do not enter personal information that is not requested below.",
"contact-view-issue-cannot-add-server": "I am having trouble adding a server using my access key",
"contact-view-issue-connection": "I am having trouble connecting to my Outline VPN server",
"contact-view-issue-general": "General feedback & suggestions",
Expand All @@ -21,7 +23,7 @@
"contact-view-issue-no-server": "I need an access key",
"contact-view-issue-performance": "My internet access is slow while connected to my Outline VPN server",
"contact-view-issue": "Outline issue",
"contact-view-open-ticket": "We are currently experiencing high support volume and appreciate your patience. Please do not submit a new request for this concern. If you have additional information to provide, please reply to the initial email about this request.",
"contact-view-open-ticket": "Do you have an open ticket for this issue?",
"data-collection": "Data collection",
"disconnect-button-label": "Disconnect",
"disconnected-server-state": "Disconnected",
Expand Down Expand Up @@ -56,6 +58,7 @@
"language-page-title": "Select a language",
"learn-more": "Learn More",
"licenses-page-title": "Licenses",
"no": "No",
"non-system-vpn-warning-detail": "Most browsers connect automatically with Outline, some do not.",
"non-system-vpn-warning-title": "Verify your browser connection",
"tray-open-window": "Open",
Expand Down Expand Up @@ -124,5 +127,6 @@
"unreachable-server-state": "Unreachable",
"unsupported-cipher": "Unsupported cipher",
"update-downloaded": "An updated version of Outline has been downloaded. It will be installed when you restart Outline.",
"version": "Version {appVersion}"
"version": "Version {appVersion}",
"yes": "Yes"
}
16 changes: 7 additions & 9 deletions src/www/views/contact_view/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,17 @@ export class ContactView extends LitElement {
private readonly openTicketSelectionOptions: Array<{
ref: Ref<Radio>;
value: boolean;
label: string;
labelMsg: string;
}> = [
{
ref: createRef(),
value: true,
label: 'Yes',
labelMsg: 'yes',
},
{
ref: createRef(),
value: false,
label: 'No',
labelMsg: 'no',
},
];

Expand All @@ -133,7 +133,7 @@ export class ContactView extends LitElement {
const radio = e.target as Radio;
const hasOpenTicket = radio.value;
if (hasOpenTicket) {
this.exitTemplate = html`${this.localize('contact-view-open-ticket')}`;
this.exitTemplate = html`${this.localize('contact-view-exit-open-ticket')}`;
this.step = Step.EXIT;
return;
}
Expand Down Expand Up @@ -202,9 +202,7 @@ export class ContactView extends LitElement {
}

private get renderIntroTemplate(): TemplateResult {
return html`
<p>Tell us how we can help. Please do not enter personal information that is not requested below.</p>
`;
return html`<p>${this.localize('contact-view-intro')}</p>`;
}

private get renderForm(): TemplateResult | typeof nothing {
Expand Down Expand Up @@ -240,13 +238,13 @@ export class ContactView extends LitElement {
default: {
return html`
${this.renderIntroTemplate}
<p>Do you have an open ticket for this issue?</p>
<p>${this.localize('contact-view-open-ticket')}</p>
<ol>
${this.openTicketSelectionOptions.map(
element => html`
<li>
<mwc-formfield label=${element.label}>
<mwc-formfield .label=${this.localize(element.labelMsg)}>
<mwc-radio
name="open-ticket"
.value="${element.value}"
Expand Down

0 comments on commit 502fc09

Please sign in to comment.