Re: [Architecture] [SP-Dashboards] Internationalization of widgets

2018-11-24 Thread Pahan Sarathchandra
Hi,
+1 for option number 2. Additionally to reasons mentioned before second
approach will be much easier to multiple translators to work on different
languages.

On Sun, Nov 25, 2018 at 10:38 AM Dakshika Jayathilaka 
wrote:

> Hi All,
>
> IMO widget itself needs to contain all the necessary files which are
> substantially independent of the host page. Host page needs to have the
> capability of getting and load necessary dependencies accordingly.
>
> I'm not fully aware of the path that you mentioned in option 2. But If
> everything on same container +1 for that approach.
>
> Regards,
>
> *Dakshika Jayathilaka*
> PMC Member & Committer of Apache Stratos
> Associate Technical Lead
> WSO2, Inc.
> lean.enterprise.middleware
> 0771100911
>
>
> On Wed, Nov 21, 2018 at 5:05 PM Ruwini Wijesiri  wrote:
>
>> Hi,
>>
>> We have a requirement to internationalize the text content of widgets. So
>> far we have identified 2 approaches to achieve this;
>>
>>1. Have a single locale.json file that contains the message id to
>>text mapping for all locales within the *'resource'* directory of the
>>widget. However. this will result in the the widget needing to be re-built
>>whenever a change is made to the locale.json file.
>>
>>2. Have the {locale}.json files in carbon-dashboards and load the
>>json files to the widget via an API call in the same manner it is done in
>>the SP portal. Currently, the SP portal locale files are located in
>>directory *'components/dashboards-web-component/public/locales/'*.
>>The widget specific locale files could be placed in directory
>>
>> *'components/dashboards-web-component/public/locales/widgets/{widget_name}/'.
>>  *
>>
>> The second approach seems a better alternative as it will eliminates the
>> need to re-build widgets when new locales are added.
>>
>> Any ideas on these 2 approaches or any other approach is highly
>> appreciated.
>>
>> Thanks,
>> Regards,
>> Ruwini.
>> --
>> Ruwini Wijesiri
>> Software Engineer,
>> WSO2 Inc.
>>
>> Mobile : +94716133480
>>
>> 
>> ___
>> Architecture mailing list
>> Architecture@wso2.org
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
> ___
> Architecture mailing list
> Architecture@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] [SP-Dashboards] Internationalization of widgets

2018-11-24 Thread Dakshika Jayathilaka
Hi All,

IMO widget itself needs to contain all the necessary files which are
substantially independent of the host page. Host page needs to have the
capability of getting and load necessary dependencies accordingly.

I'm not fully aware of the path that you mentioned in option 2. But If
everything on same container +1 for that approach.

Regards,

*Dakshika Jayathilaka*
PMC Member & Committer of Apache Stratos
Associate Technical Lead
WSO2, Inc.
lean.enterprise.middleware
0771100911


On Wed, Nov 21, 2018 at 5:05 PM Ruwini Wijesiri  wrote:

> Hi,
>
> We have a requirement to internationalize the text content of widgets. So
> far we have identified 2 approaches to achieve this;
>
>1. Have a single locale.json file that contains the message id to text
>mapping for all locales within the *'resource'* directory of the
>widget. However. this will result in the the widget needing to be re-built
>whenever a change is made to the locale.json file.
>
>2. Have the {locale}.json files in carbon-dashboards and load the json
>files to the widget via an API call in the same manner it is done in the SP
>portal. Currently, the SP portal locale files are located in directory
>*'components/dashboards-web-component/public/locales/'*. The widget
>specific locale files could be placed in directory
>
> *'components/dashboards-web-component/public/locales/widgets/{widget_name}/'. 
> *
>
> The second approach seems a better alternative as it will eliminates the
> need to re-build widgets when new locales are added.
>
> Any ideas on these 2 approaches or any other approach is highly
> appreciated.
>
> Thanks,
> Regards,
> Ruwini.
> --
> Ruwini Wijesiri
> Software Engineer,
> WSO2 Inc.
>
> Mobile : +94716133480
>
> 
> ___
> Architecture mailing list
> Architecture@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] [SP-Dashboards] Internationalization of widgets

2018-11-23 Thread Tanya Madurapperuma
On Wed, Nov 21, 2018 at 7:05 PM Fazlan Nazeem  wrote:

