-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77ab7f9
commit 9c1b4a3
Showing
3 changed files
with
38 additions
and
13 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,42 @@ | ||
/** In regions that have multiple official languages, transit agencies/operators typically have language-specific names and web pages. In order to best serve riders in those regions, it is useful for the dataset to include these language-dependent values.2 */ | ||
import { GTFSTableName } from '../file-info'; | ||
|
||
type TranslationByRecordID = { | ||
/** Defines the record that corresponds to the field to be translated. */ | ||
record_id: string, | ||
/** Helps the record that contains the field to be translated when the table doesn’t have a unique ID. */ | ||
record_sub_id: string|number, | ||
/** 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. */ | ||
field_value?: undefined|'' | ||
}; | ||
|
||
type TranslationByFieldValue = { | ||
/** Defines the record that corresponds to the field to be translated. */ | ||
record_id?: undefined|'', | ||
/** Helps the record that contains the field to be translated when the table doesn’t have a unique ID. */ | ||
record_sub_id?: undefined|'', | ||
/** 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. */ | ||
field_value?: string | ||
}; | ||
|
||
type TranslationOfFeedInfo = { | ||
/** Defines the table that contains the field to be translated. */ | ||
table_name: 'feed_info', | ||
/** Defines the record that corresponds to the field to be translated. */ | ||
record_id?: undefined, | ||
/** Helps the record that contains the field to be translated when the table doesn’t have a unique ID. */ | ||
record_sub_id?: undefined, | ||
/** 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. */ | ||
field_value?: undefined | ||
}; | ||
|
||
/** In regions that have multiple official languages, transit agencies/operators typically have language-specific names and web pages. In order to best serve riders in those regions, it is useful for the dataset to include these language-dependent values. */ | ||
export type GTFSTranslation = { | ||
/** Defines the table that contains the field to be translated. */ | ||
table_name: string, | ||
table_name: GTFSTableName, | ||
/** Name of the field to be translated. */ | ||
field_name: string, | ||
/** Language of translation. */ | ||
language: string, | ||
/** Translated value. */ | ||
translation: string, | ||
/** Defines the record that corresponds to the field to be translated. */ | ||
record_id?: string, | ||
/** Helps the record that contains the field to be translated when the table doesn’t have a unique ID. */ | ||
record_sub_id?: string, | ||
/** 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. */ | ||
field_value?: string | ||
}; | ||
translation: string | ||
} & (TranslationByRecordID | TranslationByFieldValue | TranslationOfFeedInfo); |