These are chat archives for symfony2admingenerator/GeneratorBundle

10th
Jun 2015
Serg N. Kalachev
@ksn135
Jun 10 2015 15:00
Hi there, everyone!
Trying to setup JMSI18nRoutingBundle, but AdminGenerator routes dosen't auto-prefix with locale names as ordinal routes. For example:
 _AppBundle_Employee_list               ANY      ANY    ANY  /employee/                                                                                                        
 _AppBundle_Employee_excel              ANY      ANY    ANY  /employee/excel                                                                                                   
 _AppBundle_Employee_edit               ANY      ANY    ANY  /employee/{pk}/edit                                                                                               
 _AppBundle_Employee_update             POST     ANY    ANY  /employee/{pk}/update                                                                                             
 _AppBundle_Employee_show               ANY      ANY    ANY  /employee/{pk}/show                                                                                               
 _AppBundle_Employee_object             ANY      ANY    ANY  /employee/{pk}/{action}                                                                                           
 ru__RG__homepage                       ANY      ANY    ANY  /ru/                                                                                                              
 en__RG__homepage                       ANY      ANY    ANY  /en/       

 ru__RG__fos_user_security_login        GET|POST ANY    ANY  /ru/login                                                                                                         
 en__RG__fos_user_security_login        GET|POST ANY    ANY  /en/login
Serg N. Kalachev
@ksn135
Jun 10 2015 15:05
Is that by design or I need to enable some special feature ?
Stéphane
@sescandell
Jun 10 2015 15:13
I think this is because of Routes names
I see al your routes starts with an underscore
and, as mentionned in the bundle documentation, routes starting with an underscore are not translated:
Serg N. Kalachev
@ksn135
Jun 10 2015 15:14
I did't do any special moves )
Probably because I use AppBundle without vendor
Stéphane
@sescandell
Jun 10 2015 15:15
Yes I think so too
Serg N. Kalachev
@ksn135
Jun 10 2015 15:15
well, create PR ?
Stéphane
@sescandell
Jun 10 2015 15:15
I think you can easily found a workaround for that

well, create PR ?

that would be great

Serg N. Kalachev
@ksn135
Jun 10 2015 15:23
@sescandell please review #157
Stéphane
@sescandell
Jun 10 2015 15:24
Done
Thanks
Serg N. Kalachev
@ksn135
Jun 10 2015 15:26
@sescandell Does s2a works with translatable entities from the box ? (Never try it before)
Stéphane
@sescandell
Jun 10 2015 15:26
Never tried it neither
Serg N. Kalachev
@ksn135
Jun 10 2015 15:26
))
Thanks, I'll try
Stéphane
@sescandell
Jun 10 2015 15:26
But actually it should
I mean
I imagine your are thinking about Doctrine Extension Translatable component right?
Serg N. Kalachev
@ksn135
Jun 10 2015 15:27
Yep
Stéphane
@sescandell
Jun 10 2015 15:27
this component is based on Doctrine QueryFilters
(at least for one to one relations)
so Admingen should not be an issue for that
you might encounter problems with filters functionnalities...
Serg N. Kalachev
@ksn135
Jun 10 2015 15:29
I'm newbie for doctrine, so I'm looking for simple and standard way to store and work with multi-language collections of entities. Reading docs, for now )
Stéphane
@sescandell
Jun 10 2015 15:30
k
good luck :smile:
Serg N. Kalachev
@ksn135
Jun 10 2015 15:30
thanks :-)
I prefer Propel approach, but Doctrine do all things in "other ways" for me, for now )
Stéphane
@sescandell
Jun 10 2015 15:34
I started with Propel... on sf1... so Propel1... Moving to Doctrine2 takes a little effort, but you quickly find your bearings.
But if you speak about Propel2, actually I do not know...
But sure, you're right: they both have different approch of data store
@ksn135 does #157 solved your route translation issue?
Serg N. Kalachev
@ksn135
Jun 10 2015 15:39
Yes, all my s2a generated routes have correct multi-lingual prefixes
 ru__RG__AppBundle_Employee_list        ANY      ANY    ANY  /ru/employee/                                                                                                     
 en__RG__AppBundle_Employee_list        ANY      ANY    ANY  /en/employee/                                                                                                     
 ru__RG__AppBundle_Employee_excel       ANY      ANY    ANY  /ru/employee/excel                                                                                                
 en__RG__AppBundle_Employee_excel       ANY      ANY    ANY  /en/employee/excel
And yes, you are right. Propel based on table structure in opposite to doctrine. In doctrine objects are the first class citizens. Table structure is on the last place.
Serg N. Kalachev
@ksn135
Jun 10 2015 15:47
@sescandell I have a solution for breadcrumbs for s2a, should I open an issue or may be better create PR ?
Stéphane
@sescandell
Jun 10 2015 16:04
You mean as a "new feature" ?
Serg N. Kalachev
@ksn135
Jun 10 2015 16:08
Yep
It looks like original breadcrumbs in AdminLte
It uses CnertaBreadcrumbBundle in template and function in Menu/Builder
Serg N. Kalachev
@ksn135
Jun 10 2015 16:33
@sescandell take a look at #158