I agree -- if the file exists and appears corrupted, a warning or error 
would be more appropriate rather than silent overwriting (particularly 
since "corruption" will most likely just be a different encoding).

Anthony

On Monday, March 5, 2012 1:20:26 PM UTC-5, Detectedstealth wrote:
>
> That could work but my point is when I opened the file in a text editor 
> everything looked fine, however it was then overwritten so I was clueless 
> as to why it was happening, until I went to save as and seen the encoding. 
> Once I changed it to UTF-8 the file was no longer overwritten. 
>
> --
> Regards,
> Bruce
>
> On Mon, Mar 5, 2012 at 10:10 AM, Alan Etkin <[email protected]> wrote:
>
>> Maybe allowing to override the behavior with a initial argument? In
>> that way, developers could do:
>>
>> T.no_overwrite = True
>>
>> And default to the normal file managing.
>>
>>
>> On Mar 5, 2:13 pm, 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://www.wadecybertech.com
>> > >>http://www.warplydesigned.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
>> >
>> > 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://www.wadecybertech.com
>> > >>http://www.warplydesigned.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
>>
>
>
>
> -- 
> -- 
> Regards,
> Bruce Wade
> http://ca.linkedin.com/in/brucelwade
> http://www.wadecybertech.com
> http://www.warplydesigned.com
> http://www.fitnessfriendsfinder.com
>  

Reply via email to