Hi Przemek,
> If I understand what you need then you want to take some clean .pot > file generated by Harbour and make some automatic translation for > sentences which are already translated in some other files. > You can find tools which makes such operations designed for gettext. > Harbour hb18n does not have such functionality but I can add it using > some new switch, f.e.: > -a add automatic translations to 1-st .pot file using translations > from other .pot or .hbl files Yes, it's what you say, just put in the other way. IMO such switch would be very useful as we wouldn't need any external tools to deal with. > > [ I have a local tool that does this (with some house specific tweak), > > but I wanted to use Harbour tools only. This tool would move deleted > > entries to a backup file because it may contain useful content. Also, > > new entries are marked with date of addition to help translators. ] > > I'm not sure we are talking about the same functionality. > Will the above -a option cover your needs? Yes. The extra feature I mentioned here is that no longer used translations are retained (saved to another file), so that they can be used as a base for translators. It happens many times that just a small part of a string changes, so keeping already translated previous versions can be helpful to avoid retranslating the whole string. AFAIK some of these tools will even include previous translations as comments for strings which are "more or less" identical to the new one [ my local tools doesn't do that however ]. Anyway this is just extra goodie for translators, not needed for base functionality. --- Old code: a := hb_i18n_gettext( "Error happened. Params: %1$s" ) --- Old .pot: msgid "Error happened. Params: %1$s" msgstr "Hiba tortent. Parameterek: %1$s" --- --- New code: a := hb_i18n_gettext( "Error happened. Params: %1$s, %2$s" ) --- New .pot after remerge: # possible old translation: "Hiba tortent. Parameterek: %1$s" msgid "Error happened. Params: %1$s, %2$s" msgstr "" --- or as a simple alternative leaving out "similar" entry detection: --- New code: a := hb_i18n_gettext( "Error happened. Params: %1$s, %2$s" ) --- New .pot after remerge: msgid "Error happened. Params: %1$s, %2$s" msgstr "" --- New .deleted.pot file after remerge: msgid "Error happened. Params: %1$s" msgstr "Hiba tortent. Parameterek: %1$s" --- Brgds, Viktor
_______________________________________________ Harbour mailing list [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
