M.-A. DARCHE a écrit : > Encolpe Degoute a écrit : > >> We can use i18ndude that is a more mature tool. >> You can parse ZCML and Generic Setup profiles with it. > > > I would be glad to not depend on those products anymore > and switch to i18ndude.
Here come a script that depend only on the latest egg of i18ndude: #!/bin/sh DIR="/home/encolpe/zopes/customer/Products" echo echo -n "CPS Products directory: " echo $DIR echo -n "i18ndude executable: " echo `which i18ndude` echo -n "Options: " echo $@ echo echo "################ Working on 'default' domain ###########################" i18ndude rebuild-pot --exclude build --pot "i18n/generated-default.pot" --create default . for file in `grep -l --exclude=*custom.pot 'Domain: default' $DIR/CPS*/i18n/*.pot`; do i18ndude filter "i18n/generated-default.pot" "$file" > "i18n/generated2-default.pot" mv "i18n/generated2-default.pot" "i18n/generated-default.pot" done i18ndude merge --pot "i18n/product-default.pot" --merge "i18n/generated-default.pot" --merge2 "i18n/manual-default.pot" 2>/dev/null i18ndude sync --pot "i18n/product-default.pot" "i18n/product-default-fr.po" "i18n/product-default-en.po" 2>/dev/null echo "################ Search for untranslated messages ####################" i18ndude find-untranslated $@ `find skins -name "*.*pt"|sort` >>> A nice tool to have would merge all .po files into one .po file >>> to translate, and then when the translator is done with his job, >>> redispatch the translations in their respective original .po file. >>> Encolpe, do you think you could do such as tool? >> Yes I can. >> > > :-D > >> There is two point to decide before: >> - how to separate legacy from each platform > > Only the newer CPS will have .po files in UTF-8. > Would that be a good enough way to do the detection? > >> - how to detect and manage msgid semantic conflicts >> > > Do you mean duplicate msgids? The same msgid that is present in several products with a different meaning. For example workflow states and transitions have rather simple msgids due to the UI but their translations can be very different. Regards, -- Encolpe Degoute INGENIWEB (TM) - S.A.S 50000 Euros - RC B 438 725 632 Bureaux de la Colline 1 rue Royal 92210 Saint Cloud web : www.ingeniweb.com - « les Services Web Ingénieux » Tel : 01.78.15.24.08 / Fax : 01 47 57 39 14 _______________________________________________ cps-devel mailing list http://lists.nuxeo.com/mailman/listinfo/cps-devel
