[Kde-games-devel] Hardcoded Quotation in KGoldrunner

Albert Astals Cid aacid at kde.org
Thu May 21 22:49:03 CEST 2009


A Dijous, 21 de maig de 2009, Frederik Schwarzer va escriure:
> Hi,
>
> there is some oddness of the following code in src/kgoldrunner.cpp
>
>  887     // Now update the PAUSE/RESUME message in the status bar.
>  888     kDebug() << "Update Pause/Resume message ...";
>  889     pauseKeys =
> myPause->shortcut().toString(QKeySequence::NativeText); 890     pauseKeys =
> pauseKeys.replace (';', "\" " + i18n ("or") + " \""); 891     gameFreeze
> (frozen);»···»···// Refresh the status bar text.
>
> The string translators see is
>     Press \"%1\" to PAUSE
>
> In German this is translated as
>     Drücken Sie „%1“, um eine Pause zu machen
>
> Together with the above code, it looks like this in KDE 4.2:
>     Drücken Sie „P" oder " ESC“, um eine Pause zu machen
>
> However, it looks like this in KDE 4.3:
>     Drücken Sie „P“, um eine Pause zu machen
>
> The Shortcut settings are the same.
>
> So, what's going on here?
> If it was changed for KDE 4.3 to only return the primary shortcut then the
> code can be skipped. If there should be both shortcuts, the code is quite
> unfortunate i18n-wise.

Ian changed myPause from KAction * to QAction * in 924446 that's what is 
causing only one shortcut to appear, Ian any reason you did that?

>
> Any Idea how to fix this issue?
>
> - pauseKeys = pauseKeys.replace (';', "\" " + i18n ("or") + " \"");
> + pauseKeys = pauseKeys.replace ("; ", i18nc("closing quotation mark", "\"
> ") + i18n ("or") + i18nc("opening quotation mark"," \""));
>
> ... would probably make things better for translators ... but maybe
> somebody can think of a proper solution.

I'd go with a more simple
pauseKeys = pauseKeys.replace("; ", i18nc("this string goes inside 'Press %1 
to RESUME' and is used if the user has two shortcuts", "\" or \""));

Albert

>
>
> Regards
> _______________________________________________
> kde-games-devel mailing list
> kde-games-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-games-devel




More information about the kde-games-devel mailing list