Wouldn't it be better to get an ticket saying it can't read the file? Instead of just truncating the file/creating a new file? At least if there was an error we would know the problem, it was just a fluke that I noticed the formatting was not UTF-8 because I gave it to a translator to change using a text editor.
On Mon, Mar 5, 2012 at 9:13 AM, Massimo Di Pierro < [email protected]> wrote: > web2py rewrites language files in order to add translation strings. If it > does not find a string, it adds it. The problem in your case is that the > file appears corrupted (not utf8, not created by web2py) and therefore it > find no translation string and needs to add them all. > > This is the intended behavior. Can we change it? How should it > behave exactly in this case? > If it does not overwrite it, you are going to get a ticket when you try > edit using the admin interface. > > massimo > > On Monday, 5 March 2012 09:37:01 UTC-6, Detectedstealth wrote: >> >> Was able to resolve the problem, the file was encoded as: GB18030 >> changing to UTF-8 allowed the file to show up again. >> >> However I think the framework should give a error like unable to read >> file etc... instead of just overwriting a file? >> >> On Mon, Mar 5, 2012 at 7:29 AM, Bruce Wade <[email protected]> wrote: >> >>> Hi, >>> >>> I gave someone a translation file to translate, however when I put the >>> new file in the languages folder it gets overridden by web2py >>> automatically. Any specific reason this would happen? >>> >>> -- >>> -- >>> Regards, >>> Bruce Wade >>> http://ca.linkedin.com/in/**brucelwade<http://ca.linkedin.com/in/brucelwade> >>> http://www.wadecybertech.com >>> http://www.warplydesigned.com >>> http://www.**fitnessfriendsfinder.com<http://www.fitnessfriendsfinder.com> >>> >> >> >> >> -- >> -- >> Regards, >> Bruce Wade >> http://ca.linkedin.com/in/**brucelwade<http://ca.linkedin.com/in/brucelwade> >> http://www.wadecybertech.com >> http://www.warplydesigned.com >> http://www.**fitnessfriendsfinder.com<http://www.fitnessfriendsfinder.com> >> > > On Monday, 5 March 2012 09:37:01 UTC-6, Detectedstealth wrote: >> >> Was able to resolve the problem, the file was encoded as: GB18030 >> changing to UTF-8 allowed the file to show up again. >> >> However I think the framework should give a error like unable to read >> file etc... instead of just overwriting a file? >> >> On Mon, Mar 5, 2012 at 7:29 AM, Bruce Wade <[email protected]> wrote: >> >>> Hi, >>> >>> I gave someone a translation file to translate, however when I put the >>> new file in the languages folder it gets overridden by web2py >>> automatically. Any specific reason this would happen? >>> >>> -- >>> -- >>> Regards, >>> Bruce Wade >>> http://ca.linkedin.com/in/**brucelwade<http://ca.linkedin.com/in/brucelwade> >>> http://www.wadecybertech.com >>> http://www.warplydesigned.com >>> http://www.**fitnessfriendsfinder.com<http://www.fitnessfriendsfinder.com> >>> >> >> >> >> -- >> -- >> Regards, >> Bruce Wade >> http://ca.linkedin.com/in/**brucelwade<http://ca.linkedin.com/in/brucelwade> >> http://www.wadecybertech.com >> http://www.warplydesigned.com >> http://www.**fitnessfriendsfinder.com<http://www.fitnessfriendsfinder.com> >> > -- -- Regards, Bruce Wade http://ca.linkedin.com/in/brucelwade http://www.wadecybertech.com http://www.warplydesigned.com http://www.fitnessfriendsfinder.com

