Skip to content

translations.txt: translation should not be a primary key#326

Merged
sccmcca merged 1 commit intogoogle:masterfrom
timMillet:translations-primary-keys
Jun 2, 2022
Merged

translations.txt: translation should not be a primary key#326
sccmcca merged 1 commit intogoogle:masterfrom
timMillet:translations-primary-keys

Conversation

@timMillet
Copy link
Contributor

Current issue

The primary key for translations.txt is *, meaning all fields are part of the primary key. However, this allows two identical records to be translated in different ways for one language, with no reasoning behind which translation should take precedence. It seems that this is in fact an error, and that the translation field should not be part of the primary key of the table. Example:

routes.txt

route_id,route_short_name
route_id_1,subway

translations.txt

table_name,field_name,language,translation,record_id,record_sub_id,field_value
routes,route_short_name,fr,métro,route_id_1,,
routes,route_short_name,fr,train,route_id_1,,

Solution in this PR

The fields (table_name, field_name, language, record_id, record_sub_id, field_value) are the primary keys of translations.txt.

@google-cla
Copy link

google-cla bot commented May 12, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

For more information, open the CLA check for this pull request.

@westontrillium
Copy link
Contributor

Would my solution to #327 negate the need for this change?

@timMillet
Copy link
Contributor Author

@westontrillium IMHO, no, the issue would remain.

@sccmcca sccmcca added the GTFS Schedule Issues and Pull Requests that focus on GTFS Schedule label May 17, 2022
@timMillet
Copy link
Contributor Author

It looks like the proposal does not raise any other concerns. I’m opening a vote on this PR.

  • translations.txt is already produced and consumed (see the original PR#180). Transit is interested in consuming it once this PR is accepted.
  • Voting ends on 2022-06-02 at 23:59:59 UTC.

NB: The vote is also open on PR#327 which fixes another issue in translations.txt.

@skinkie
Copy link
Contributor

skinkie commented May 26, 2022

+1 OpenGeo, thanks for the fix.

@npaun
Copy link
Contributor

npaun commented May 26, 2022

+1 Transit

@brodyFlannigan
Copy link

+1 Brody Flannigan Transit Data

@sccmcca sccmcca added the Vote to Test Community votes to determine whether the proposal is ready for testing. label May 26, 2022
@botanize
Copy link
Contributor

+1 Metro Transit

@flocsy
Copy link
Contributor

flocsy commented May 29, 2022

+1 Moovit

@timMillet
Copy link
Contributor Author

The voting period has ended. With 5 votes in favor and no votes against, this proposal is adopted.
Thanks to anyone who participated and voted!

@sccmcca sccmcca removed the Vote to Test Community votes to determine whether the proposal is ready for testing. label Jun 2, 2022
@sccmcca sccmcca merged commit 5576040 into google:master Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GTFS Schedule Issues and Pull Requests that focus on GTFS Schedule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants