-
Notifications
You must be signed in to change notification settings - Fork 393
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
Showing
9 changed files
with
318 additions
and
62 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
enum SubtitleType { | ||
// 中文(中国) | ||
zhCN, | ||
// 中文(自动翻译) | ||
aizh, | ||
// 英语(自动生成) | ||
aien, | ||
} | ||
|
||
extension SubtitleTypeExtension on SubtitleType { | ||
String get description { | ||
switch (this) { | ||
case SubtitleType.zhCN: | ||
return '中文(中国)'; | ||
case SubtitleType.aizh: | ||
return '中文(自动翻译)'; | ||
case SubtitleType.aien: | ||
return '英语(自动生成)'; | ||
} | ||
} | ||
} | ||
|
||
extension SubtitleIdExtension on SubtitleType { | ||
String get id { | ||
switch (this) { | ||
case SubtitleType.zhCN: | ||
return 'zh-CN'; | ||
case SubtitleType.aizh: | ||
return 'ai-zh'; | ||
case SubtitleType.aien: | ||
return 'ai-en'; | ||
} | ||
} | ||
} | ||
|
||
extension SubtitleCodeExtension on SubtitleType { | ||
int get code { | ||
switch (this) { | ||
case SubtitleType.zhCN: | ||
return 1; | ||
case SubtitleType.aizh: | ||
return 2; | ||
case SubtitleType.aien: | ||
return 3; | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.