IBM-Cloud / gp-angular-client

Angular client for Globalization Pipeline on IBM Bluemix
https://www.ng.bluemix.net/docs/services/GlobalizationPipeline/index.html
Apache License 2.0
1 stars 8 forks source link

Feature request : need ability to retrieve full bundle at once #22

Open cdouine39 opened 7 years ago

cdouine39 commented 7 years ago

Hi,

in our project, we make a lot of calls to the 'translate' function with several times the same keys. It would be preferable for us to translate a full bundle once, and then manually associate the translated labels to our objects.

For ex, let's say i have a list of users and for each, i want to display ' ' with being translated. On the html i will have a ng-repeat containing :

{{user.name}}

But if i have hundreds of users with only 3 different greetings, i'll have hundreds of requests to the gp server. In this case, it would be more efficient to translate the whole bundle containing the 3 greetings translated, store them locally and use something like : {{ctrl.translatedGreetings[user.preferred_greeting]}} {{user.name}}

Although I noticed that for each translation, the whole bundle is requested from the server. So i feel like it wouldn't be too much of a change to add this feature (from what i've seen at least ;) ). I'd be happy to give it a try if you think that can be an interesting feature to add.

thanks

lamibm commented 7 years ago

Hey there -- Great to see you using the gp-angular client for G11n Pipeline. @srl295 and @yumaoka and @steveatkin what do you think? Let's start the conversation.

srl295 commented 7 years ago

sounds like some good ideas… let me look at what this would take. Also cc @ckoberlein