Bug 454085 - Syntax highlighting menu displays over-translated names
Summary: Syntax highlighting menu displays over-translated names
Status: REPORTED
Alias: None
Product: i18n
Classification: Translations
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-20 12:02 UTC by Feufochmar
Modified: 2022-10-09 07:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Feufochmar 2022-05-20 12:02:55 UTC
SUMMARY
The syntax highlighting menu displays translated entries, and it seems that the translation team has not enough context about those entries, so some language names (notably those corresponding to english words) are translated while they should be kept as-is in that context.
In other context, though, those translations would be correct, so it should be ensured that the string displayed in the menu is not the result of a clash between different translations for the same string.

STEPS TO REPRODUCE
1. Star Kate with the french translation (either by setting the language of the system to french, or by starting Kate with the environment variable LANG=fr_FR.UTF-8)
2. Open the syntax highlighting (or mode) menus (Outils => Coloration Syntaxique, Outils => Mode)

OBSERVED RESULT
The entries Racket (script), Scheme (script), and Dart (source) are displayed respectively as "Raquette", "Schéma", and "Fléchette", which are the french translations of the english words "Racket", "Scheme", and "Dart".
The list of translation errors reported here is not exhaustive.

EXPECTED RESULT
Those entries should be displayed as "Racket", "Scheme", and "Dart", the names of the programming languages.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.4

ADDITIONAL INFORMATION
Comment 1 Christoph Cullmann 2022-05-22 15:49:19 UTC
Perhaps we need to add more context in the syntax-highlighting framework during message extraction.

ATM that is done like


# extract language and section names from XML syntax definition files
# and adapt for lupdate-based extraction to match the rest of the code
$EXTRACTATTR --attr=language,name,Language --attr="language,section,Language Section" ../data/syntax/*.xml >> rc.cpp || exit 12
sed -i -e 's/^i18nc/QT_TRANSLATE_NOOP/' rc.cpp

grep --no-filename '"name"' ../data/themes/*.theme | \
  sed -r -e 's/"name"/QT_TRANSLATE_NOOP("Theme", /; s/://; s/,?$/);/' >> rc.cpp


Which kind of context would the i18n team prefer?
Comment 2 Albert Astals Cid 2022-05-22 21:46:47 UTC
@Christoph You need to email kde-i18n-doc@kde.org by assigning the bug to i18n/general you basically are only reaching me :)
Comment 3 Jazeix Johnny 2022-10-09 07:48:39 UTC
I've updated the French translation in https://websvn.kde.org/?revision=1635633&view=revision.
Please take a look in case I missed some (I've kept French on some because it was something like "Apache Configuration" -> "Configuration de « Apache »"

Regarding the msgctxt, it is currently "Language" for all the languages. Maybe having something more verbose like "Programming language"?