phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] to all devel's and translators: Format of


From: Guillaume Courtois
Subject: Re: [Phpgroupware-developers] to all devel's and translators: Format of the lang-phrases in phpgw
Date: Tue, 25 Feb 2003 18:14:38 +0000

>some talks with gugux and skwashd have been starting the discussion


>which forms the lang-phrases (textual string send to the lang function


>in the phpgw sources) should have:


>


>The actual sources show two forms:


>a) 'user x wants x from you!!!' and in phpgw_en.lang: user x wants x from
you!!!  app     en


>User %1 wants %2 from you!!!


>b) 'user %1 wants %2 from you!!!' and in phpgw_en.lang: user %1 wants %2


>from you!!!    app     en      User %1 wants %2 from you!!!


>


>(Please note all phrases (in the source and the 1st field in the


>lang-file) should be lowercase. Only the translation (4th field) in the


>lang-files should mixed case. This is for performance reasons.)


>


>Both forms work in most cases, but there are a few problems with a)


>(using the x's):


>1) if there is no translation in a selected language for a phrase like


>the example in a) you will get the message: 'User x wants x from


>you!!!*' and not just the correct english version with a '*'. That can


>make a uncomplete translation (which unfortunally most are) unusable.


>2) the developer_tools app, which gather the phrases automaticaly from


>the code, generate a lang-file with %'s (same is true for the eTemplates)


>


>Specialy because of 1) I would strongly suggest to use only the form b)


>(the %'s) in the source.


>


>If we going to change the existing code to only one form it should be


>form b). I think that is a good think, but it is an enormous task, as it


>requires to change all lang-files to not run in to probs like 1).


>Because of that, I think, it should not be done in the stable branch,


>but in HEAD. This has to do with the fact, that changed or added phrases


>are not automaticaly put into effect after a cvs update (you have to


>manually run setup/language management and for changed phrases even with


>the setting 'delete all and insert new ones').




Ok, here is my comment :




When I first worked on the stable branch to add the missing english phrases and 
so,
appeared the problem with the phrases with parameters.




As I did not know which syntax was the best, I asked to the dev-list what to do.
Unfortunately Ralf was not around and I did not get any response.




So I checked the whole phrases with parameters in stable. Approx. 80 % or them 
had
the a) syntax, and 20 % had the b) one.




Then I checked the translate function in the API and saw that both syntaxes were
working if the phrase was translated.




My big mistake has been here to not think about the case where the phrase is not
translated, as Ralf did.




Also, I believed that if 80 % of the phrases had the a) syntax, then maybe it 
was
because of a problem in the translate function with % which could have been 
wrongly
interpreted (non-escaped character or so).




So I decided to change the 20 % to have all the phrases with the a) syntax.




Now here is the situation :




- all the phrases in stable have the a) syntax


- the phrases in head have one of the two syntaxes




Globally, I prefer the b) syntax too, easier to compare, better for scripts, 
etc ...




So my opinion for the head branch is to use the b) syntax from now.




For the stable branch, we can




- roolback my changes on the phrases with parameters


- change all the phrases to the b) syntax




I'm of course candidate to make one of these changes if dev people decide to do 
so !
(and think that the second solution would be a good idea).




Ok, I'm waiting too for comments and well ... sorry for the problems I caused !




Bye.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]