Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the Github integration feature of Crowdin to allow offline use? #72

Closed
EternityForest opened this issue Dec 25, 2021 · 7 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@EternityForest
Copy link
Contributor

At the moment it looks like Armoria requests a translation file from a CDN. Could this: https://support.crowdin.com/github-integration/ be used to remove the cloud dependency?

@Azgaar
Copy link
Owner

Azgaar commented Dec 25, 2021

Hello, it makes sense, we can integrate Clowding with Armoria to add files locally. CDN was selected as it's really easy to update. With integration there should be some additional ci step, I will check it out.

@Azgaar Azgaar added the enhancement New feature or request label Dec 25, 2021
@Azgaar
Copy link
Owner

Azgaar commented Dec 25, 2021

I have established the integration, so localization files are create and moved to master, see https://github.com/Azgaar/Armoria/tree/master/public/locales. The problem is that there is no list of languages available and it's not obvious how UI will get this data. Checking CDN is not an option and there should be just 1 flow to follow.

@Azgaar
Copy link
Owner

Azgaar commented Dec 25, 2021

Generally it looks we will have to request manifest from CDN in any case

@Azgaar
Copy link
Owner

Azgaar commented Dec 25, 2021

Sounds a bit overcomplicated, but probably we can create github action to fetch manifest, get a list of languages and add it to the public folder. Something like that: https://github.com/hangwoo/crowdin-translation-progress/blob/master/index.js
Or that: https://github.com/marketplace/actions/fetch-api-data

@Azgaar
Copy link
Owner

Azgaar commented Dec 25, 2021

@EternityForest, I see you are working on the idea. I believe there is a good way to get languages and other info using Crowding API. It's simple and very powerful. Using it we can automate the whole flow, including locale files download

@Azgaar
Copy link
Owner

Azgaar commented Dec 25, 2021

I also see that you trying to create a manifest. Generally we don't need to do it, we just need a simple array of language codes. It can be comma-separated one-liner txt/csv or json. Or even js file to load it directly in UI without need to fetch.

@Azgaar
Copy link
Owner

Azgaar commented Jan 1, 2022

Hello @EternityForest,

I have merged the PR and made some changes to the workflow. Mainly to be able to trigger it manually in case of issues. Also set relative path to the locales directory. Now it should be ok.

The only issue is that I had to manually reupload all translations to Crowding a source file was changes. So we lost all the comments.

Thanks for the help with it!

@Azgaar Azgaar closed this as completed Jan 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants