From d523e3f8ca911fbaf206793d5137206be5ad0324 Mon Sep 17 00:00:00 2001 From: Kayla Firestack Date: Mon, 12 Feb 2024 12:35:27 -0500 Subject: [PATCH] fix(gtfs/spec/reference): remove extra backtick in`record_id` description (#431) --- gtfs/spec/en/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 1602678f..9571e46b 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -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.

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).
_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:

- `agency_id` for [agency.txt](#agencytxt)`
- `stop_id` for [stops.txt](#stopstxt);
- `route_id` for [routes.txt](#routestxt);
- `trip_id` for [trips.txt](#tripstxt);
- `trip_id` for [stop_times.txt](#stop_timestxt);
- `pathway_id` for [pathways.txt](#pathwaystxt);
- `level_id` for [levels.txt](#levelstxt);
- `attribution_id` for [attributions.txt](#attributionstxt).

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:

- `service_id` for [calendar.txt](#calendartxt);
- `service_id` for [calendar_dates.txt](#calendar_datestxt);
- `fare_id` for [fare_attributes.txt](#fare_attributestxt);
- `fare_id` for [fare_rules.txt](#fare_rulestxt);
- `shape_id` for [shapes.txt](#shapestxt);
- `trip_id` for [frequencies.txt](#frequenciestxt);
- `from_stop_id` for `transfers.txt`.

Conditionally Required:
- **Forbidden** if `table_name` is `feed_info`.
- **Forbidden** if `field_value` is defined.
- **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:

- `agency_id` for [agency.txt](#agencytxt)
- `stop_id` for [stops.txt](#stopstxt);
- `route_id` for [routes.txt](#routestxt);
- `trip_id` for [trips.txt](#tripstxt);
- `trip_id` for [stop_times.txt](#stop_timestxt);
- `pathway_id` for [pathways.txt](#pathwaystxt);
- `level_id` for [levels.txt](#levelstxt);
- `attribution_id` for [attributions.txt](#attributionstxt).

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:

- `service_id` for [calendar.txt](#calendartxt);
- `service_id` for [calendar_dates.txt](#calendar_datestxt);
- `fare_id` for [fare_attributes.txt](#fare_attributestxt);
- `fare_id` for [fare_rules.txt](#fare_rulestxt);
- `shape_id` for [shapes.txt](#shapestxt);
- `trip_id` for [frequencies.txt](#frequenciestxt);
- `from_stop_id` for `transfers.txt`.

Conditionally Required:
- **Forbidden** if `table_name` is `feed_info`.
- **Forbidden** if `field_value` is defined.
- **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:

- None for [agency.txt](#agencytxt);
- None for [stops.txt](#stopstxt);
- None for [routes.txt](#routestxt);
- None for [trips.txt](#tripstxt);
- `stop_sequence` for [stop_times.txt](#stop_timestxt);
- None for [pathways.txt](#pathwaystxt);
- None for [levels.txt](#levelstxt);
- None for [attributions.txt](#attributionstxt).

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:

- None for [calendar.txt](#calendartxt);
- `date` for [calendar_dates.txt](#calendar_datestxt);
- None for [fare_attributes.txt](#fare_attributestxt);
- `route_id` for [fare_rules.txt](#fare_rulestxt);
- None for [shapes.txt](#shapestxt);
- `start_time` for [frequencies.txt](#frequenciestxt);
- `to_stop_id` for [transfers.txt](#transferstxt).

Conditionally Required:
- **Forbidden** if `table_name` is `feed_info`.
- **Forbidden** if `field_value` is defined.
- **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.

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.

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.

Conditionally Required:
- **Forbidden** if `table_name` is `feed_info`.
- **Forbidden** if `record_id` is defined.
- **Required** if `record_id` is empty. |