fix: minor spelling and wording changes for en and de (#2096)

Minor spelling and wording changes

I went through some of english and german localizations to correct or add minor things.

Added `invalid-tag-name` to json. Which also means it should be translated elsewhere.
This commit is contained in:
Derek Reiff 2023-08-06 20:26:57 -07:00 committed by GitHub
parent 4d3e4358e8
commit f9d1080a7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 31 deletions

View file

@ -27,14 +27,14 @@ func (t *telegramHandler) BotToken(ctx context.Context) string {
}
const (
workingMessage = "Working on send your memo..."
workingMessage = "Working on sending your memo..."
successMessage = "Success"
)
func (t *telegramHandler) MessageHandle(ctx context.Context, bot *telegram.Bot, message telegram.Message, attachments []telegram.Attachment) error {
reply, err := bot.SendReplyMessage(ctx, message.Chat.ID, message.MessageID, workingMessage)
if err != nil {
return fmt.Errorf("fail to SendReplyMessage: %s", err)
return fmt.Errorf("Failed to SendReplyMessage: %s", err)
}
var creatorID int32
@ -79,7 +79,7 @@ func (t *telegramHandler) MessageHandle(ctx context.Context, bot *telegram.Bot,
memoMessage, err := t.store.CreateMemo(ctx, create)
if err != nil {
_, err := bot.EditMessage(ctx, message.Chat.ID, reply.MessageID, fmt.Sprintf("failed to CreateMemo: %s", err), nil)
_, err := bot.EditMessage(ctx, message.Chat.ID, reply.MessageID, fmt.Sprintf("Failed to CreateMemo: %s", err), nil)
return err
}
@ -95,13 +95,13 @@ func (t *telegramHandler) MessageHandle(ctx context.Context, bot *telegram.Bot,
err := apiv1.SaveResourceBlob(ctx, t.store, &create, bytes.NewReader(attachment.Data))
if err != nil {
_, err := bot.EditMessage(ctx, message.Chat.ID, reply.MessageID, fmt.Sprintf("failed to SaveResourceBlob: %s", err), nil)
_, err := bot.EditMessage(ctx, message.Chat.ID, reply.MessageID, fmt.Sprintf("Failed to SaveResourceBlob: %s", err), nil)
return err
}
resource, err := t.store.CreateResource(ctx, &create)
if err != nil {
_, err := bot.EditMessage(ctx, message.Chat.ID, reply.MessageID, fmt.Sprintf("failed to CreateResource: %s", err), nil)
_, err := bot.EditMessage(ctx, message.Chat.ID, reply.MessageID, fmt.Sprintf("Failed to CreateResource: %s", err), nil)
return err
}
@ -110,7 +110,7 @@ func (t *telegramHandler) MessageHandle(ctx context.Context, bot *telegram.Bot,
ResourceID: resource.ID,
})
if err != nil {
_, err := bot.EditMessage(ctx, message.Chat.ID, reply.MessageID, fmt.Sprintf("failed to UpsertMemoResource: %s", err), nil)
_, err := bot.EditMessage(ctx, message.Chat.ID, reply.MessageID, fmt.Sprintf("Failed to UpsertMemoResource: %s", err), nil)
return err
}
}
@ -125,7 +125,7 @@ func (t *telegramHandler) CallbackQueryHandle(ctx context.Context, bot *telegram
var visibility store.Visibility
n, err := fmt.Sscanf(callbackQuery.Data, "%s %d", &visibility, &memoID)
if err != nil || n != 2 {
return bot.AnswerCallbackQuery(ctx, callbackQuery.ID, fmt.Sprintf("fail to parse callbackQuery.Data %s", callbackQuery.Data))
return bot.AnswerCallbackQuery(ctx, callbackQuery.ID, fmt.Sprintf("Failed to parse callbackQuery.Data %s", callbackQuery.Data))
}
update := store.UpdateMemo{
@ -134,16 +134,16 @@ func (t *telegramHandler) CallbackQueryHandle(ctx context.Context, bot *telegram
}
err = t.store.UpdateMemo(ctx, &update)
if err != nil {
return bot.AnswerCallbackQuery(ctx, callbackQuery.ID, fmt.Sprintf("fail to call UpdateMemo %s", err))
return bot.AnswerCallbackQuery(ctx, callbackQuery.ID, fmt.Sprintf("Failed to call UpdateMemo %s", err))
}
keyboard := generateKeyboardForMemoID(memoID)
_, err = bot.EditMessage(ctx, callbackQuery.Message.Chat.ID, callbackQuery.Message.MessageID, fmt.Sprintf("Saved as %s Memo %d", visibility, memoID), keyboard)
if err != nil {
return bot.AnswerCallbackQuery(ctx, callbackQuery.ID, fmt.Sprintf("fail to EditMessage %s", err))
return bot.AnswerCallbackQuery(ctx, callbackQuery.ID, fmt.Sprintf("Failed to EditMessage %s", err))
}
return bot.AnswerCallbackQuery(ctx, callbackQuery.ID, fmt.Sprintf("Success change Memo %d to %s", memoID, visibility))
return bot.AnswerCallbackQuery(ctx, callbackQuery.ID, fmt.Sprintf("Success changing Memo %d to %s", memoID, visibility))
}
func generateKeyboardForMemoID(id int32) [][]telegram.InlineKeyboardButton {

View file

@ -56,7 +56,7 @@ const CreateTagDialog: React.FC<Props> = (props: Props) => {
const handleSaveBtnClick = async () => {
if (!validateTagName(tagName)) {
toast.error("Invalid tag name");
toast.error(t("tag-list.invalid-tag-name"));
return;
}

View file

@ -91,7 +91,7 @@
"cant-empty": "Inhalt kann nicht leer sein",
"local": "Lokal",
"resources": "Ressourcen",
"editing": "Editing..."
"editing": "Bearbeitung..."
},
"memo": {
"view-detail": "Details anzeigen",
@ -132,7 +132,9 @@
"text-placeholder": "Beginne einen Regex mit ^"
},
"tag-list": {
"tip-text": "Erstelle einen Tag mit `#tag`"
"all-tags": "Alle Tags",
"tip-text": "Erstelle einen Tag mit `#tag`",
"invalid-tag-name": "Ungültiger Tagname"
},
"search": {
"quickly-filter": "Schnellfilter"
@ -184,11 +186,11 @@
"light": "Hell",
"dark": "Dunkel"
},
"storage": "Storage",
"storage": "Speicherung",
"sso": "SSO",
"storage-section": {
"storage-services-list": "Storage service list",
"create-a-service": "Create a service",
"create-a-service": "Erstelle einen Service",
"update-a-service": "Update a service",
"warning-text": "Are you sure to delete this storage service? THIS ACTION IS IRREVERSIBLE❗",
"delete-storage": "Delete Storage"
@ -204,6 +206,7 @@
},
"message": {
"no-memos": "Keine Memos 🌃",
"no-data": "Vielleicht keine Daten gefunden?",
"memos-ready": "Alle Memos geladen 🎉",
"restored-successfully": "Erfolgreich wiederhergestellt",
"memo-updated-datetime": "Erstellungszeitpunkt geändert.",
@ -240,7 +243,7 @@
"succeed-update-additional-script": "Zusätzliches Skript wurde erfolgreich aktualisiert",
"update-succeed": "Update erfolgreich",
"succeed-copy-code": "Succeed to copy code to clipboard.",
"page-not-found": "404 - Page Not Found 😥"
"page-not-found": "404 - Seite nicht gefunden 😥"
},
"days": {
"monday": "Montag",

View file

@ -75,7 +75,7 @@
"auth": {
"signup-as-host": "Sign up as Host",
"host-tip": "You are registering as the Site Host.",
"not-host-tip": "If you don't have an account, please contact the site host.",
"not-host-tip": "If you dont have an account, please contact the site host.",
"new-password": "New password",
"repeat-new-password": "Repeat the new password"
},
@ -85,7 +85,7 @@
"save": "Save",
"placeholder": "Any thoughts...",
"only-image-supported": "Only image file supported.",
"cant-empty": "Content can't be empty",
"cant-empty": "Content cant be empty",
"local": "Local",
"resources": "Resources"
},
@ -95,7 +95,7 @@
"embed": "Embed",
"archived-memos": "Archived Memos",
"no-archived-memos": "No archived memos.",
"fetching-data": "fetching data...",
"fetching-data": "Fetching data...",
"fetch-more": "Click here to fetch more",
"archived-at": "Archived at",
"search-placeholder": "Search memos",
@ -106,11 +106,11 @@
"disabled": "Public memos are disabled"
},
"delete-memo": "Delete Memo",
"delete-confirm": "Are you sure to delete this memo?\n\nTHIS ACTION IS IRREVERSIBLE❗"
"delete-confirm": "Are you sure you want to delete this memo?\n\nTHIS ACTION IS IRREVERSIBLE❗"
},
"resource": {
"no-resources": "No resources.",
"fetching-data": "fetching data...",
"fetching-data": "Fetching data...",
"copy-link": "Copy Link",
"reset-link": "Reset Link",
"reset-resource-link": "Reset Resource Link",
@ -151,7 +151,8 @@
"tip-text": "Input `#tag` to create",
"create-tag": "Create Tag",
"all-tags": "All Tags",
"tag-name": "TAG_NAME"
"tag-name": "TAG_NAME",
"invalid-tag-name": "Invalid tag name"
},
"daily-review": {
"title": "Daily Review",
@ -189,7 +190,7 @@
"mobile-editor-style": "Mobile editor style",
"default-memo-sort-option": "Memo display time",
"telegram-user-id": "Telegram UserID",
"telegram-user-id-placeholder": "Send any words to Your Telegram Bot to get",
"telegram-user-id-placeholder": "Send any words to your Telegram Bot as a memo",
"created_ts": "Created Time",
"updated_ts": "Updated Time",
"daily-review-time-offset": "Daily Review Time Offset",
@ -247,7 +248,7 @@
"database-file-size": "Database File Size",
"allow-user-signup": "Allow user signup",
"disable-password-login": "Disable password login",
"disable-password-login-warning": "This will disable password login for all users. It is not possible to log in without reverting this setting in the database if your configured identity providers fail. You'll also have to be extra carefull when removing an identity provider❗",
"disable-password-login-warning": "This will disable password login for all users. It is not possible to log in without reverting this setting in the database if your configured identity providers fail. Youll also have to be extra carefull when removing an identity provider❗",
"disable-password-login-final-warning": "Please type \"CONFIRM\" if you know what you are doing.",
"enable-password-login": "Enable password login",
"enable-password-login-warning": "This will enable password login for all users. Continue only if you want to users to be able to log in using both SSO and password❗",
@ -334,7 +335,7 @@
"day_other": "TAGE"
},
"message": {
"no-data": "Maybe no data was found, maybe it should be another option.",
"no-data": "Maybe no data was found, or maybe it should be another option.",
"memos-ready": "all memos are ready 🎉",
"resource-ready": "all resource are ready 🎉",
"restored-successfully": "Restored successfully",
@ -354,7 +355,7 @@
"signup-failed": "Signup failed",
"user-not-found": "User not found",
"password-changed": "Password Changed",
"private-only": "This memo is private only.",
"private-only": "This memo is set to private.",
"copied": "Copied",
"succeed-copy-content": "Content copied successfully.",
"succeed-copy-code": "Code copied successfully.",
@ -367,9 +368,9 @@
"count-selected-resources": "Total selected",
"too-short": "Too short",
"too-long": "Too long",
"not-allow-space": "Don't allow space",
"not-allow-chinese": "Don't allow chinese",
"succeed-vacuum-database": "Succeed to vacuum database",
"not-allow-space": "Dont allow space",
"not-allow-chinese": "Dont allow chinese",
"succeed-vacuum-database": "Successfully vacuumed database.",
"succeed-update-additional-style": "Additional style updated successfully.",
"succeed-copy-resource-link": "Resource link copied successfully.",
"succeed-update-customized-profile": "Profile successfully customized.",
@ -379,7 +380,7 @@
"maximum-upload-size-is": "Maximum allowed upload size is {{size}} MiB",
"file-exceeds-upload-limit-of": "File {{file}} exceeds upload limit of {{size}} MiB",
"updating-setting-failed": "Updating setting failed",
"password-login-disabled": "Can't remove last identity provider when password login is disabled"
"password-login-disabled": "Cant remove last identity provider when password login is disabled"
},
"days": {
"mon": "Mon",
@ -392,7 +393,7 @@
},
"embed-memo": {
"title": "Embed Memo",
"text": "Copy and paste the below codes into your blog or website.",
"text": "Copy and paste the below code into your blog or website.",
"only-public-supported": "* Only public memos can be embedded.",
"copy": "Copy"
},