openstreetmap / trac-tickets

Archived Trac Tickets
1 stars 1 forks source link

Make languages.yml translatable #1946

Closed openstreetmap-trac closed 3 years ago

openstreetmap-trac commented 3 years ago

Reporter: avarab[at]gmail.com [Submitted to the original trac issue database at 2.26pm, Wednesday, 10th June 2009]

Currently the languages table (read from config/languages.yml) only has entries for language code, english name and native name.

--------------+------------------------+-----------
 code         | character varying(255) | not null
 english_name | character varying(255) | not null
 native_name  | character varying(255) | 

It should be possible to translate this table into arbitrary native languages, so that when reading the diaries one sees "{{language_name}} ({{native_name}})" instead of "{{english_name}} ({{native_name}})". Where language_name is the name of the language in the locale the current user is using.

This would require changing languges.yml like so:

 de:                                                                                                                                                         
-  english: German                                                                                                                                           
-  native: Deutsch                                                                                                                                           
+  en: German                                                                                                                                                
+  de: Deutsch                                                                                                                                               
+  is: ska

And changing the languages table to something like:

--------------+------------------------+-----------
 code         | character varying(255) | not null
 code_to      | character varying(255) | not null
 name         | character varying(255) |
openstreetmap-trac commented 3 years ago

Author: StefanB [Added to the original trac issue at 8.04am, Saturday, 13th June 2009]

How about using ready-made data in a RoR plugn, such as: http://github.com/grosser/i18n_data/tree/master ?

There are several other, similar plugins.

openstreetmap-trac commented 3 years ago

Author: stefanb [Added to the original trac issue at 7.25am, Sunday, 14th June 2009]

(In [15900]) Added localized language names with plugin from http://github.com/grosser/i18n_data/tree/master (fixes #1946) Diary entries in same language linked (lists and rss)

openstreetmap-trac commented 3 years ago

Author: tom[at]compton.nu [Added to the original trac issue at 9.40am, Sunday, 14th June 2009]

Thank you for making the trunk undeployable - please do not make major changes like adding new plugins without consulting first.

For the record the situation with languages.yml was a result of a deliberate decision made at the hack day. In hindsight that decision needs reviewing I agree but it needs more thought than has gone on here to decide on the best solution so please leave this open until I am back from holiday.

openstreetmap-trac commented 3 years ago

Author: tom[at]compton.nu [Added to the original trac issue at 9.47am, Sunday, 14th June 2009]

I have backed out r15900 for now.

openstreetmap-trac commented 3 years ago

Author: StefanB [Added to the original trac issue at 3.48pm, Sunday, 14th June 2009]

I thought announcing it here and seeing no objections meant that the plugin was acceptable.

Just of curiosity, why was it undeployable? Was it technically broken in some way, or just socially not agreed enough upon? Don't want to make the same mistake again.

Can I redo other changes that are not requiring the plugin?

No rush though, enjoy your holidays!

openstreetmap-trac commented 3 years ago

Author: smsm1 [Added to the original trac issue at 10.58pm, Sunday, 14th June 2009]

As the admin of the server is on holiday he hasn't had time to check the plugin to see if it is suitable, and doesn't have any bad side effects or if there are better alternatives.

Less than 24 hours is rarely enough time during a normal working week to review a big change in the code, never mind when the main sys admin is on holiday.

At the moment we are only accepting small bug fixes into trunk. Generally major changes are done in a branch so that trunk is always deployable. Even if the branch only lasts a few days or weeks, it still means that trunk can always be deployed if there are any urgent bugs that need to be fixed, or there are other code changes that can be deployed straight away.

openstreetmap-trac commented 3 years ago

Author: stefanb [Added to the original trac issue at 5.03am, Monday, 15th June 2009]

(In [15916]) minor change: diary entries per language linked (lists and rss feeds) (again, since r15900 was rolled back in r15905, see #1946 - this time without adding a plugin)

openstreetmap-trac commented 3 years ago

Author: StefanB [Added to the original trac issue at 6.26am, Monday, 15th June 2009]

smsm1, thanks for clarification!

I've split the reverted r15900 into a trivial part (checked in as r15916) and the non trivial part (attached patch i18n_data-plugin.patch.gz) to be considered as one of the options when resolving this issue later on.

openstreetmap-trac commented 3 years ago

Author: Andy Allan [Added to the original trac issue at 10.50am, Wednesday, 3rd July 2019]

Moved to https://github.com/openstreetmap/openstreetmap-website/issues/2298