mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-29 15:19:44 +02:00
Correct placement of i18n-hint comments for plurals, no dummies needed
This commit is contained in:
parent
f8a070dde7
commit
d8a096ba03
@ -72,15 +72,8 @@ extern AUDACITY_DLL_API const wxString& GetCustomSubstitution(const wxString& st
|
||||
// (You must use plain string literals. Do not use _() or wxT() or L prefix,
|
||||
// which (intentionally) will fail to compile. The macro inserts wxT).
|
||||
//
|
||||
// Note too: it seems an i18n-hint comment is not extracted if it precedes
|
||||
// XP directly. A workaround: after the comment, insert a line
|
||||
// _("dummyStringXXXX");
|
||||
// where for XXXX subsitute something making this dummy string unique in the
|
||||
// program. Then check in your generated audacity.pot that the dummy is
|
||||
// immediately before the singular/plural entry.
|
||||
//
|
||||
// Your i18n-comment should therefore say something like,
|
||||
// "In the string after this one, ..."
|
||||
// Note too: The i18n-hint comment must be on the line preceding the first
|
||||
// string. That might be inside the parentheses of the macro call.
|
||||
//
|
||||
// The macro call is then followed by a sequence of format arguments in
|
||||
// parentheses. The third argument of the macro call is the zero-based index
|
||||
|
@ -318,7 +318,8 @@ TranslatableString ClipBoundaryMessage(
|
||||
TranslatableString str;
|
||||
auto nClips = result.waveTrack->GetNumClips();
|
||||
if (result.nFound < 2) {
|
||||
/* i18n-hint: in the string after this one,
|
||||
str = XP(
|
||||
/* i18n-hint:
|
||||
First %s is replaced with the noun "start" or "end"
|
||||
identifying one end of a clip,
|
||||
first number gives the position of that clip in a sequence
|
||||
@ -327,8 +328,6 @@ TranslatableString ClipBoundaryMessage(
|
||||
and the last string is the name of the track containing the
|
||||
clips.
|
||||
*/
|
||||
XO("dummyStringClipBoundaryMessage");
|
||||
str = XP(
|
||||
"%s %d of %d clip %s",
|
||||
"%s %d of %d clips %s",
|
||||
2
|
||||
@ -340,7 +339,8 @@ TranslatableString ClipBoundaryMessage(
|
||||
);
|
||||
}
|
||||
else {
|
||||
/* i18n-hint: in the string after this one,
|
||||
str = XP(
|
||||
/* i18n-hint:
|
||||
First two %s are each replaced with the noun "start"
|
||||
or with "end", identifying and end of a clip,
|
||||
first and second numbers give the position of those clips in
|
||||
@ -349,8 +349,6 @@ TranslatableString ClipBoundaryMessage(
|
||||
and the last string is the name of the track containing the
|
||||
clips.
|
||||
*/
|
||||
XO("dummyStringClipBoundaryMessageLong");
|
||||
str = XP(
|
||||
"%s %d and %s %d of %d clip %s",
|
||||
"%s %d and %s %d of %d clips %s",
|
||||
4
|
||||
@ -581,12 +579,11 @@ void DoSelectClip(AudacityProject &project, bool next)
|
||||
for (auto& result : results) {
|
||||
auto longName = result.ComposeTrackName();
|
||||
auto nClips = result.waveTrack->GetNumClips();
|
||||
/* i18n-hint: in the string after this one,
|
||||
auto str = XP(
|
||||
/* i18n-hint:
|
||||
first number identifies one of a sequence of clips,
|
||||
last number counts the clips,
|
||||
string names a track */
|
||||
XO("dummyStringOnSelectClip");
|
||||
auto str = XP(
|
||||
"%d of %d clip %s",
|
||||
"%d of %d clips %s",
|
||||
1
|
||||
|
Loading…
x
Reference in New Issue
Block a user