🌐 ags(i18n): use a type for structure
This commit is contained in:
+1
-3
@@ -1,11 +1,9 @@
|
|||||||
import { Binding, GLib } from "astal";
|
import { GLib } from "astal";
|
||||||
|
|
||||||
import en_US from "./lang/en_US";
|
import en_US from "./lang/en_US";
|
||||||
import pt_BR from "./lang/pt_BR";
|
import pt_BR from "./lang/pt_BR";
|
||||||
|
|
||||||
|
|
||||||
export type i18nStruct = Record<string, string|object|Binding<string| undefined>>;
|
|
||||||
|
|
||||||
const i18nKeys = {
|
const i18nKeys = {
|
||||||
"en_US": en_US,
|
"en_US": en_US,
|
||||||
"pt_BR": pt_BR
|
"pt_BR": pt_BR
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { i18nStruct } from "../intl";
|
import { i18nStruct } from "../struct";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
language: "English (United States)",
|
language: "English (United States)",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { i18nStruct } from "../intl";
|
import { i18nStruct } from "../struct";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
language: "Português (Brasil)",
|
language: "Português (Brasil)",
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
export type i18nStruct = {
|
||||||
|
language: string,
|
||||||
|
bar: {
|
||||||
|
apps: {
|
||||||
|
tooltip: string
|
||||||
|
}
|
||||||
|
},
|
||||||
|
control_center: {
|
||||||
|
tiles: {
|
||||||
|
enabled: string,
|
||||||
|
disabled: string,
|
||||||
|
more: string,
|
||||||
|
|
||||||
|
network: {
|
||||||
|
network: string,
|
||||||
|
connected: string,
|
||||||
|
disconnected: string,
|
||||||
|
unknown: string,
|
||||||
|
connecting: string,
|
||||||
|
wireless: string,
|
||||||
|
wired: string
|
||||||
|
},
|
||||||
|
recording: {
|
||||||
|
title: string,
|
||||||
|
disabled_desc: string,
|
||||||
|
enabled_desc: string,
|
||||||
|
},
|
||||||
|
dnd: {
|
||||||
|
title: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ask_popup: {
|
||||||
|
title: string,
|
||||||
|
options: {
|
||||||
|
cancel: string,
|
||||||
|
accept: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user