Correct. But for the cases where the string is a simple "Duplicating %'d file" string. Which is usually the case when using ngettext for getting a singular/plural translation. Removing the %'d in the translation has no effect because it is evaluated to something like printf("Duplicating one file", 1). Ofcourse if more then one control sequences are in a single singular/plural message then all of the control sequences must be kept. If something like "%'d file in %B" is needed then it should be done by printf(gettext("%s in %B"), ngettext("%'d fi;e, %'d files, (int)files), special_var);
On Sun, Nov 2, 2008 at 12:00 PM, Ori Hoch <[EMAIL PROTECTED]> wrote: > thanks Yair, I think I understand the problem now, > > I'll try to describe it in more detail: > > problem 1: > > english string is - "Moving %B" > printf is called like this - printf("Moving %B",special_variable) > the %B is replaced with special_variable - using some custom function which > parses special_variable and returns a string > so far so good > now we translate the string by mistake to - "Moving %s" > printf is called like this - printf("Moving %s",special_variable) > %s excepts a string, but instead is getting a special_variable! ERROR! > > problem 2: > > the english string is - "Duplicating %'d file (in \"%B\")" > printf is called like this - printf("Duplicating %'d file (in > \"%B\")",1,special_variable) > %'d is replaced with the number (1) > %B is replaced with the special_variable (using the custom function) > > now we are translating the string to - "Duplicating one file (in \"%B\")" > printf is now called like this - printf("Duplicating one file (in > \"%B\")",1,special_variable) > %B is replaced with the number (1) - the custom function is called with the > number (1) - this results in an error because the custom function excepts a > special_variable > > -- > nautilus crashed with SIGSEGV in g_file_query_info() > https://bugs.launchpad.net/bugs/234248 > You received this bug notification because you are a direct subscriber > of the bug. > -- nautilus crashed with SIGSEGV in g_file_query_info() https://bugs.launchpad.net/bugs/234248 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs