mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 07:02:39 +00:00
Using stringdicts for pluralization on duplicate entry action
This commit is contained in:
@@ -786,13 +786,12 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou
|
||||
[self duplicateEntryWithOptions:kKPKCopyOptionNone];
|
||||
}
|
||||
|
||||
- (void)duplicateEntryWithOptions:(KPKCopyOptions)options {
|
||||
BOOL plural = self.selectedEntries.count > 1;
|
||||
- (void)duplicateEntryWithOptions:(KPKCopyOptions)options {
|
||||
for(KPKEntry *entry in self.selectedEntries) {
|
||||
KPKEntry *duplicate = [entry copyWithTitle:nil options:options];
|
||||
[duplicate addToGroup:entry.parent];
|
||||
}
|
||||
[self.undoManager setActionName:plural ? NSLocalizedString(@"DUPLICATE_ENTRIES", "") : NSLocalizedString(@"DUPLICATE_ENTRY", "")];
|
||||
[self.undoManager setActionName:[NSString stringWithFormat:NSLocalizedString(@"DUPLICATE_ENTRIES_%ld", @"Action name for duplicating entries"), self.selectedEntries.count]];
|
||||
}
|
||||
|
||||
#pragma mark Validation
|
||||
|
||||
@@ -162,14 +162,13 @@
|
||||
/* No comment provided by engineer. */
|
||||
"DOCUMENT_AUTOTYPE_CORRUPTION_WARNING" = "Bitte Autotypekorrektur durchführen!";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"DUPLICATE_ENTRIES" = "Eintrag klonen";
|
||||
|
||||
/* Menu item to directly diplicate an entry */
|
||||
"DUPLICATE_ENTRY" = "Eintrag klonen";
|
||||
"DUPLICATE_ENTRY" = "Eintrag duplizieren";
|
||||
|
||||
"DUPLICATE_ENTRIES_%ld" = "Einträge duplizieren %ld";
|
||||
|
||||
/* Menu item to duplicate an entry with options how to duplicate. Will present a dialog. */
|
||||
"DUPLICATE_ENTRY_WITH_OPTIONS" = "Eintrag klonen …";
|
||||
"DUPLICATE_ENTRY_WITH_OPTIONS" = "Eintrag duplizieren…";
|
||||
|
||||
/* (No Comment) */
|
||||
"DUPLICTE_PASSWORDS" = "Doppelte Passwörter";
|
||||
|
||||
@@ -1,12 +1,40 @@
|
||||
{
|
||||
"EVERY_%ld_DAYS" = {
|
||||
NSStringLocalizedFormatKey = "%#@variable@";
|
||||
variable = {
|
||||
NSStringFormatSpecTypeKey = NSStringPluralRuleType;
|
||||
NSStringFormatValueTypeKey = ld;
|
||||
one = "jeden Tag";
|
||||
other = "alle %ld Tage";
|
||||
zero = "nach jedem Entsperren";
|
||||
};
|
||||
};
|
||||
}
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>DUPLICATE_ENTRIES_%ld</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
<string>%#@entries@</string>
|
||||
<key>entries</key>
|
||||
<dict>
|
||||
<key>NSStringFormatSpecTypeKey</key>
|
||||
<string>NSStringPluralRuleType</string>
|
||||
<key>NSStringFormatValueTypeKey</key>
|
||||
<string>ld</string>
|
||||
<key>one</key>
|
||||
<string>Eintrag duplizieren</string>
|
||||
<key>other</key>
|
||||
<string>Einträge duplizieren</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>EVERY_%ld_DAYS</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
<string>%#@days@</string>
|
||||
<key>days</key>
|
||||
<dict>
|
||||
<key>NSStringFormatSpecTypeKey</key>
|
||||
<string>NSStringPluralRuleType</string>
|
||||
<key>NSStringFormatValueTypeKey</key>
|
||||
<string>ld</string>
|
||||
<key>one</key>
|
||||
<string>jeden Tag</string>
|
||||
<key>other</key>
|
||||
<string>alle %ld Tage</string>
|
||||
<key>zero</key>
|
||||
<string>nach jedem Entsperren</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -176,10 +176,10 @@
|
||||
"DOCUMENT_AUTOTYPE_CORRUPTION_WARNING" = "Please run Fix Autotype...";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"DUPLICATE_ENTRIES" = "Duplicate Entries";
|
||||
"DUPLICATE_ENTRY" = "Duplicate Entry";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"DUPLICATE_ENTRY" = "Duplicate Entry";
|
||||
"DUPLICATE_ENTRIES_%ld" = "Duplicate Entries %ld";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"DUPLICATE_ENTRY_WITH_OPTIONS" = "Duplicate Entry…";
|
||||
@@ -496,10 +496,10 @@
|
||||
"WARNING_NO_PASSWORD_OR_KEYFILE" = "No password or keyfile supplied!";
|
||||
|
||||
/* Informative Text displayed when clearing the Trash */
|
||||
"WARNING_ON_DELETE_TRASHED_NODE_DESCRIPTION" = "The Items in the Trash will be deleted permanentely. You cannot undo this action!";
|
||||
"WARNING_ON_DELETE_TRASHED_NODE_DESCRIPTION" = "The Trashed item(s) will be deleted!";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"WARNING_ON_DELETE_TRASHED_NODE_TITLE" = "Deleting Item";
|
||||
"WARNING_ON_DELETE_TRASHED_NODE_TITLE" = "Deleting Trashed Item";
|
||||
|
||||
/* Informative Text displayed when clearing the Trash */
|
||||
"WARNING_ON_EMPTY_TRASH_DESCRIPTION" = "Emptying the Trash is not undoable.";
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
{
|
||||
"EVERY_%ld_DAYS" = {
|
||||
NSStringLocalizedFormatKey = "%#@variable@";
|
||||
variable = {
|
||||
NSStringFormatSpecTypeKey = NSStringPluralRuleType;
|
||||
NSStringFormatValueTypeKey = ld;
|
||||
one = "every day";
|
||||
other = "every %ld days";
|
||||
zero = "after each unlock";
|
||||
};
|
||||
};
|
||||
"DUPLICATE_ENTRIES_%ld" = {
|
||||
"NSStringLocalizedFormatKey" = "%#@entries@";
|
||||
entries = {
|
||||
"NSStringFormatValueTypeKey" = ld;
|
||||
"NSStringFormatSpecTypeKey" = "NSStringPluralRuleType";
|
||||
one = "Duplicate Entry";
|
||||
other = "Duplicate Entries";
|
||||
};
|
||||
};
|
||||
"EVERY_%ld_DAYS" = {
|
||||
"NSStringLocalizedFormatKey" = "%#@days@";
|
||||
days = {
|
||||
"NSStringFormatSpecTypeKey" = "NSStringPluralRuleType";
|
||||
"NSStringFormatValueTypeKey" = ld;
|
||||
one = "every day";
|
||||
other = "every %ld days";
|
||||
zero = "after each unlock";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -360,7 +360,7 @@
|
||||
"RECOMMEND_PASSWORD_CHANGE_ALERT_TITLE" = "Proszę zmienić hasło bazy danych!";
|
||||
|
||||
/* Action to restore and Entry to a previous state of it's history */
|
||||
"RESTORE_HISTORY_ENTRY" = "";
|
||||
"RESTORE_HISTORY_ENTRY" = "RESTORE_HISTORY_ENTRY";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"SAVE" = "Zapisz";
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"EVERY_%ld_DAYS" = {
|
||||
NSStringLocalizedFormatKey = "%#@variable@";
|
||||
variable = {
|
||||
NSStringFormatSpecTypeKey = NSStringPluralRuleType;
|
||||
NSStringFormatValueTypeKey = ld;
|
||||
few = "co %ld dni";
|
||||
many = "co %ld dni";
|
||||
one = "co dzie\U0144";
|
||||
other = "co %ld dni";
|
||||
zero = "po ka\U017cdym odblokowaniu";
|
||||
};
|
||||
};
|
||||
"EVERY_%ld_DAYS" = {
|
||||
"NSStringLocalizedFormatKey" = "%#@days@";
|
||||
days = {
|
||||
"NSStringFormatSpecTypeKey" = "NSStringPluralRuleType";
|
||||
"NSStringFormatValueTypeKey" = ld;
|
||||
few = "co %ld dni";
|
||||
many = "co %ld dni";
|
||||
one = "co dzie\U0144";
|
||||
other = "co %ld dni";
|
||||
zero = "po ka\U017cdym odblokowaniu";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user