loco-adapter icon indicating copy to clipboard operation
loco-adapter copied to clipboard

Generate assets ID from source key

Open kayneth opened this issue 6 years ago • 4 comments

Hi !

First of all, thank you for your work ! Context : Today, i started to install php-translation/symfony-bundle and php-translation/loco-adapter on a project where we, as developers, were doing only french translations with .yml files. But for now, we need to focus on i18n. So, we'll use Loco to have a clean UI for future translators.


I wanted to know if there is a way to get assets ID created from source keys with the API of Loco. I didn't found any info. It works using import form on the UI of Loco but there's no option for the API.

I may have missed something. ^^

image

It looks like this #189

Thank you !

kayneth avatar Feb 22 '18 17:02 kayneth

Hi again ! Hope you had a great week-end ! :)

Does anyone have a clue how to make Loco & Symfony work for a i18n website ? I tried to change the params in Loco::import() method to keep my based source key as Asset's ID but i can't find how to do it. Maybe I'm doing/thinking about it the wrong way :/

kayneth avatar Feb 26 '18 10:02 kayneth

Ok, my bad. I have to import all YAML from Loco website then delete them on local. Sorry ><

kayneth avatar Feb 26 '18 10:02 kayneth

Sorry for not replying. Thank you for reporting the issue and for coming back with a solution. I will open this as a reminder to add it to the docs. (Feel free to open a PR yourself btw)

Nyholm avatar Feb 26 '18 10:02 Nyholm

Hi ! I just didn't really understand what you meant there. " You should basically import what you got to Loco".

I'll make a PR to add this procedure to the doc (tonight, after work :smile: )

kayneth avatar Feb 26 '18 11:02 kayneth