> +1 for the second approach.
>
> On Wed, Nov 21, 2018 at 5:04 PM Ruwini Wijesiri  wrote:
>
>> Hi,
>>
>> We have a requirement to internationalize the text content of widgets. So
>> far we have identified 2 approaches to achieve this;
>>
>>1. Have a single locale.json file that contains the message id to
>>text mapping for all locales within the *'resource'* directory of the
>>widget. However. this will result in the the widget needing to be re-built
>>whenever a change is made to the locale.json file.
>>
>> Widget need not to be rebuilt in the first approach. You  can have the
locale file at the
HOME/wso2/dashboard/deployment/web-ui-apps/portal/extensions/widgets//locales/
 and replace only the locale file when needed.
But the issue I see with the first approach is, we need to support serving
the locale file in the above location by the carbon-ui-server also which is
not supported at the moment AFAIK. @SajithAR : Please correct me if I'm
wrong.

>
>>1.
>>2. Have the {locale}.json files in carbon-dashboards and load the
>>json files to the widget via an API call in the same manner it is done in
>>the SP portal. Currently, the SP portal locale files are located in
>>directory *'components/dashboards-web-component/public/locales/'*.
>>The widget specific locale files could be placed in directory
>>
>> *'components/dashboards-web-component/public/locales/widgets/{widget_name}/'.
>>  *
>>
>> +1 for the second approach as it already has carbon-ui- server support.

Thanks,
Tanya

> The second approach seems a better alternative as it will eliminates the
>> need to re-build widgets when new locales are added.
>>
>> Any ideas on these 2 approaches or any other approach is highly
>> appreciated.
>>
>> Thanks,
>> Regards,
>> Ruwini.
>> --
>> Ruwini Wijesiri
>> Software Engineer,
>> WSO2 Inc.
>>
>> Mobile : +94716133480
>>
>> 
>>
>
>
> --
> Thanks & Regards,
>
> *Fazlan Nazeem*
> Senior Software Engineer
> WSO2 Inc
> Mobile : +94772338839
> fazl...@wso2.com
>


-- 
*Tanya Madurapperuma* | Associate Technical Lead| WSO2 Inc.
(m) +94718184439 | (e) ta...@wso2.com


___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] [SP-Dashboards] Internationalization of widgets

2018-11-21 Thread Fazlan Nazeem
+1 for the second approach.

On Wed, Nov 21, 2018 at 5:04 PM Ruwini Wijesiri  wrote:

> Hi,
>
> We have a requirement to internationalize the text content of widgets. So
> far we have identified 2 approaches to achieve this;
>
>1. Have a single locale.json file that contains the message id to text
>mapping for all locales within the *'resource'* directory of the
>widget. However. this will result in the the widget needing to be re-built
>whenever a change is made to the locale.json file.
>
>2. Have the {locale}.json files in carbon-dashboards and load the json
>files to the widget via an API call in the same manner it is done in the SP
>portal. Currently, the SP portal locale files are located in directory
>*'components/dashboards-web-component/public/locales/'*. The widget
>specific locale files could be placed in directory
>
> *'components/dashboards-web-component/public/locales/widgets/{widget_name}/'. 
> *
>
> The second approach seems a better alternative as it will eliminates the
> need to re-build widgets when new locales are added.
>
> Any ideas on these 2 approaches or any other approach is highly
> appreciated.
>
> Thanks,
> Regards,
> Ruwini.
> --
> Ruwini Wijesiri
> Software Engineer,
> WSO2 Inc.
>
> Mobile : +94716133480
>
> 
>


-- 
Thanks & Regards,

*Fazlan Nazeem*
Senior Software Engineer
WSO2 Inc
Mobile : +94772338839
fazl...@wso2.com
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


[Architecture] [SP-Dashboards] Internationalization of widgets

2018-11-21 Thread Ruwini Wijesiri
Hi,

We have a requirement to internationalize the text content of widgets. So
far we have identified 2 approaches to achieve this;

   1. Have a single locale.json file that contains the message id to text
   mapping for all locales within the *'resource'* directory of the widget.
   However. this will result in the the widget needing to be re-built whenever
   a change is made to the locale.json file.

   2. Have the {locale}.json files in carbon-dashboards and load the json
   files to the widget via an API call in the same manner it is done in the SP
   portal. Currently, the SP portal locale files are located in directory
   *'components/dashboards-web-component/public/locales/'*. The widget
   specific locale files could be placed in directory
   *'components/dashboards-web-component/public/locales/widgets/{widget_name}/'.
*

The second approach seems a better alternative as it will eliminates the
need to re-build widgets when new locales are added.

Any ideas on these 2 approaches or any other approach is highly appreciated.

Thanks,
Regards,
Ruwini.
-- 
Ruwini Wijesiri
Software Engineer,
WSO2 Inc.

Mobile : +94716133480


___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture