Tracker: improved strings
* For these error messages, asking to try with another/shorter file name is unnecessary, because obvious. * Distinguish file and folder name in alert text. * Remove the "r" shortcut. There's only one OK button which already is the default and therefore triggered with ENTER. Why 'r' anyway...? Change-Id: I608ea1505ae51605d4a1b644e5468990a4300683 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6437 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: John Scipione <jscipione@gmail.com> Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This commit is contained in:
parent
ae4d11a4d2
commit
80c9f890df
@ -839,12 +839,15 @@ ShouldEditRefName(const entry_ref* ref, const char* name, size_t length)
|
||||
|
||||
// check if name is too long
|
||||
if (length >= B_FILE_NAME_LENGTH) {
|
||||
BAlert* alert = new BAlert("",
|
||||
B_TRANSLATE("That name is too long. Please type another one."),
|
||||
B_TRANSLATE("OK"),
|
||||
BString text;
|
||||
if (entry.IsDirectory())
|
||||
text = B_TRANSLATE("The entered folder name is too long.");
|
||||
else
|
||||
text = B_TRANSLATE("The entered file name is too long.");
|
||||
|
||||
BAlert* alert = new BAlert("", text, B_TRANSLATE("OK"),
|
||||
0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
||||
alert->SetShortcut(0, 'r');
|
||||
alert->Go();
|
||||
|
||||
return B_NAME_TOO_LONG;
|
||||
@ -865,13 +868,12 @@ ShouldEditRefName(const entry_ref* ref, const char* name, size_t length)
|
||||
|
||||
// check for name conflict
|
||||
if (parent.Contains(name)) {
|
||||
BAlert* alert = new BAlert("",
|
||||
B_TRANSLATE("That name is already taken. "
|
||||
"Please type another one."),
|
||||
B_TRANSLATE("OK"),
|
||||
BString text(B_TRANSLATE("An item named '%filename%' already exists."));
|
||||
text.ReplaceFirst("%filename%", name);
|
||||
|
||||
BAlert* alert = new BAlert("", text, B_TRANSLATE("OK"),
|
||||
0, 0, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
||||
alert->SetShortcut(0, 'r');
|
||||
alert->Go();
|
||||
|
||||
return B_NAME_IN_USE;
|
||||
|
Loading…
Reference in New Issue
Block a user