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

Fix translations #1379

Merged
merged 2 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/client/components/Forms/Columns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {v4 as uuidv4} from 'uuid';

const testId = makeTestId('test-forms-');

const t = makeT('FormView');
const t = makeT('Columns');

export class ColumnsModel extends BoxModel {
private _columnCount = Computed.create(this, use => use(this.children).length);
Expand Down
2 changes: 1 addition & 1 deletion app/client/components/Forms/Editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {icon} from 'app/client/ui2018/icons';
import {BindableValue, dom, DomContents, IDomArgs, MultiHolder, Observable} from 'grainjs';

const testId = makeTestId('test-forms-');
const t = makeT('FormView.Editor');
const t = makeT('Editor');

interface Props {
box: BoxModel,
Expand Down
4 changes: 2 additions & 2 deletions app/client/components/Forms/Field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import * as ko from 'knockout';

const testId = makeTestId('test-forms-');

const t = makeT('FormView');
const t = makeT('Field');

/**
* Container class for all fields.
Expand Down Expand Up @@ -133,7 +133,7 @@ export class FieldModel extends BoxModel {
box: this,
overlay,
removeIcon: 'CrossBig',
removeTooltip: 'Hide',
removeTooltip: t('Hide'),
editMode: this.edit,
content,
},
Expand Down
4 changes: 2 additions & 2 deletions app/client/components/Forms/FormView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -965,5 +965,5 @@ defaults(FormView.prototype, BaseView.prototype);
Object.assign(FormView.prototype, BackboneEvents);

// Default values when form is reset.
const FORM_TITLE = "## **Form Title**";
const FORM_DESC = "Your form description goes here.";
const FORM_TITLE = t("## **Form Title**");
const FORM_DESC = t("Your form description goes here.");
6 changes: 3 additions & 3 deletions app/client/components/Forms/Menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {getColumnTypes as getNewColumnTypes} from 'app/client/ui/GridViewMenus';
import * as menus from 'app/client/ui2018/menus';
import {Computed, dom, IDomArgs, MultiHolder} from 'grainjs';

const t = makeT('FormView');
const t = makeT('Menu');
const testId = makeTestId('test-forms-menu-');

// New box to add, either a new column of type, an existing column (by column id), or a structure.
Expand Down Expand Up @@ -105,7 +105,7 @@ export function buildMenu(props: Props, ...args: IDomArgs<HTMLElement>): IDomArg

const insertMenu = (where: typeof above) => () => {
return [
menus.menuSubHeader('New question'),
menus.menuSubHeader(t('New question')),
...commonTypes()
.filter(isQuick)
.filter(isEnabled)
Expand All @@ -122,7 +122,7 @@ export function buildMenu(props: Props, ...args: IDomArgs<HTMLElement>): IDomArg
)),
{},
menus.menuIcon('Dots'),
dom('span', "More", dom.style('margin-right', '8px'))
dom('span', t("More"), dom.style('margin-right', '8px'))
),
dom.maybe(oneTo5, () => [
menus.menuDivider(),
Expand Down
6 changes: 3 additions & 3 deletions app/client/components/Forms/Section.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import * as menus from 'app/client/ui2018/menus';
import {dom, styled} from 'grainjs';
import {v4 as uuidv4} from 'uuid';

const t = makeT('FormView');
const t = makeT('Section');

const testId = makeTestId('test-forms-');

Expand Down Expand Up @@ -125,8 +125,8 @@ export function Section(...children: FormLayoutNode[]): FormLayoutNode {
id: uuidv4(),
type: 'Section',
children: [
Paragraph('### **Header**'),
Paragraph('Description'),
Paragraph(t('### **Header**')),
Paragraph(t('Description')),
...children,
],
};
Expand Down
2 changes: 1 addition & 1 deletion app/client/ui/UserManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export class UserManager extends Disposable {
// TODO: Consider adding a tooltip explaining inheritance. A brief text caption may
// be used to fill whitespace in org UserManager.
this._model.isOrg ? null : dom('span', { style: `float: left;` },
dom('span', 'Inherit access: '),
dom('span', t('Inherit access: ')),
this._inheritRoleSelector()
),
publicMember ? dom('span', { style: `float: right;` },
Expand Down
18 changes: 13 additions & 5 deletions static/locales/en.client.json
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,8 @@
"Once you have removed your own access, you will not be able to get it back without assistance from someone else with sufficient access to the {{resourceType}}.": "Once you have removed your own access, you will not be able to get it back without assistance from someone else with sufficient access to the {{resourceType}}.",
"User has view access to {{resource}} resulting from manually-set access to resources inside. If removed here, this user will lose access to resources inside.": "User has view access to {{resource}} resulting from manually-set access to resources inside. If removed here, this user will lose access to resources inside.",
"User inherits permissions from {{parent}}. To remove, set 'Inherit access' option to 'None'.": "User inherits permissions from {{parent}}. To remove, set 'Inherit access' option to 'None'.",
"You are about to remove your own access to this {{resourceType}}": "You are about to remove your own access to this {{resourceType}}"
"You are about to remove your own access to this {{resourceType}}": "You are about to remove your own access to this {{resourceType}}",
"Inherit access: ": "Inherit access: "
},
"SearchModel": {
"Search all pages": "Search all pages",
Expand Down Expand Up @@ -1448,7 +1449,9 @@
"Save your document to publish this form.": "Save your document to publish this form.",
"Share": "Share",
"Share this form": "Share this form",
"View": "View"
"View": "View",
"## **Form Title**": "## **Form Title**",
"Your form description goes here.": "Your form description goes here."
},
"Editor": {
"Delete": "Delete"
Expand All @@ -1464,7 +1467,9 @@
"Paste": "Paste",
"Separator": "Separator",
"Unmapped fields": "Unmapped fields",
"Header": "Header"
"Header": "Header",
"New question": "New question",
"More": "More"
},
"UnmappedFieldsConfig": {
"Clear": "Clear",
Expand Down Expand Up @@ -1534,7 +1539,9 @@
},
"Section": {
"Insert section above": "Insert section above",
"Insert section below": "Insert section below"
"Insert section below": "Insert section below",
"### **Header**": "### **Header**",
"Description": "Description"
},
"CreateTeamModal": {
"Cancel": "Cancel",
Expand Down Expand Up @@ -1613,7 +1620,8 @@
},
"Field": {
"No choices configured": "No choices configured",
"No values in show column of referenced table": "No values in show column of referenced table"
"No values in show column of referenced table": "No values in show column of referenced table",
"Hide": "Hide"
},
"Toggle": {
"Checkbox": "Checkbox",
Expand Down