mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-07 23:32:53 +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,
|
// (You must use plain string literals. Do not use _() or wxT() or L prefix,
|
||||||
// which (intentionally) will fail to compile. The macro inserts wxT).
|
// which (intentionally) will fail to compile. The macro inserts wxT).
|
||||||
//
|
//
|
||||||
// Note too: it seems an i18n-hint comment is not extracted if it precedes
|
// Note too: The i18n-hint comment must be on the line preceding the first
|
||||||
// XP directly. A workaround: after the comment, insert a line
|
// string. That might be inside the parentheses of the macro call.
|
||||||
// _("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, ..."
|
|
||||||
//
|
//
|
||||||
// The macro call is then followed by a sequence of format arguments in
|
// 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
|
// parentheses. The third argument of the macro call is the zero-based index
|
||||||
|
@ -318,7 +318,8 @@ TranslatableString ClipBoundaryMessage(
|
|||||||
TranslatableString str;
|
TranslatableString str;
|
||||||
auto nClips = result.waveTrack->GetNumClips();
|
auto nClips = result.waveTrack->GetNumClips();
|
||||||
if (result.nFound < 2) {
|
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"
|
First %s is replaced with the noun "start" or "end"
|
||||||
identifying one end of a clip,
|
identifying one end of a clip,
|
||||||
first number gives the position of that clip in a sequence
|
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
|
and the last string is the name of the track containing the
|
||||||
clips.
|
clips.
|
||||||
*/
|
*/
|
||||||
XO("dummyStringClipBoundaryMessage");
|
|
||||||
str = XP(
|
|
||||||
"%s %d of %d clip %s",
|
"%s %d of %d clip %s",
|
||||||
"%s %d of %d clips %s",
|
"%s %d of %d clips %s",
|
||||||
2
|
2
|
||||||
@ -340,7 +339,8 @@ TranslatableString ClipBoundaryMessage(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* i18n-hint: in the string after this one,
|
str = XP(
|
||||||
|
/* i18n-hint:
|
||||||
First two %s are each replaced with the noun "start"
|
First two %s are each replaced with the noun "start"
|
||||||
or with "end", identifying and end of a clip,
|
or with "end", identifying and end of a clip,
|
||||||
first and second numbers give the position of those clips in
|
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
|
and the last string is the name of the track containing the
|
||||||
clips.
|
clips.
|
||||||
*/
|
*/
|
||||||
XO("dummyStringClipBoundaryMessageLong");
|
|
||||||
str = XP(
|
|
||||||
"%s %d and %s %d of %d clip %s",
|
"%s %d and %s %d of %d clip %s",
|
||||||
"%s %d and %s %d of %d clips %s",
|
"%s %d and %s %d of %d clips %s",
|
||||||
4
|
4
|
||||||
@ -581,12 +579,11 @@ void DoSelectClip(AudacityProject &project, bool next)
|
|||||||
for (auto& result : results) {
|
for (auto& result : results) {
|
||||||
auto longName = result.ComposeTrackName();
|
auto longName = result.ComposeTrackName();
|
||||||
auto nClips = result.waveTrack->GetNumClips();
|
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,
|
first number identifies one of a sequence of clips,
|
||||||
last number counts the clips,
|
last number counts the clips,
|
||||||
string names a track */
|
string names a track */
|
||||||
XO("dummyStringOnSelectClip");
|
|
||||||
auto str = XP(
|
|
||||||
"%d of %d clip %s",
|
"%d of %d clip %s",
|
||||||
"%d of %d clips %s",
|
"%d of %d clips %s",
|
||||||
1
|
1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user