for the first question, pybabel support Chinese with zh_Hans_CN #pybabel --list-locales |grep zh b'zh Chinese' b'zh_Hans Chinese (Simplified)' b'zh_Hans_CN Chinese (Simplified, China)' b'zh_Hans_HK Chinese (Simplified, Hong Kong SAR China)' b'zh_Hans_MO Chinese (Simplified, Macau SAR China)' b'zh_Hans_SG Chinese (Simplified, Singapore)' b'zh_Hant Chinese (Traditional)' b'zh_Hant_HK Chinese (Traditional, Hong Kong SAR China)' b'zh_Hant_MO Chinese (Traditional, Macau SAR China)' b'zh_Hant_TW Chinese (Traditional, Taiwan)' 2.for the compile error, it seems an bug in pybabel choose ignore it, it well ok.in my vim , line 7283 nearly it highlights '% u' in " 20% use"
i do not known why both '%' and 'u' high here. in my laptop, although it make an error massage as you show, it generate the po file ok! now i update the 7283 line with '20% use' with '20%\ use' it will compile without errror, attatchment is updated version. Thank you! regards --------- tingting.hui At 2016-11-13 19:02:51, "Dave Page" <dp...@pgadmin.org> wrote: >Hi! > >On Sun, Nov 13, 2016 at 8:34 AM, lambda <googletoday...@163.com> wrote: >> >> Hi all, >> i've done the chinese (Simplified) transation of pgadmin4, and the >> attachment is the patch, hope to add the mainline. > >Awesome! > >As this is the first translation, we're expecting some problems: > >- Have you tested the app? When I ran it, I found a number of strings >that didn't seem to be translated; but I don't know if that's >intentional, if your work isn't yet finished, or we've missed >translation markers. > >- I could only get the translation to work if I marked it as 'zh' in >the config. 'zh_CN' caused an error in Babel (it didn't like the _), >and zh_Hans_CN isn't offered as an accepted language by Chrome. Is >'zh' OK? > >- When compiling, I got the following error: > >(pgadmin4)piranha:web dpage$ pybabel compile -d pgadmin/translations >error: pgadmin/translations/zh_Hans_CN/LC_MESSAGES/messages.po:7283: >placeholders are incompatible >compiling catalog >pgadmin/translations/zh_Hans_CN/LC_MESSAGES/messages.po to >pgadmin/translations/zh_Hans_CN/LC_MESSAGES/messages.mo > > >> Does I need do 'pybabel compile -d web/pgadmin/translations' to generate >> the catalogues can be used, i have not generate it yet, >> if it is needed, i will add it the next time. > >I don't mind - it's easy enough for me to do, but you probably should >do it to test. > >Thanks! > >-- >Dave Page >Blog: http://pgsnake.blogspot.com >Twitter: @pgsnake > >EnterpriseDB UK: http://www.enterprisedb.com >The Enterprise PostgreSQL Company > > >-- >Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) >To make changes to your subscription: >http://www.postgresql.org/mailpref/pgadmin-hackers
simple_chinese_translation-V2.patch.gz
Description: GNU Zip compressed data
-- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers