You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Guido Amarilla <ga...@gmail.com> on 2007/01/13 09:33:41 UTC

*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

Re: *SecurityData.xml entities i18n

Posted by Jacques Le Roux <ja...@les7arts.com>.
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" <ga...@gmail.com>
To: <de...@ofbiz.apache.org>
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 <ja...@les7arts.com>:
> > Guido,
> >
> > I guess you should have a look at DemoProductCategoriesI18nData.xml and relate productCategoryId to groupId
> >
> > HTH
> >
> > Jacques
> >
> > ----- Original Message -----
> > From: "Guido Amarilla" <ga...@gmail.com>
> > To: <de...@ofbiz.apache.org>
> > 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


Re: *SecurityData.xml entities i18n

Posted by Guido Amarilla <ga...@gmail.com>.
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 <ja...@les7arts.com>:
> Guido,
>
> I guess you should have a look at DemoProductCategoriesI18nData.xml and relate productCategoryId to groupId
>
> HTH
>
> Jacques
>
> ----- Original Message -----
> From: "Guido Amarilla" <ga...@gmail.com>
> To: <de...@ofbiz.apache.org>
> 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

Re: *SecurityData.xml entities i18n

Posted by Jacques Le Roux <ja...@les7arts.com>.
Guido,

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

HTH

Jacques

----- Original Message ----- 
From: "Guido Amarilla" <ga...@gmail.com>
To: <de...@ofbiz.apache.org>
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