Hi Hongli,

On 26.04.2009, at 23:35, Hongli Lai wrote:
> The remaining issues are *really* subjective.
> - Putting default translations in the code is clutter in your opinion.

I didn't say it's my opinion :) My role in the Rails I18n group was  
more the one of being a moderator.

> - You view the fact that SimpleLocalization, Globalite and co are not
> designed with the Gettext style as proof that people want something
> simple and clean. The way I see it is that they haven't seriously
> tried Gettext.

I'm pretty sure they did.

> I think their view of "simple" is like coding a web
> application without using MVC - it's simpler but it gives you more
> headache down the road.

Regarding the API quite the opposite is true. You just don't have this  
feature set with gettext's _(). Regarding the tools layer I agree, but  
hey, if you want to use poedit for 95% of your messages you can just  
do that, no? Just add fast_gettext and use it. Also, I bet a converter  
that takes a flat yaml translations file and converts it to po should  
not be that hard to do.

> I find it "interesting" that pretty much all
> open source desktop applications use Gettext. Gettext has been used to
> translate hundreds, if not thousands, of desktop applications to
> dozens of languages. Yet the web applications world seems to
> completely ignore Gettext. For PHP I can understand, everybody's
> reinventing the wheel there. But Rails?

Look at the history of Rails. There were tons of concurring  
implementations, Gettext being one of them. Gettext hasn't been able  
to win the race in any way and I think that's for a reason.

Also, we haven't reinvented the wheel. We've extracted what we (based  
on the experience of several implementors) believed the best ideas are.

> Your idea regarding the computability of symbols is interesting. On an
> abstract level it does seem to fit within the Rails philosophy, but it
> remains to be seen how useful it is in practice and whether anyone can
> come up with a good implementation.

Hm? People are doing stuff like this.

flash[:notice] =  
t(:"flash.#{controller_name}.#{action}.success", :default  
=> :"flash.#{action}.success")

Do that in gettext. Obviously, flash messages are only one place where  
computability of keys is quite useful.

Again, there was a reason why so many people weren't happy with  
gettext before and invented their own APIs for years.

> In any case, what is clear that at the very least, Rails should have
> better I18n tools. There should be tools that alert translators which
> translations need to be updated, how many strings still need
> translations, for writing the translations, etc.

I agree.

Aside from that though I think some thought should be put into how  
integrate a gettext style accessor _('foo') and a gettext backend.







--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to