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

Misc translation tweaks #1644

Merged
merged 9 commits into from
Nov 6, 2023
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 frontend/src/components/MarkupEditor/MarkupCodeModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class MarkupCodeModal extends React.Component {
data-dismiss="modal"
type="button"
>
{gettext("Cancel")}
{pgettext("markup editor", "Cancel")}
</button>
<button className="btn btn-primary">
{pgettext("markup editor", "Insert code")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const MarkupEditorFooter = ({
</Button>
)}
<Button className="btn-primary btn-auto" disabled={disabled || empty}>
{submitText || gettext("Post")}
{submitText || pgettext("markup editor", "Post")}
</Button>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const MarkupEditorToolbar = ({
</ul>
</div>
<MarkupEditorButton
title={pgettext("markup editor", "Formatting help")}
title={pgettext("markup editor", "Open formatting help")}
icon="help_outline"
onClick={() => {
modal.show(<MarkupFormattingHelpModal />)
Expand Down
13 changes: 7 additions & 6 deletions frontend/src/components/MarkupEditor/MarkupImageModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ class MarkupImageModal extends React.Component {
<form onSubmit={this.handleSubmit}>
<div className="modal-body">
<FormGroup
for="markup_link_url"
for="markup_image_text"
label={pgettext("markup editor", "Image description")}
helpText={pgettext(
"markup editor",
"Optional but recommended . Will be displayed instead of image when it fails to load."
)}
>
<input
id="markup_link_text"
id="markup_image_text"
className="form-control"
type="text"
value={this.state.text}
Expand All @@ -79,15 +79,16 @@ class MarkupImageModal extends React.Component {
/>
</FormGroup>
<FormGroup
for="markup_link_url"
label={pgettext("markup editor", "Image address")}
for="markup_image_url"
label={pgettext("markup editor", "Image URL")}
validation={!!this.state.error ? [this.state.error] : undefined}
>
<input
id="markup_link_url"
id="markup_image_url"
className="form-control"
type="text"
value={this.state.url}
placeholder="http://domain.com/image.png"
onChange={(event) =>
this.setState({ url: event.target.value })
}
Expand All @@ -100,7 +101,7 @@ class MarkupImageModal extends React.Component {
data-dismiss="modal"
type="button"
>
{gettext("Cancel")}
{pgettext("markup editor", "Cancel")}
</button>
<button className="btn btn-primary">
{pgettext("markup editor", "Insert image")}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/MarkupEditor/MarkupLinkModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class MarkupLinkModal extends React.Component {
data-dismiss="modal"
type="button"
>
{gettext("Cancel")}
{pgettext("markup editor", "Cancel")}
</button>
<button className="btn btn-primary">
{pgettext("markup editor", "Insert link")}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/MarkupEditor/MarkupQuoteModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class MarkupQuoteModal extends React.Component {
data-dismiss="modal"
type="button"
>
{gettext("Cancel")}
{pgettext("markup editor", "Cancel")}
</button>
<button className="btn btn-primary">
{pgettext("markup editor", "Insert quote")}
Expand Down
7 changes: 5 additions & 2 deletions frontend/src/components/RegisterButton/RegisterButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ export default class RegisterButton extends React.Component {

if (misago.get("SETTINGS").account_activation === "closed") {
snackbar.info(
pgettext("register form", "New registrations are currently disabled.")
pgettext(
"register form",
"Registration form is currently disabled by the site administrator."
)
)
} else if (this.state.isLoaded) {
modal.show(<RegisterForm criteria={this.state.criteria} />)
Expand All @@ -52,7 +55,7 @@ export default class RegisterButton extends React.Component {
snackbar.error(
pgettext(
"register form",
"Registration is currently unavailable due to an error."
"Registration form is currently unavailable due to an error."
)
)
}
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/components/ThreadsList/ThreadsListEmpty.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const ThreadsListEmpty = ({ category, list, message }) => {
return (
<li className="list-group-item empty-message">
<p className="lead">{message}</p>
<p>{pgettext("threads list empty", "Why not start one yourself?")}</p>
</li>
)
}
Expand All @@ -17,14 +16,13 @@ const ThreadsListEmpty = ({ category, list, message }) => {
{category.special_role
? pgettext(
"threads list empty",
"There are no threads on this forum... yet!"
"There are no threads on this site yet."
)
: pgettext(
"threads list empty",
"There are no threads in this category."
)}
</p>
<p>{pgettext("threads list empty", "Why not start one yourself?")}</p>
</li>
)
}
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/categories/category/list-item/icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ export function getClassName(category) {
export function getTitle(category) {
if (category.is_closed) {
if (category.is_read) {
return gettext(
return pgettext(
"category status",
"This category has no new posts. (closed)"
)
}

return gettext("category status", "This category has new posts. (closed)")
return pgettext("category status", "This category has new posts. (closed)")
}

if (category.is_read) {
return gettext("category status", "This category has no new posts.")
return pgettext("category status", "This category has no new posts.")
}

return gettext("category status", "This category has new posts.")
return pgettext("category status", "This category has new posts.")
}

export function getIcon(category) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,7 @@ export function Empty({ category }) {
if (category.last_thread_title) return null

return (
<Message
message={pgettext(
"category last thread",
"This category is empty. No threads were posted within it so far."
)}
/>
<Message message={pgettext("category last thread", "Empty category")} />
)
}

Expand All @@ -104,25 +99,15 @@ export function Private({ category }) {
if (category.acl.can_see_all_threads) return null

return (
<Message
message={pgettext(
"category last thread",
"This category is private. You can see only your own threads within it."
)}
/>
<Message message={pgettext("category last thread", "Private category")} />
)
}

export function Protected({ category }) {
if (category.acl.can_browse) return null

return (
<Message
message={pgettext(
"category last thread",
"This category is protected. You can't browse its contents."
)}
/>
<Message message={pgettext("category last thread", "Protected category")} />
)
}

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/merge-conflict.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export function BestAnswerSelect({ choices, onChange, value }) {
label={pgettext("merge threads conflict best answer", "Best answer")}
helpText={pgettext(
"merge threads conflict best answer",
"Please select the best answer for your newly merged thread. No posts will be deleted during the merge."
"Select the best answer for your newly merged thread. No posts will be deleted during the merge."
)}
for="id_best_answer"
>
Expand Down Expand Up @@ -145,7 +145,7 @@ export function PollSelect({ choices, onChange, value }) {
label={pgettext("merge threads conflict poll", "Poll")}
helpText={pgettext(
"merge threads conflict poll",
"Please select the poll for your newly merged thread. Rejected polls will be permanently deleted and cannot be recovered."
"Select the poll for your newly merged thread. Rejected polls will be permanently deleted and cannot be recovered."
)}
for="id_poll"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default class extends React.Component {
} else {
return pgettext(
"change username",
"You have used up available name changes."
"You have changed your name allowed number of times."
)
}
}
Expand Down
5 changes: 1 addition & 4 deletions frontend/src/components/options/change-username/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,7 @@ export default class extends Form {
}
if (this.state.username.trim() === this.props.user.username) {
snackbar.info(
pgettext(
"change username form",
"Your new username is same as current one."
)
pgettext("change username form", "New username is same as current one.")
)
return false
} else {
Expand Down
5 changes: 1 addition & 4 deletions frontend/src/components/options/change-username/root.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ export default class extends React.Component {
store.dispatch(updateUsername(this.props.user, username, slug))

snackbar.success(
pgettext(
"change username",
"Your username has been changed successfully."
)
pgettext("change username", "Your username has been changed.")
)
}

Expand Down
31 changes: 7 additions & 24 deletions frontend/src/components/options/delete-account.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,7 @@ export default class extends React.Component {
const { user } = this.props

if (password.length == 0) {
snackbar.error(
pgettext(
"delete your account form",
"Enter your password to confirm account deletion."
)
)
snackbar.error(pgettext("delete your account form", "Complete the form."))
return false
}

Expand Down Expand Up @@ -70,41 +65,28 @@ export default class extends React.Component {
</h3>
</div>
<div className="panel-body">
<p className="lead">
{pgettext(
"delete your account form",
"You are going to delete your account. This action is nonreversible, and will result in following data being deleted:"
)}
</p>

<p>
-{" "}
{pgettext(
"delete your account form",
"Stored IP addresses associated with content that you have posted will be deleted."
"This form lets you delete your account. This action is not reversible."
)}
</p>
<p>
-{" "}
{pgettext(
"delete your account form",
"Your username will become available for other user to rename to or for new user to register their account with."
"Your account will be deleted together with its profile details, IP addresses and notifications."
)}
</p>
<p>
-{" "}
{pgettext(
"delete your account form",
"Your e-mail will become available for use in new account registration."
"Other content will NOT be deleted, but username displayed next to it will be changed to one shared by all deleted accounts."
)}
</p>

<hr />

<p>
{pgettext(
"delete your account form",
"All your posted content will NOT be deleted, but username associated with it will be changed to one shared by all deleted accounts."
"Your username and e-maill address will become available again for use during registration or for other accounts to change to."
)}
</p>
</div>
Expand All @@ -117,9 +99,10 @@ export default class extends React.Component {
type="password"
placeholder={pgettext(
"delete your account form field",
"Enter your password to confirm account deletion."
"Enter your password to confirm"
)}
value={this.state.password}
required
onChange={this.onPasswordChange}
/>
<span className="input-group-btn">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/options/edit-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class extends React.Component {

onSuccess = () => {
snackbar.info(
pgettext("profile details form", "Your details have been updated.")
pgettext("profile details form", "Your details have been changed.")
)
}

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/options/forum-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export default class ForumOptionsForm extends Form {
})
)
snackbar.success(
pgettext("forum options form", "Your forum options have been updated.")
pgettext("forum options form", "Your forum options have been changed.")
)
}

Expand Down Expand Up @@ -184,7 +184,7 @@ export default class ForumOptionsForm extends Form {
label={pgettext("forum options form", "Hide my presence")}
helpText={pgettext(
"forum options form",
"If you hide your presence, only members with permission to see hidden users will see when you are online."
"If you hide your presence, only members with permission to see hidden presence will see when you are online."
)}
for="id_is_hiding_presence"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const UnusablePasswordMessage = () => {
<h3 className="panel-title">
{pgettext(
"change sign in credentials title",
"Change email or password"
"Change e-mail or password"
)}
</h3>
</div>
Expand All @@ -20,7 +20,7 @@ const UnusablePasswordMessage = () => {
<p className="lead">
{pgettext(
"change sign in credentials",
"You need to set a password for your account to be able to change your username or email."
"You need to set a password for your account to be able to change your e-mail or password."
)}
</p>
<p className="help-block">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default class extends Form {
]

if (lengths.indexOf(0) !== -1) {
snackbar.error(gettext("Fill out all fields."))
snackbar.error(pgettext("change password form", "Fill out all fields."))
return false
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default class extends React.Component {
title.set({
title: pgettext(
"change sign in credentials title",
"Change email or password"
"Change e-mail or password"
),
parent: pgettext("forum options", "Change your options"),
})
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/poll/voting/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default class extends Form {
clean() {
if (this.state.choicesLeft === this.props.poll.allowed_choices) {
snackbar.error(
pgettext("thread poll vote", "You need to select at least one choice")
pgettext("thread poll vote", "You need to select at least one choice.")
)
return false
}
Expand Down
Loading