*SecurityData.xml entities i18n

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

*SecurityData.xml entities i18n

Guido Amarilla
Is there a way to localize the descriptions for the entities in
*SecurityData.xml such as these from OrderSecurityData.xml :

...........
   <SecurityPermission description="Create sales forecasts in the
Order Manager." permissionId="ORDERMGR_4C_CREATE"/>
   <SecurityPermission description="Update sales forecasts in the
Order Manager." permissionId="ORDERMGR_4C_UPDATE"/>

   <SecurityGroup description="Admin group for restricted order
processing." groupId="ORDERPROC"/>
   <SecurityGroup description="Order Entry Admin group; permissions
for creating orders." groupId="ORDERENTRY"/>
   <SecurityGroup description="Order Admin group, has all order
permissions." groupId="ORDERADMIN"/>

..........
--
Guido Amarilla

--
Guido Amarilla
Reply | Threaded
Open this post in threaded view
|

Re: *SecurityData.xml entities i18n

Jacques Le Roux
Administrator
Guido,

I guess you should have a look at DemoProductCategoriesI18nData.xml and relate productCategoryId to groupId

HTH

Jacques

----- Original Message -----
From: "Guido Amarilla" <[hidden email]>
To: <[hidden email]>
Sent: Saturday, January 13, 2007 9:33 AM
Subject: *SecurityData.xml entities i18n


> Is there a way to localize the descriptions for the entities in
> *SecurityData.xml such as these from OrderSecurityData.xml :
>
> ...........
>    <SecurityPermission description="Create sales forecasts in the
> Order Manager." permissionId="ORDERMGR_4C_CREATE"/>
>    <SecurityPermission description="Update sales forecasts in the
> Order Manager." permissionId="ORDERMGR_4C_UPDATE"/>
>
>    <SecurityGroup description="Admin group for restricted order
> processing." groupId="ORDERPROC"/>
>    <SecurityGroup description="Order Entry Admin group; permissions
> for creating orders." groupId="ORDERENTRY"/>
>    <SecurityGroup description="Order Admin group, has all order
> permissions." groupId="ORDERADMIN"/>
>
> ..........
> --
> Guido Amarilla
>
> --
> Guido Amarilla
Reply | Threaded
Open this post in threaded view
|

Re: *SecurityData.xml entities i18n

Guido Amarilla
I´m not sure how to create it, but I see that both
DemoProductCategoriesI18nData.xml and DemoProductI18nData.xml are
related to Content and SecurityData doesn´t.

SecurityData is seed data and I see that other seed data like
OrderTypeData.xml and OrderScheduledServices.xml are localized using
OrderEntityLabels.properties

I succesfully localized these strings adding a "default-resource-name"
to SecurityDataModel.xml pointing to "SecurityEntityLabels" and
created two files SecurityEntityLabels.properties and
SecurityEntityLabels_es.properties

The problem with this aproach is that the seed security data must be
added to SecurityData.xml for each application and to
SecurityEntityLabels.properties in framework/security/config, and that
adds some kind of dependency from the framework to the application. Is
this correct?


    <entity entity-name="SecurityGroup"
            package-name="org.ofbiz.security.securitygroup"
CREATED THIS->            default-resource-name="SecurityEntityLabels"
            title="Security Component - Security Group Entity">
      <field name="groupId" type="id-ne"></field>
      <field name="description" type="description"></field>
      <prim-key field="groupId"/>
    </entity>
    <entity entity-name="SecurityGroupPermission"
            package-name="org.ofbiz.security.securitygroup"
CREATED THIS->            default-resource-name="SecurityEntityLabels"
            title="Security Component - Security Group Permission Entity">
      <description>Defines a permission available to a security group;
there is no FK to SecurityPermission because we want to leave open the
possibility of ad-hoc permissions, especially for the Entity Data
Maintenance pages which have TONS of permissions</description>




2007/1/14, Jacques Le Roux <[hidden email]>:

