mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: auto pick localization entity
This commit is contained in:
1 parent
b2f266401f
commit
4c8c2d0868
1 file changed
+9
-1
@@ -19,7 +19,15 @@ export class ServerAPI extends AbstractAPI {
|
||||
}
|
||||
|
||||
async strings(locale: string) {
|
||||
const clientConfig = this.metadata.item("ClientConfigsEntity.prod");
|
||||
const group = this.metadata.group("ClientConfigsEntity");
|
||||
|
||||
if (group.length !== 1) {
|
||||
throw new RangeError(
|
||||
`Don't know how to handle ${group.length} ClientConfigsEntities`
|
||||
);
|
||||
}
|
||||
|
||||
const clientConfig = this.metadata.item(group[0].id);
|
||||
const localizationResources = clientConfig.LocalizationResources();
|
||||
|
||||
if (!localizationResources.remote_storage) {
|
||||
|
||||
Reference in new issue
Block a user