From 987dc252d5da7e12bd52e5f46a9cfa96b7189966 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann Date: Sat, 24 Jul 2021 21:11:34 -0500 Subject: [PATCH] Translate more strings, update catkeys --- application/views/AccountsMenu.cpp | 10 +++++-- application/views/ConversationView.cpp | 28 +++++++++++------- application/views/RosterView.cpp | 4 +-- locales/en.catkeys | 32 +++++++++++++++------ locales/eo.catkeys | 40 ++++++++++++++++++-------- 5 files changed, 79 insertions(+), 35 deletions(-) diff --git a/application/views/AccountsMenu.cpp b/application/views/AccountsMenu.cpp index 387f2d8..cb05429 100644 --- a/application/views/AccountsMenu.cpp +++ b/application/views/AccountsMenu.cpp @@ -4,11 +4,17 @@ */ #include "AccountsMenu.h" + +#include +#include + #include "MainWindow.h" #include "Server.h" #include "TheApp.h" -#include + +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "AccountsMenu" AccountsMenu::AccountsMenu(const char* name, BMessage msg, BMessage* allMsg) @@ -49,7 +55,7 @@ AccountsMenu::_PopulateMenu() RemoveItems(0, CountItems(), true); if (fAllMessage != NULL) - AddItem(new BMenuItem("All", new BMessage(*fAllMessage))); + AddItem(new BMenuItem(B_TRANSLATE("All"), new BMessage(*fAllMessage))); Server* server = ((TheApp*)be_app)->GetMainWindow()->GetServer(); AccountInstances accounts = server->GetActiveAccounts(); diff --git a/application/views/ConversationView.cpp b/application/views/ConversationView.cpp index d27bf36..e11bc1a 100644 --- a/application/views/ConversationView.cpp +++ b/application/views/ConversationView.cpp @@ -10,6 +10,7 @@ #include "ConversationView.h" +#include #include #include #include @@ -31,6 +32,10 @@ #include "Utils.h" +#undef B_TRANSLATION_CONTEXT +#define B_TRANSLATION_CONTEXT "ConversationView" + + ConversationView::ConversationView() : BGroupView("chatView", B_VERTICAL, B_USE_DEFAULT_SPACING), @@ -145,39 +150,42 @@ ConversationView::ImMessage(BMessage* msg) case IM_ROOM_JOINED: { BMessage msg; - msg.AddString("body", "** You joined the room.\n"); + msg.AddString("body", B_TRANSLATE("** You joined the room.\n")); _AppendOrEnqueueMessage(&msg); fReceiveView->ScrollToBottom(); } case IM_ROOM_CREATED: { BMessage msg; - msg.AddString("body", "** You created the room.\n"); + msg.AddString("body", B_TRANSLATE("** You created the room.\n")); _AppendOrEnqueueMessage(&msg); fReceiveView->ScrollToBottom(); } case IM_ROOM_PARTICIPANT_JOINED: { - _UserMessage("%user% has joined the room.\n", - "%user% has joined the room (%body%).\n", msg); + _UserMessage(B_TRANSLATE("%user% has joined the room.\n"), + B_TRANSLATE("%user% has joined the room (%body%).\n"), + msg); break; } case IM_ROOM_PARTICIPANT_LEFT: { - _UserMessage("%user% has left the room.\n", - "%user% has left the room (%body%).\n", msg); + _UserMessage(B_TRANSLATE("%user% has left the room.\n"), + B_TRANSLATE("%user% has left the room (%body%).\n"), + msg); break; } case IM_ROOM_PARTICIPANT_KICKED: { - _UserMessage("%user% was kicked.\n", - "%user% was kicked (%body%).\n", msg); + _UserMessage(B_TRANSLATE("%user% was kicked.\n"), + B_TRANSLATE("%user% was kicked (%body%).\n"),msg); break; } case IM_ROOM_PARTICIPANT_BANNED: { - _UserMessage("%user% has been banned.\n", - "%user% has been banned (%body%).\n", msg); + _UserMessage(B_TRANSLATE("%user% has been banned.\n"), + B_TRANSLATE("%user% has been banned (%body%).\n"), + msg); break; } default: diff --git a/application/views/RosterView.cpp b/application/views/RosterView.cpp index 6b93321..ccaca32 100644 --- a/application/views/RosterView.cpp +++ b/application/views/RosterView.cpp @@ -150,9 +150,9 @@ RosterView::ImMessage(BMessage* msg) message << rosterItem->GetContact()->GetName(); if (status == STATUS_ONLINE) - message.SetTo("%name% is available!"); + message.SetTo(B_TRANSLATE("%name% is available!")); else - message.SetTo("%name% is offline!"); + message.SetTo(B_TRANSLATE("%name% is offline!")); message.ReplaceAll("%name%", rosterItem->GetContact()->GetName()); diff --git a/locales/en.catkeys b/locales/en.catkeys index e4a7aef..f603ea2 100644 --- a/locales/en.catkeys +++ b/locales/en.catkeys @@ -1,10 +1,14 @@ -1 English application/x-vnd.cardie 2325201334 +1 English application/x-vnd.cardie 1762272810 Disable deskbar replicant PreferencesReplicant Disable deskbar replicant New mention Conversation ― Notifications New mention Auto-raise when a message is received PreferencesBehavior Auto-raise when a message is received +On incoming… PreferencesBehavior On incoming… Account name: AccountDialog Account name: Connected Server Connected +User information UserInfoWindow User information +%name% is offline! RosterView %name% is offline! Preferences… MainWindow Preferences… +** You created the room.\n ConversationView ** You created the room.\n Adding contact RosterEditWindow Adding contact Deskbar replicant PreferencesReplicant Deskbar replicant Add account PreferencesAccounts Add account @@ -13,15 +17,17 @@ Enable PreferencesAccounts Enable %app% is released under the GNU GPL License.\nSome parts of %app% are available under MIT license.\nBuilt: %buildDate% TheApp %app% is released under the GNU GPL License.\nSome parts of %app% are available under MIT license.\nBuilt: %buildDate% Create room MainWindow Create room New chat… ConversationListView New chat… +Chat view PreferencesChatWindow Chat view Hide field in Deskbar PreferencesReplicant Hide field in Deskbar -Ouch! TheApp Ouch! Edit roster… MainWindow Edit roster… +Ouch! TheApp Ouch! Join a room MainWindow Join a room OK PreferencesWindow OK Enable protocol status notifications PreferencesBehavior Enable protocol status notifications Send a file… RosterListView Send a file… Are you sure you want to quit? MainWindow Are you sure you want to quit? Del PreferencesAccounts Short for 'delete' Del +%name% is available! RosterView %name% is available! New message Conversation ― Notifications New message Some items are empty. Please make sure to fill out every item. TemplateWindow Some items are empty. Please make sure to fill out every item. Enable message notifications PreferencesBehavior Enable message notifications @@ -33,31 +39,36 @@ Play sound event PreferencesBehavior Play sound event You've been summoned from %source%. Conversation ― Notifications You've been summoned from %source%. Disabled Server Disabled That isn't a valid command. Try /help for a list. Conversation ― Command info That isn't a valid command. Try /help for a list. +** You joined the room.\n ConversationView ** You joined the room.\n -- That command doesn't exist. Try '/help' for a list.\n Server -- That command doesn't exist. Try '/help' for a list.\n OK TemplateWindow OK Reject InviteDialogue Reject \nWritten by:\n About window \nWritten by:\n Disable PreferencesAccounts Disable +All AccountsMenu All Offline Utils ― Status names Offline %user% has been disabled! Server %user% has been disabled! You've been invited to %room%. Server You've been invited to %room%. Invite user… UserListView Invite user… Add PreferencesAccounts Add Preferences PreferencesWindow Preferences +Deskbar notifications PreferencesBehavior Deskbar notifications General PreferencesBehavior General Presence RosterView Presence Cancel TemplateWindow Cancel Hide offline contacts PreferencesBehavior Hide offline contacts +%user% has joined the room.\n ConversationView %user% has joined the room.\n Busy Utils ― Status names Busy Roster RosterEditWindow Roster Don't ask confirmation at Quit PreferencesBehavior Don't ask confirmation at Quit Closing MainWindow Closing Available Utils ― Status names Available Up MainWindow Up +Invite user… MainWindow Invite user… Custom Status Utils ― Status names Custom Status Can't find smileys settings in:\n\n%path% TheApp Can't find smileys settings in:\n\n%path% -Invite user… MainWindow Invite user… Mark unread window chat PreferencesBehavior Mark unread window chat +%user% has left the room.\n ConversationView %user% has left the room.\n Join room… MainWindow Join room… Preferences ReplicantStatusView Preferences Quit MainWindow Quit @@ -67,12 +78,12 @@ Chat settings PreferencesChatWindow Chat settings Cancel InviteDialogue Cancel Mark unread the Deskbar Replicant PreferencesBehavior Mark unread the Deskbar Replicant OK Server OK -Deskbar Notifications (experimental) PreferencesBehavior Deskbar Notifications (experimental) Exit ReplicantStatusView Exit User info… RosterListView User info… Move window to current workspace PreferencesBehavior Move window to current workspace Away Utils ― Status names Away OK AccountDialog OK +%user% has been banned.\n ConversationView %user% has been banned.\n Editing contact RosterEditWindow Editing contact %user% isn't a member of this room. ChatCommand %user% isn't a member of this room. Edit account PreferencesAccounts Edit account @@ -88,22 +99,25 @@ Error Server Error Copyright © About window Copyright © Roster MainWindow Roster Accept InviteDialogue Accept +%user% was kicked (%body%).\n ConversationView %user% was kicked (%body%).\n An error is occurred renaming the account to %name%! AccountDialog An error is occurred renaming the account to %name%! %user% has invited you to %room%. Server %user% has invited you to %room%. Permanent deskbar replicant PreferencesReplicant Permanent deskbar replicant Default User role Default +%user% has been banned (%body%).\n ConversationView %user% has been banned (%body%).\n Invite contact to chat… MainWindow Invite contact to chat… %user% has connected! Server %user% has connected! +Window MainWindow Window Invisible Utils ― Status names Invisible {0, plural,=1{You've got a new message from %source%.}other{You've got # new messages from %source%.}} Conversation ― Notifications {0, plural,=1{You've got a new message from %source%.}other{You've got # new messages from %source%.}} -Window MainWindow Window -On incoming message… PreferencesBehavior On incoming message… +%user% has joined the room (%body%).\n ConversationView %user% has joined the room (%body%).\n Yes MainWindow Yes An error has occured saving the settings.\nCheck if your disk has enough space. AccountDialog An error has occured saving the settings.\nCheck if your disk has enough space. Close About window Close +%user% has left the room (%body%).\n ConversationView %user% has left the room (%body%).\n New chat… MainWindow New chat… -Edit… PreferencesAccounts Edit… -About… MainWindow About… New room… MainWindow New room… +About… MainWindow About… +Edit… PreferencesAccounts Edit… +%user% was kicked.\n ConversationView %user% was kicked.\n You aren't contacts with and have no chats in common with %user%. Shame. ChatCommand You aren't contacts with and have no chats in common with %user%. Shame. -Chat display PreferencesChatWindow Chat display diff --git a/locales/eo.catkeys b/locales/eo.catkeys index 219b78c..d368591 100644 --- a/locales/eo.catkeys +++ b/locales/eo.catkeys @@ -1,10 +1,14 @@ -1 Esperanto application/x-vnd.cardie 2325201334 +1 Esperanto application/x-vnd.cardie 1762272810 Disable deskbar replicant PreferencesReplicant Malŝalti laborstrian replikilon New mention Conversation ― Notifications Menciita Auto-raise when a message is received PreferencesBehavior Antaŭigi fenestron ricevinte mesaĝon +On incoming… PreferencesBehavior Ricevante mesaĝon… Account name: AccountDialog Kontonomo: Connected Server Konektite +User information UserInfoWindow Uzantinformoj +%name% is offline! RosterView %name% senkonektas! Preferences… MainWindow Agordoj… +** You created the room.\n ConversationView ** Vi kreis la ĉambron.\n Adding contact RosterEditWindow Aldonante amikon Deskbar replicant PreferencesReplicant Laborstria replikilo Add account PreferencesAccounts Aldoni konton @@ -13,15 +17,17 @@ Enable PreferencesAccounts Ŝalti %app% is released under the GNU GPL License.\nSome parts of %app% are available under MIT license.\nBuilt: %buildDate% TheApp %app% GNU GPL License.\nSome parts of %app% are available under MIT license.\nBuilt: %buildDate% Create room MainWindow Krei ĉambron New chat… ConversationListView Novan interparolon… +Chat view PreferencesChatWindow Babilvido Hide field in Deskbar PreferencesReplicant -Ouch! TheApp Aj ve! Edit roster… MainWindow Redakti amikojn… +Ouch! TheApp Aj ve! Join a room MainWindow Aliĝi ĉambron OK PreferencesWindow Bone Enable protocol status notifications PreferencesBehavior Ŝalti statsciigojn de protokoloj Send a file… RosterListView Sendi dosieron… Are you sure you want to quit? MainWindow Ĉu vi certe volas ĉesi? Del PreferencesAccounts Short for 'delete' For +%name% is available! RosterView %name% disponeblas! New message Conversation ― Notifications Ricevite Some items are empty. Please make sure to fill out every item. TemplateWindow Iom da agorderoj malplenas. Bonvole plenigu ĉiun. Enable message notifications PreferencesBehavior Ŝalti sciigojn de mesaĝricevoj @@ -33,31 +39,36 @@ Play sound event PreferencesBehavior Ludi sonon You've been summoned from %source%. Conversation ― Notifications Vi vokiĝis de %source%. Disabled Server Malŝaltita That isn't a valid command. Try /help for a list. Conversation ― Command info Tiu komando nevalidas. Provu /help por komandlisto. +** You joined the room.\n ConversationView ** Vi eniris la ĉambron.\n -- That command doesn't exist. Try '/help' for a list.\n Server -- Tiu komando neekzistas. Provu '/help' por komandolisto.\n OK TemplateWindow Bone Reject InviteDialogue Rifuzi \nWritten by:\n About window \nVerkita de:\n Disable PreferencesAccounts Malŝalti +All AccountsMenu Ĉiu Offline Utils ― Status names Senkonekta %user% has been disabled! Server %user% malŝaltiĝis! You've been invited to %room%. Server Vi invitiĝis al %room%. Invite user… UserListView Inviti uzanton… Add PreferencesAccounts Aldoni Preferences PreferencesWindow Agordoj +Deskbar notifications PreferencesBehavior Laborstriaj sciigoj General PreferencesBehavior Ĝenerale Presence RosterView Ĉeeststato Cancel TemplateWindow Rezigni Hide offline contacts PreferencesBehavior Kaŝi senkonektajn amikojn +%user% has joined the room.\n ConversationView %user% eniris la ĉambron.\n Busy Utils ― Status names Okupata Roster RosterEditWindow Amikoj Don't ask confirmation at Quit PreferencesBehavior Ne petu certigon antaŭ Ĉeso Closing MainWindow Ĉesante Available Utils ― Status names Disponebla Up MainWindow Supren +Invite user… MainWindow Inviti uzanton… Custom Status Utils ― Status names Propre skribita stato Can't find smileys settings in:\n\n%path% TheApp Ne troviĝis emocisimbilojn ĉe:\n\n%path% -Invite user… MainWindow Inviti uzanton… Mark unread window chat PreferencesBehavior Marki fenestron pro nelegitaj mesaĝoj +%user% has left the room.\n ConversationView %user% eliris de la ĉambro.\n Join room… MainWindow Aliĝi ĉambron… Preferences ReplicantStatusView Agordoj Quit MainWindow Ĉesi @@ -67,12 +78,12 @@ Chat settings PreferencesChatWindow Babilagordoj Cancel InviteDialogue Rezigni Mark unread the Deskbar Replicant PreferencesBehavior Marki replikilon pro nelegitaj mesaĝoj OK Server Bone -Deskbar Notifications (experimental) PreferencesBehavior Laborstriaj sciigoj (danĝeraj) Exit ReplicantStatusView Ĉesi User info… RosterListView Uzantinformoj… Move window to current workspace PreferencesBehavior Movi fenestron al nuna laborspaco Away Utils ― Status names Fora OK AccountDialog Bone +%user% has been banned.\n ConversationView %user% forbariĝis.\n Editing contact RosterEditWindow Redaktante amikon %user% isn't a member of this room. ChatCommand %user% ne apartenas ĉi tiun ĉambron. Edit account PreferencesAccounts Redakti konton @@ -88,25 +99,30 @@ Error Server Eraro Copyright © About window Kopirajto © Roster MainWindow Amikoj Accept InviteDialogue Akordi +%user% was kicked (%body%).\n ConversationView %user% foriĝis (%body%).\n An error is occurred renaming the account to %name%! AccountDialog Eraris renomante la konton al %name%! %user% has invited you to %room%. Server %user% invitis vin al %room%. Permanent deskbar replicant PreferencesReplicant Memdaŭriga laborstria replikilo Default User role Implicita +%user% has been banned (%body%).\n ConversationView %user% forbariĝis (%body%).\n Invite contact to chat… MainWindow Inviti amikon al ĉambro… %user% has connected! Server %user% ĵus konektiĝis! +Window MainWindow Fenestro Invisible Utils ― Status names Nevidebla {0, plural,=1{You've got a new message from %source%.}other{You've got # new messages from %source%.}} Conversation ― Notifications {0, plural,=1{Vi ricevis novan mesaĝon de %source%.}other{Vi ricevis # mesaĝojn de %source%.}} -Window MainWindow Fenestro -On incoming message… PreferencesBehavior Ricevante mesaĝon… +%user% has joined the room (%body%).\n ConversationView %user% eniris la ĉambron (%body%).\n Yes MainWindow Jes An error has occured saving the settings.\nCheck if your disk has enough space. AccountDialog Eraros konservante agordojn.\nBonvole certigu ke via disko sufiĉe malplenas. Close About window Fermi +%user% has left the room (%body%).\n ConversationView %user% eliris de la ĉambro (%body%).\n New chat… MainWindow Novan interparolon… -Edit… PreferencesAccounts Redakti… -About… MainWindow Pri… New room… MainWindow Novan ĉambron… +About… MainWindow Pri… +Edit… PreferencesAccounts Redakti… +%user% was kicked.\n ConversationView %user% foriĝis.\n You aren't contacts with and have no chats in common with %user%. Shame. ChatCommand Vi ne amikas kun nek apartenas ĉambron kun %user%. Domaĝe. -Chat display PreferencesChatWindow Interparola fasado -splay -lay -lay + +. +e. +. +e.