Skip to content

Commit

Permalink
fix(gtfs/spec/reference): remove extra backtick inrecord_id descrip…
Browse files Browse the repository at this point in the history
…tion (#431)
  • Loading branch information
firestack authored Feb 12, 2024
1 parent 7a44805 commit d523e3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gtfs/spec/en/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ If both referencing methods (`record_id`, `record_sub_id`) and `field_value` are
| `field_name` | Text | **Required** | Name of the field to be translated. Fields with type `Text` may be translated, fields with type `URL`, `Email` and `Phone number` may also be “translated” to provide resources in the correct language. Fields with other types should not be translated. |
| `language` | Language code | **Required** | Language of translation.<br><br>If the language is the same as in `feed_info.feed_lang`, the original value of the field will be assumed to be the default value to use in languages without specific translations (if `default_lang` doesn't specify otherwise).<hr>_Example: In Switzerland, a city in an officially bilingual canton is officially called “Biel/Bienne”, but would simply be called “Bienne” in French and “Biel” in German._ |
| `translation` | Text or URL or Email or Phone number | **Required** | Translated value. |
| `record_id` | Foreign ID | **Conditionally Required** | Defines the record that corresponds to the field to be translated. The value in `record_id` must be the first or only field of a table's primary key, as defined in the primary key attribute for each table and below:<br><br>- `agency_id` for [agency.txt](#agencytxt)`<br>- `stop_id` for [stops.txt](#stopstxt);<br>- `route_id` for [routes.txt](#routestxt);<br>- `trip_id` for [trips.txt](#tripstxt);<br>- `trip_id` for [stop_times.txt](#stop_timestxt);<br>- `pathway_id` for [pathways.txt](#pathwaystxt);<br>- `level_id` for [levels.txt](#levelstxt);<br>- `attribution_id` for [attributions.txt](#attributionstxt).<br><br>Fields in tables not defined above should not be translated. However producers sometimes add extra fields that are outside the official specification and these unofficial fields may be translated. Below is the recommended way to use `record_id` for those tables:<br><br>- `service_id` for [calendar.txt](#calendartxt);<br>- `service_id` for [calendar_dates.txt](#calendar_datestxt);<br>- `fare_id` for [fare_attributes.txt](#fare_attributestxt);<br>- `fare_id` for [fare_rules.txt](#fare_rulestxt);<br>- `shape_id` for [shapes.txt](#shapestxt);<br>- `trip_id` for [frequencies.txt](#frequenciestxt);<br>- `from_stop_id` for `transfers.txt`.<br><br>Conditionally Required:<br>- **Forbidden** if `table_name` is `feed_info`.<br>- **Forbidden** if `field_value` is defined.<br>- **Required** if `field_value` is empty. |
| `record_id` | Foreign ID | **Conditionally Required** | Defines the record that corresponds to the field to be translated. The value in `record_id` must be the first or only field of a table's primary key, as defined in the primary key attribute for each table and below:<br><br>- `agency_id` for [agency.txt](#agencytxt)<br>- `stop_id` for [stops.txt](#stopstxt);<br>- `route_id` for [routes.txt](#routestxt);<br>- `trip_id` for [trips.txt](#tripstxt);<br>- `trip_id` for [stop_times.txt](#stop_timestxt);<br>- `pathway_id` for [pathways.txt](#pathwaystxt);<br>- `level_id` for [levels.txt](#levelstxt);<br>- `attribution_id` for [attributions.txt](#attributionstxt).<br><br>Fields in tables not defined above should not be translated. However producers sometimes add extra fields that are outside the official specification and these unofficial fields may be translated. Below is the recommended way to use `record_id` for those tables:<br><br>- `service_id` for [calendar.txt](#calendartxt);<br>- `service_id` for [calendar_dates.txt](#calendar_datestxt);<br>- `fare_id` for [fare_attributes.txt](#fare_attributestxt);<br>- `fare_id` for [fare_rules.txt](#fare_rulestxt);<br>- `shape_id` for [shapes.txt](#shapestxt);<br>- `trip_id` for [frequencies.txt](#frequenciestxt);<br>- `from_stop_id` for `transfers.txt`.<br><br>Conditionally Required:<br>- **Forbidden** if `table_name` is `feed_info`.<br>- **Forbidden** if `field_value` is defined.<br>- **Required** if `field_value` is empty. |
| `record_sub_id` | Foreign ID | **Conditionally Required** | Helps the record that contains the field to be translated when the table doesn’t have a unique ID. Therefore, the value in `record_sub_id` is the secondary ID of the table, as defined by the table below:<br><br>- None for [agency.txt](#agencytxt);<br>- None for [stops.txt](#stopstxt);<br>- None for [routes.txt](#routestxt);<br>- None for [trips.txt](#tripstxt);<br>- `stop_sequence` for [stop_times.txt](#stop_timestxt);<br>- None for [pathways.txt](#pathwaystxt);<br>- None for [levels.txt](#levelstxt);<br>- None for [attributions.txt](#attributionstxt).<br><br>Fields in tables not defined above should not be translated. However producers sometimes add extra fields that are outside the official specification and these unofficial fields may be translated. Below is the recommended way to use `record_sub_id` for those tables:<br><br>- None for [calendar.txt](#calendartxt);<br>- `date` for [calendar_dates.txt](#calendar_datestxt);<br>- None for [fare_attributes.txt](#fare_attributestxt);<br>- `route_id` for [fare_rules.txt](#fare_rulestxt);<br>- None for [shapes.txt](#shapestxt);<br>- `start_time` for [frequencies.txt](#frequenciestxt);<br>- `to_stop_id` for [transfers.txt](#transferstxt).<br><br>Conditionally Required:<br>- **Forbidden** if `table_name` is `feed_info`.<br>- **Forbidden** if `field_value` is defined.<br>- **Required** if `table_name=stop_times` and `record_id` is defined. |
| `field_value` | Text or URL or Email or Phone number | **Conditionally Required** | Instead of defining which record should be translated by using `record_id` and `record_sub_id`, this field can be used to define the value which should be translated. When used, the translation will be applied when the fields identified by `table_name` and `field_name` contains the exact same value defined in field_value.<br><br>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.<br><br>If two translation rules match the same record (one with `field_value`, and the other one with `record_id`), the rule with `record_id` takes precedence.<br><br>Conditionally Required:<br>- **Forbidden** if `table_name` is `feed_info`.<br>- **Forbidden** if `record_id` is defined.<br>- **Required** if `record_id` is empty. |

Expand Down

0 comments on commit d523e3f

Please sign in to comment.