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

Translations.txt value mismatch not being recognized #1374

Open
westontrillium opened this issue Apr 3, 2023 · 3 comments
Open

Translations.txt value mismatch not being recognized #1374

westontrillium opened this issue Apr 3, 2023 · 3 comments
Labels
bug Something isn't working (crash, a rule has a problem) status: Ready An issue that is ready to be worked on.
Milestone

Comments

@westontrillium
Copy link

Describe the bug

I'm not sure if this is a bug or just a missing validation rule. No validation error results from either field_name referencing a value that doesn't exist or field_value referencing a value that doesn't exist.

Example

routes.txt
...,route_short_name,...
...,45,...

translations.txt
...,field_value,...
...,4r,...

^ Validator does not detect that "4r" is not present under routes.route_short_name.

or

...,field_name,...
...,rt_shortname,...

^ Validator does not detect that rt_shortname is not present in routes.txt.

or

...,field_name,...,field_value,
...,route_long_name,...,45,

^ Validator does not detect that 45 is not under ,route_long_name,.

Steps/Code to Reproduce

cctbus-mn-usTEST.zip

  1. Use the above dataset.
  2. Notice errors in the first two records of translations.txt (route_short_name instead of route_long_name for the first record, incorrect field_value for the second record).
  3. Run the dataset on GTFS Validator.
  4. Notice no error message about the two errors.

Expected Results

The Validator should detect these errors and produce an error message for each.

Actual Results

No detection, no error message for either.

Screenshots

No response

Files used

No response

Validator version

4.0.0

Operating system

MacOS

Java version

No response

Additional notes

No response

@westontrillium westontrillium added bug Something isn't working (crash, a rule has a problem) status: Needs triage Applied to all new issues labels Apr 3, 2023
@welcome
Copy link

welcome bot commented Apr 3, 2023

Thanks for opening your first issue in this project! If you haven't already, you can join our slack and join the #gtfs-validators channel to meet our awesome community. Come say hi 👋!

Welcome to the community and thank you for your engagement in open source! 🎉

@isabelle-dr isabelle-dr added this to the Now milestone Jun 12, 2023
@emmambd emmambd modified the milestones: Now , Next Jan 9, 2024
@emmambd emmambd added status: Ready An issue that is ready to be worked on. and removed status: Needs triage Applied to all new issues labels Jan 11, 2024
@github-project-automation github-project-automation bot moved this to Requires investigation in Bug triage Jan 11, 2024
@emmambd
Copy link
Contributor

emmambd commented Feb 26, 2024

Upon reviewing our validation rules, it looks like this is a missing rule. We check

No rule for if a translation is for a field value that doesn't exist. Language from spec: The field must have exactly the value defined in field_value. If only a subset of the value matches field_value, the translation won’t be applied.

Proposal: new rule: translation_unknown_field_value.
A translation references an unknown or missing GTFS field value.
Logic: IF field_value doesn't exist as specified by table_name and field_name = ERROR

@emmambd
Copy link
Contributor

emmambd commented Feb 27, 2024

Tasks

@emmambd emmambd modified the milestones: Now , Next Mar 13, 2024
@emmambd emmambd modified the milestones: Next, Now Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working (crash, a rule has a problem) status: Ready An issue that is ready to be worked on.
Projects
Status: Requires investigation
Development

No branches or pull requests

3 participants