> Guido,
>
> I guess you should have a look at DemoProductCategoriesI18nData.xml and relate productCategoryId to groupId
>
> HTH
>
> Jacques
>
> ----- Original Message -----
> From: "Guido Amarilla" <[hidden email]>
> To: <[hidden email]>
> Sent: Saturday, January 13, 2007 9:33 AM
> Subject: *SecurityData.xml entities i18n
>
>
> > Is there a way to localize the descriptions for the entities in
> > *SecurityData.xml such as these from OrderSecurityData.xml :
> >
> > ...........
> >    <SecurityPermission description="Create sales forecasts in the
> > Order Manager." permissionId="ORDERMGR_4C_CREATE"/>
> >    <SecurityPermission description="Update sales forecasts in the
> > Order Manager." permissionId="ORDERMGR_4C_UPDATE"/>
> >
> >    <SecurityGroup description="Admin group for restricted order
> > processing." groupId="ORDERPROC"/>
> >    <SecurityGroup description="Order Entry Admin group; permissions
> > for creating orders." groupId="ORDERENTRY"/>
> >    <SecurityGroup description="Order Admin group, has all order
> > permissions." groupId="ORDERADMIN"/>
> >
> > ..........
> > --
> > Guido Amarilla
> >
> > --
> > Guido Amarilla
>


--
Guido Amarilla
Reply | Threaded
Open this post in threaded view
|

Re: *SecurityData.xml entities i18n

Jacques Le Roux
Administrator
Guidok

Yes sorry, this was a too fast answer. Indeed no user acces to translation is needed and anyhway this is the right way to do it.
I just looked at you patch in Jira, sounds fine to me.

Thanks

Jacques

----- Original Message -----
From: "Guido Amarilla" <[hidden email]>
To: <[hidden email]>
Sent: Sunday, January 14, 2007 8:55 PM
Subject: Re: *SecurityData.xml entities i18n


> I´m not sure how to create it, but I see that both
> DemoProductCategoriesI18nData.xml and DemoProductI18nData.xml are
> related to Content and SecurityData doesn´t.
>
> SecurityData is seed data and I see that other seed data like
> OrderTypeData.xml and OrderScheduledServices.xml are localized using
> OrderEntityLabels.properties
>
> I succesfully localized these strings adding a "default-resource-name"
> to SecurityDataModel.xml pointing to "SecurityEntityLabels" and
> created two files SecurityEntityLabels.properties and
> SecurityEntityLabels_es.properties
>
> The problem with this aproach is that the seed security data must be
> added to SecurityData.xml for each application and to
> SecurityEntityLabels.properties in framework/security/config, and that
> adds some kind of dependency from the framework to the application. Is
> this correct?
>
>
>     <entity entity-name="SecurityGroup"
>             package-name="org.ofbiz.security.securitygroup"
> CREATED THIS->            default-resource-name="SecurityEntityLabels"
>             title="Security Component - Security Group Entity">
>       <field name="groupId" type="id-ne"></field>
>       <field name="description" type="description"></field>
>       <prim-key field="groupId"/>
>     </entity>
>     <entity entity-name="SecurityGroupPermission"
>             package-name="org.ofbiz.security.securitygroup"
> CREATED THIS->            default-resource-name="SecurityEntityLabels"
>             title="Security Component - Security Group Permission Entity">
>       <description>Defines a permission available to a security group;
> there is no FK to SecurityPermission because we want to leave open the
> possibility of ad-hoc permissions, especially for the Entity Data
> Maintenance pages which have TONS of permissions</description>
>
>
>
>
> 2007/1/14, Jacques Le Roux <[hidden email]>:
> > Guido,
> >
> > I guess you should have a look at DemoProductCategoriesI18nData.xml and relate productCategoryId to groupId
> >
> > HTH
> >
> > Jacques
> >
> > ----- Original Message -----
> > From: "Guido Amarilla" <[hidden email]>
> > To: <[hidden email]>
> > Sent: Saturday, January 13, 2007 9:33 AM
> > Subject: *SecurityData.xml entities i18n
> >
> >
> > > Is there a way to localize the descriptions for the entities in
> > > *SecurityData.xml such as these from OrderSecurityData.xml :
> > >
> > > ...........
> > >    <SecurityPermission description="Create sales forecasts in the
> > > Order Manager." permissionId="ORDERMGR_4C_CREATE"/>
> > >    <SecurityPermission description="Update sales forecasts in the
> > > Order Manager." permissionId="ORDERMGR_4C_UPDATE"/>
> > >
> > >    <SecurityGroup description="Admin group for restricted order
> > > processing." groupId="ORDERPROC"/>
> > >    <SecurityGroup description="Order Entry Admin group; permissions
> > > for creating orders." groupId="ORDERENTRY"/>
> > >    <SecurityGroup description="Order Admin group, has all order
> > > permissions." groupId="ORDERADMIN"/>
> > >
> > > ..........
> > > --
> > > Guido Amarilla
> > >
> > > --
> > > Guido Amarilla
> >
>
>
> --
> Guido Amarilla