On Sat, 16 Aug 2008, Paolo Bonzini wrote: > Chris Lattner wrote: > > Please don't forget C++. > > C++ is a completely lost battle. I had a patch to handle all the %s in the > source base, but my approach (which basically implied adding translatable > strings for "a class", "to a class", "with a class", "in a class", etc. to > account for languages with cases) was considered bad. > > See http://gcc.gnu.org/ml/gcc-patches/2002-06/msg01620.html for my patch. I > cannot find the answer.
I don't know why it was considered bad (and had thought it was simply never reviewed), but I am happy to review such patches as i18n maintainer (including in Stage 3 - they are clearly bug fixes) if the front-end maintainers don't reject them. However, I think they would need splitting up for review. For example: * Local changes that simply use two or more sentences in a particular place should be separate from more complicated changes like the cp-i18n.c there (but many such local changes could be grouped together). * If passing around an enumeration rather than a sentence fragment, such changes should be split up according to the function whose interface they change. * Where there are relevant bug reports (e.g. 29017 29897 29917 31665 34836) please make sure to include them in the ChangeLog message. * I am not a C++ expert, so if the patch depends on C++ details for which combinations of cases can actually occur and so need messages included then it may still need a C++ maintainer review. I'm not convinced by the cp-i18n.c approach, however, although there may be cases where it's necessary. My preference would be to use full sentences if at all possible (see the WARN_FOR_ASSIGNMENT macro in the C front end and other diagnostics in convert_for_assignment, for example, or readonly_error for another such case). In some cases where this isn't feasible in the source (c_parse_error, format checking - I think all other C cases are fixed) it might be possible for the exgettext script to create all combinations and for full sentences still to be passed for translation -- Joseph S. Myers [EMAIL PROTECTED]