-
-
Notifications
You must be signed in to change notification settings - Fork 322
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
i18n: userManager translation + some forgotten translations #557
i18n: userManager translation + some forgotten translations #557
Conversation
774c4d9
to
b661cb0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
app/client/models/SearchModel.ts
Outdated
@@ -12,6 +12,10 @@ import {TableData} from 'app/common/TableData'; | |||
import {BaseFormatter} from 'app/common/ValueFormatter'; | |||
import {Computed, Disposable, Observable} from 'grainjs'; | |||
import debounce = require('lodash/debounce'); | |||
import { makeT } from 'app/client/lib/localization'; | |||
|
|||
// Use 'tt' instade of 't', because 't' is already delared in the upper scope |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to use t
here for consistency with all other code. The lint error about t
being already declared is in unrelated lines which seem better candidates to rename the variable (e.g. one maps tables, so could replace t
with table
; and the other maps pages, so could replace t
with page
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh your right, thanks ! I hadn't quite read linter's error, I changed it
app/client/ui/UserManager.ts
Outdated
@@ -103,13 +106,13 @@ export function showUserManagerModal(userApi: UserAPI, options: IUserManagerOpti | |||
if (model.isSelfRemoved.get()) { | |||
const name = resourceName(model.resourceType); | |||
confirmModal( | |||
`You are about to remove your own access to this ${name}`, | |||
'Remove my access', tryToSaveChanges, | |||
t(`You are about to remove your own access to this {{name}}`, { name }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renaming this from "name" to "resourceType" would be clearer I think. It may have values like "document", "workspace", or "team site".
app/client/aclui/AccessRules.ts
Outdated
description: t("Allow editors to edit structure (e.g. modify and delete tables, columns, " + | ||
"layouts), and to write formulas, which give access to all data regardless of read restrictions."), | ||
description: t("Allow editors to edit structure (e.g. modify and delete tables, columns, \ | ||
layouts), and to write formulas, which give access to all data regardless of read restrictions."), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that this is indeed missing from Weblate, and found some issues in i18next-scanner for this (i18next/i18next-scanner#35 and i18next/i18next-scanner#227). Thank you for finding and fixing!
Should the whitespace at the start of the continuation lines be removed? Otherwise the extra whitespace becomes part of the string.
BTW, it looks like there are a few other such instances of concatenated strings; I found some more using this command grep -rI '\bt(.*+$' ./app
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, it's a good point
app/client/ui/UserManager.ts
Outdated
'you will not be able to get it back without assistance ' + | ||
`from someone else with sufficient access to the ${name}.` | ||
t(`Once you have removed your own access, \ | ||
you will not be able to get it back without assistance \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too, it may be better to remove the leading whitespace on continuation lines, even if code ends up less well-aligned.
app/client/ui/UserManager.ts
Outdated
// If the user's access is inherited, give an explanation on how to change it. | ||
dom.maybe((use) => use(inherited) && !isActiveUser, () => menuText( | ||
`User inherits permissions from ${getResourceParent(this._model.resourceType)}. To remove, ` + | ||
`set 'Inherit access' option to 'None'.`)), | ||
t(`User inherits permissions from {{parent})}. To remove, \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think an extra parenthesis crept in inside of })}
.
app/client/ui/UserManager.ts
Outdated
`to resources inside. If removed here, this user will lose access to resources inside.`)), | ||
this._model.isOrg ? menuText(`No default access allows access to be ` + | ||
`granted to individual documents or workspaces, rather than the full team site.`) : null | ||
t(`User has view access to {{ressource}} resulting from manually-set access \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The English version of "resource" has one "s".
@dsagal the PR is ready and unconflicted again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Hi,
I've added userManager translation + some forgotten translations
I've discovered that leaving a '+' in the string breaks the translation (see the
AccessRules.ts
file)