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

Keep all translations in OKAPI #576

Open
following5 opened this issue Dec 26, 2018 · 4 comments
Open

Keep all translations in OKAPI #576

following5 opened this issue Dec 26, 2018 · 4 comments

Comments

@following5
Copy link
Contributor

OKAPI currently reads translations for country names, language names [with #570] and waypoint types from OC database. But OCPL plans to remove translations from the database, and anyway it's better if OKAPI returns consistent texts for all OC sites (including OCDE sites).

So I suggest to add all these translations to Okapi. If a country or language or wp-type name translation would be completely missing, we could just fall back to the code or type-id, and send email to Okapi developers.

The country and language names can be extracted from Wikipedia.

@kojoty
Copy link
Member

kojoty commented Dec 28, 2018

From our (OCPL) point of view translations phrases in DB are difficult in maintenance. We would like to be sure what translations are supported based on code not on DB which can be different between nodes and local dev. setups.

@following5
Copy link
Contributor Author

OCDE has all master translations in files, but copies them to the database with each code deployment. So they are both in Git and in the database and always identical everywhere.

(The same is done with triggers & stored procedures, and all other static stuff in the database.)

@kojoty
Copy link
Member

kojoty commented Dec 28, 2018

OCDE has all master translations in files, but copies them to the database with each code deployment. So they are both in Git and in the database and always identical everywhere.

Got it. I'm interesting if they are any pros of having translations in DB and maintaining it on that way? Why not just read from files? Or maybe it was done because of compatibility with OCPL-code running nodes?

@following5
Copy link
Contributor Author

Probably it's just another way of doing the same thing. OCDE will e.g. join the cache_types table to the translations table on trans_id, retrieving a list of cache types including translated names via SQL. OCPL will just obtain the IDs and then fetch translations in a PHP loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants