Skip to content

Commit

Permalink
Misc translation tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalp committed Oct 15, 2023
1 parent a2e37a7 commit 0cf54a1
Show file tree
Hide file tree
Showing 65 changed files with 6,273 additions and 1,231 deletions.
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
4 changes: 2 additions & 2 deletions frontend/src/components/RegisterButton/RegisterButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ 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 +52,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
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 @@ -93,7 +93,7 @@ export function Empty({ category }) {
<Message
message={pgettext(
"category last thread",
"This category is empty. No threads were posted within it so far."
"Empty category"
)}
/>
)
Expand All @@ -107,7 +107,7 @@ export function Private({ category }) {
<Message
message={pgettext(
"category last thread",
"This category is private. You can see only your own threads within it."
"Private category"
)}
/>
)
Expand All @@ -120,7 +120,7 @@ export function Protected({ category }) {
<Message
message={pgettext(
"category last thread",
"This category is protected. You can't browse its contents."
"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
2 changes: 1 addition & 1 deletion frontend/src/components/options/change-username/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default class extends Form {
snackbar.info(
pgettext(
"change username form",
"Your new username is same as current one."
"New username is same as current one."
)
)
return false
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/options/change-username/root.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default class extends React.Component {
snackbar.success(
pgettext(
"change username",
"Your username has been changed successfully."
"Your username has been changed."
)
)
}
Expand Down
29 changes: 7 additions & 22 deletions frontend/src/components/options/delete-account.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ export default class extends React.Component {

if (password.length == 0) {
snackbar.error(
pgettext(
"delete your account form",
"Enter your password to confirm account deletion."
)
pgettext("delete your account form", "Complete the form.")
)
return false
}
Expand Down Expand Up @@ -70,41 +67,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 +101,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
4 changes: 2 additions & 2 deletions frontend/src/components/post-changelog/toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ export function RevertBtn(props) {
disabled={props.disabled}
onClick={props.onClick}
title={pgettext(
"post history modal btn",
"post revert btn",
"Revert post to state from before this edit."
)}
>
{pgettext("post history modal btn", "Revert")}
{pgettext("post revert btn", "Revert")}
</Button>
</div>
)
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/post-feed/post/body.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ export function Invalid(props) {
<div className="post-body post-body-invalid">
<p className="lead">
{pgettext(
"posts feed item body",
"post body invalid",
"This post's contents cannot be displayed."
)}
</p>
<p className="text-muted">
{pgettext(
"posts feed item body",
"post body invalid",
"This error is caused by invalid post content manipulation."
)}
</p>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/posting/PostingThreadOptions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default function PostingThreadOptions({
disabled={disabled}
>
<span className="material-icon">bookmark_outline</span>
{pgettext("post thread", "Pinned locally")}
{pgettext("post thread", "Pinned in category")}
</button>
</li>
)}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/posting/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export default class extends Form {
<MarkupEditor
attachments={[]}
value={""}
submitText={pgettext("post thread submit", "Post thread")}
submitText={pgettext("post thread submit", "Start thread")}
disabled={true}
onAttachmentsChange={() => {}}
onChange={() => {}}
Expand Down
Loading

0 comments on commit 0cf54a1

Please sign in to comment.