Bug 419070 - "Duplicate item" doesn't work with Spanish locale
Summary: "Duplicate item" doesn't work with Spanish locale
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 20.03.80
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Nate Graham
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-21 11:53 UTC by Antonio Rojas
Modified: 2020-04-05 22:49 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 20.04.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Rojas 2020-03-21 11:53:42 UTC
SUMMARY
This is a combination of issues in Dolphin itself and in the spanish translation: the correct translation of "foo copy" is "copia de foo". 

In the non-empty extension case, "%1%2 copy%3" ("<file path><filename> copy.<extension>") is wrongly translated as "Copia de %1%2%3" (it should be "%1Copia de %2%3"). This prevent writing the copy. 

On the other hand, in the empty extension case, there is no sepatare <file path> and <filename> tokens, which makes it impossible to translate it properly to Spanish. It's also confusing that the <file path> token means a different thing in each case.
Comment 1 Nate Graham 2020-03-23 19:53:48 UTC
Oops, sorry about that. Here's a patch to fix it on the Dolphin side: https://phabricator.kde.org/D28227
Comment 2 Nate Graham 2020-04-05 22:49:01 UTC
Git commit 9b82b08fb18724662c69ed288b1a36a215548539 by Nate Graham.
Committed on 05/04/2020 at 22:48.
Pushed by ngraham into branch 'release/20.04'.

Use same logic for "no extension" case with Duplicate feature

Summary:
In the "no extension" case, we weren't separating out the path and the original filename,
breaking the feature for languages where the word "copy" would be at the beginning of the
filename, not after it (e.g. "copia de foo" in Spanish, and similar in other romance
languages). This patch fixes that by separating the original path and filename in the no
extension case as is done for the other case, which should solve the issue.
FIXED-IN: 20.04.0

Test Plan:
No changes in English; should fix the issue in Spanish once new translations are done
(see https://bugs.kde.org/show_bug.cgi?id=419070 for details)

Reviewers: #dolphin, elvisangelaccio, arojas, meven, pino, #localization

Reviewed By: #dolphin, elvisangelaccio

Subscribers: aacid, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D28227

M  +4    -3    src/views/dolphinview.cpp

https://commits.kde.org/dolphin/9b82b08fb18724662c69ed288b1a36a215548539