Ubiquo 0.9: Scaffolds and I18n files

20 views
Skip to first unread message

Juan Hernández Babón

unread,
Jan 23, 2012, 5:58:17 AM1/23/12
to ubiquo...@googlegroups.com
Hi everyone!

I'm updating the ubquio_scaffold plugin to be Rails 3.2 compatible and I found that the I18n files generation could be simplified.

If you look at this generator:


It creates the files for each model and view instead of modify an existing and generic models.yml file.

With this aproach whe will have specific files for each model and we wouldn't have a massive I18n file that changes (fields reordenation, etc) on every scaffold generation.

The good news is that the new I18n gem and Rails 3.2 reload all the I18n files without the need to restart the server, so generate new files in development environment it's no longer a problem.

What do you think? Should we change the generation process?

Toni Reina

unread,
Jan 23, 2012, 9:28:38 AM1/23/12
to ubiquo...@googlegroups.com
Hello Juan,

have you check if it's compatible with translate plugin? [1] In the past, we migrated from multiple locale files to a single file, but no problem for me with the change.

[1] https://github.com/gnuine/translate

2012/1/23 Juan Hernández Babón <juan.herna...@gmail.com>

--
Heu rebut aquest missatge perquè esteu subscrit al grup "ubiquo" de Google Grups.
Per visualitzar aquest debat al web, visiteu https://groups.google.com/d/msg/ubiquo-gnuine/-/AihSK1RH_QUJ.
Per publicar a aquest grup, envieu un correu electrònic a ubiquo...@googlegroups.com.
Per anul·lar la subscripció a aquest grup, envieu un correu electrònic a ubiquo-gnuin...@googlegroups.com.
Per obtenir més opcions, visiteu aquest grup a http://groups.google.com/group/ubiquo-gnuine?hl=ca.



--
Toni Reina Pérez
are...@gnuine.com

gnuine
http://www.gnuine.com
C/Pamplona 96, planta 2, porta 17 22@ - 08018 Barcelona

Bernat Ràfales

unread,
Jan 25, 2012, 6:52:27 AM1/25/12
to ubiquo
I definitely think that this would be a great improvement if there's
no drawbacks

On Jan 23, 3:28 pm, Toni Reina <are...@gnuine.com> wrote:
> Hello Juan,
>
> have you check if it's compatible with translate plugin? [1] In the past,
> we migrated from multiple locale files to a single file, but no problem for
> me with the change.
>
> [1]https://github.com/gnuine/translate
>
> 2012/1/23 Juan Hernández Babón <juan.hernandez.ba...@gmail.com>
> gnuinehttp://www.gnuine.com

Ramon Salvadó

unread,
Jan 26, 2012, 2:57:00 AM1/26/12
to ubiquo...@googlegroups.com
A while ago we had several files and moved to a single one since some people asked for it because, at the time, having to deal with multiple files was regarded as cumbersome by some developers.

Before reverting back to multiple files, we should really think about pros and cons of each solution and use cases before deciding what to do.

Regards
Ramon

Juan Hernández Babón

unread,
Feb 6, 2012, 3:02:38 AM2/6/12
to ubiquo...@googlegroups.com
Hello Tony,

I checked the translated plugin and we have problems with it. It's nothing related to the I18n files.

The plugin is not supported in Rails 3.2, because it use the old Rails routes system. Even if you can make it to work with gems like rails_legacy_mapper[1] (which is not easy to set up), Rails just doesn't follow the old plugin conventions and it can't find the views, etc.

If we want to use that plugin we well need to make an engine with it.

* NOTES: this plugin needs Rails 3.1.0.beta, and needs rack-mount gem, which is not required by default.

Juan Hernández Babón

unread,
Feb 6, 2012, 3:27:22 AM2/6/12
to ubiquo...@googlegroups.com
Just to clarify, the change in the I18n files that I propose, is not related to the files that already exists inside the plugins, it only affects to the files generated in the scaffold process.

I think is an improvement because we will have better control over the generated files and we will simplify the generators code.
Reply all
Reply to author
Forward
0 new messages