grote / Transportr

Free Public Transport Assistant without Ads or Tracking
https://transportr.app
GNU General Public License v3.0
1.06k stars 189 forks source link

Remove Network IDs from Network Name #213

Closed verdulo closed 8 years ago

verdulo commented 8 years ago

Please remove from translation (from transifex) names of transport companies, which of course shouldn't be translated:

String "FR-SW" (241) looks strange, maybe it should be changed to "South-Western France"?

grote commented 8 years ago

This is indeed a good idea. Some providers still use the internal Network ID instead of a description. This can be easily changed by changing the strings here: https://github.com/grote/Transportr/blob/master/res/values/strings.xml#L183

grote commented 8 years ago

Having said that, the description should always describe as precisely as possible what the provider offers. Sometimes, for a regional monopolistic provider this could just mean "Vienna", but sometimes this can also mean "MTA, CDTA, Port Authority, Staten Island Ferry, NFTA" or "SPTRANS EPTC". In the case of np_desc_spain there's also an explanation for the abbreviations. That's also possible if it helps.

The case of Network ID as name/description refers to "FR-SW". So essentially all strings starting with np_name_ need to be reviewed.

patkan commented 8 years ago

I would try to do that. Do I get it right? I would have to check the providers and make sure that all names of Transport-networks are not translatable and Names of Regions are translatable, but written properly (not capitalized and so on).

grote commented 8 years ago

Hey @patkan, it would be awesome if you could do that! :)

I think you got it right. Thanks for checking before starting to work on that. Also make sure that the internal network ID is not exposed via the name or description.

If abbreviations are explained in the description, they should be translatable, but maybe it would be better to move those descriptions to the same model that is used for the France provider you added recently (translatable description plus untranslatable list of agencies).

For Navitia based providers, you can look up the list of agencies (is sometimes updated) here: https://navitia.opendatasoft.com/explore/

grote commented 8 years ago

@patkan if you like, while you are at touching the networks already, you could also add the little Emoji region flags to the missing regions. Only if you like of course.

patkan commented 8 years ago

I will have a look at it ;-)

patkan commented 8 years ago

I would try out how "France-style" for all entries. I think I will then sort the strings.xml like this:

np_region_1
np_name_1
np_desc_1
np_desc_1_networks
np_name_2
np_desc_2
np_desc_2_networks

np_region_2
np_name_1
np_desc_1
np_desc_1_networks
np_name_2
np_desc_2
np_desc_2_networks

This would mean resorting the whole strings.xml. Is this OK or does it somehow create problems with transifex?

grote commented 8 years ago

As long as you don't change the names of the strings, that shouldn't cause issues.

However, I was thinking that maybe we should not even have the untranslatable np_desc_1_networks strings in strings.xml. They are maybe better kept directly in the TransportNetworks class.

patkan commented 8 years ago

I thought a bit more about the "France-style" layout and played a bit around. I think for the representation in the UI we have to differentiate between two cases:

Provider consists of only one agency or network

VGN
Nürnberg, Fürth, Erlangen

(Strictly VGN is a bad example because in Nuremberg VGN consists of VAG and several local agencies, but there are other providers that only have data from one agency and then a third line in the UI would be superfluous.)

Provider consists of several agencies

France North West
Bretagne, Pays de la Loire, Centre, Basse Normandie, Haute Normandie
(LILA, STAR, TAN, IRIGO, SNCF)
grote commented 8 years ago

Indeed, good point! In case, there's only one network, the internal ID is typically also the network name and we don't need an extra list in brackets behind the description.

patkan commented 8 years ago

OK, I see the point in not putting the untranslatable strings in the xml, but what should we do with the np_name-strings? Some of them are untranslatable. In order to not make it confusing I would put them all in the strings.xml and mark those that are the names of agencies as untranslatable.

grote commented 8 years ago

No, there can be untranslatable strings in that file. I just thought to maybe keep the networks in the class, but doesn't matter really.

But I agree that the network related strings should either be all in the class or in strings.xml. Your choice.