2023-04-17 03:57:12 +01:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package usdpl;
|
|
|
|
|
|
|
|
// The translation service
|
|
|
|
service Translations {
|
|
|
|
// Retrieves all translations for the provided 4-letter code
|
2024-04-07 16:42:37 +01:00
|
|
|
rpc GetLanguage (LanguageRequest) returns (TranslationsReply);
|
|
|
|
/// Retrieve a specific translation
|
|
|
|
rpc GetTranslation(TranslationRequest) returns (TranslatedString);
|
2023-04-17 03:57:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// The request message containing the language code
|
|
|
|
message LanguageRequest {
|
|
|
|
string lang = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// The response message containing all translations for the language
|
|
|
|
message TranslationsReply {
|
|
|
|
map<string, string> translations = 1;
|
|
|
|
}
|
2024-04-07 16:42:37 +01:00
|
|
|
|
|
|
|
// The request message for a specific translated string
|
|
|
|
message TranslationRequest {
|
|
|
|
string lang = 1;
|
|
|
|
string msg_id = 2;
|
|
|
|
uint64 count = 3;
|
|
|
|
uint64 uuid = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TranslatedString {
|
|
|
|
string translated = 1;
|
|
|
|
bool is_default = 2;
|
|
|
|
uint64 uuid = 3;
|
|
|
|
}
|