mirror of
https://github.com/pterodactyl/panel.git
synced 2026-12-04 21:35:47 -05:00
initial language pack support
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -814,7 +814,10 @@ export type AdminUserAttributes = {
|
||||
email: string;
|
||||
first_name: string;
|
||||
last_name: string;
|
||||
language: string;
|
||||
/**
|
||||
* The locale the user chose, or null to follow the panel default.
|
||||
*/
|
||||
language: string | null;
|
||||
root_admin: boolean;
|
||||
'2fa': boolean;
|
||||
image: string;
|
||||
@@ -1108,7 +1111,10 @@ export type ApplicationUserAttributes = {
|
||||
email: string;
|
||||
first_name: string;
|
||||
last_name: string;
|
||||
language: string;
|
||||
/**
|
||||
* The locale the user chose, or null to follow the panel default.
|
||||
*/
|
||||
language: string | null;
|
||||
root_admin: boolean;
|
||||
'2fa': boolean;
|
||||
image: string | null;
|
||||
@@ -1167,7 +1173,7 @@ export type AuthUser = {
|
||||
email: string;
|
||||
name_first: string | null;
|
||||
name_last: string | null;
|
||||
language: string;
|
||||
language: string | null;
|
||||
root_admin: boolean;
|
||||
use_totp: boolean;
|
||||
gravatar: boolean;
|
||||
@@ -1584,7 +1590,10 @@ export type ClientUserAttributes = {
|
||||
email: string;
|
||||
first_name: string;
|
||||
last_name: string;
|
||||
language: string;
|
||||
/**
|
||||
* The locale the user chose, or null to follow the panel default.
|
||||
*/
|
||||
language: string | null;
|
||||
avatar: string | null;
|
||||
};
|
||||
|
||||
@@ -1718,7 +1727,7 @@ export type AdminCreateUserRequest = {
|
||||
/**
|
||||
* The preferences language.
|
||||
*/
|
||||
language?: string;
|
||||
language?: string | null;
|
||||
};
|
||||
extensions?: ExtensionFields;
|
||||
};
|
||||
@@ -1756,7 +1765,7 @@ export type AdminUpdateUserRequest = {
|
||||
/**
|
||||
* The preferences language.
|
||||
*/
|
||||
language?: string;
|
||||
language?: string | null;
|
||||
};
|
||||
extensions?: ExtensionFields;
|
||||
};
|
||||
@@ -2780,9 +2789,9 @@ export type ApplicationCreateUserRequest = {
|
||||
*/
|
||||
password?: string | null;
|
||||
/**
|
||||
* The locale code.
|
||||
* The locale code, such as en or pt_BR. Null follows the panel default.
|
||||
*/
|
||||
language?: 'en';
|
||||
language?: string | null;
|
||||
/**
|
||||
* Whether the user has administrator privileges.
|
||||
*/
|
||||
@@ -2816,9 +2825,9 @@ export type ApplicationUpdateUserRequest = {
|
||||
*/
|
||||
password?: string | null;
|
||||
/**
|
||||
* The locale code.
|
||||
* The locale code, such as en or pt_BR. Null follows the panel default.
|
||||
*/
|
||||
language?: 'en';
|
||||
language?: string | null;
|
||||
/**
|
||||
* Whether the user has administrator privileges.
|
||||
*/
|
||||
@@ -3382,6 +3391,13 @@ export type ClientUpdateAccountPasswordRequest = {
|
||||
password_confirmation: string;
|
||||
};
|
||||
|
||||
export type ClientUpdateAccountLanguageRequest = {
|
||||
/**
|
||||
* The locale code, such as en or pt_BR. Null follows the panel default.
|
||||
*/
|
||||
language?: string | null;
|
||||
};
|
||||
|
||||
export type ClientUpdateAccountAvatarRequest = {
|
||||
/**
|
||||
* PNG, JPEG, SVG, WebP, AVIF or ICO image of at most 10 MiB.
|
||||
@@ -3773,6 +3789,19 @@ export type AdminListExtensionsResponseBody = {
|
||||
ui_entry: string | null;
|
||||
ui_mode?: string;
|
||||
frontend_entry: string | null;
|
||||
/**
|
||||
* Locales the package translates the panel into.
|
||||
*/
|
||||
languages: Array<string>;
|
||||
/**
|
||||
* For a language pack: per locale and other enabled pack, how many keys both define without one requiring the other, and which pack wins.
|
||||
*/
|
||||
language_conflicts: Array<{
|
||||
locale?: string;
|
||||
extension?: string;
|
||||
winner?: string;
|
||||
keys?: number;
|
||||
}>;
|
||||
installed?: boolean;
|
||||
enabled?: boolean;
|
||||
state?: string;
|
||||
@@ -3806,6 +3835,19 @@ export type AdminInstallExtensionResponseBody = {
|
||||
ui_entry: string | null;
|
||||
ui_mode?: string;
|
||||
frontend_entry: string | null;
|
||||
/**
|
||||
* Locales the package translates the panel into.
|
||||
*/
|
||||
languages: Array<string>;
|
||||
/**
|
||||
* For a language pack: per locale and other enabled pack, how many keys both define without one requiring the other, and which pack wins.
|
||||
*/
|
||||
language_conflicts: Array<{
|
||||
locale?: string;
|
||||
extension?: string;
|
||||
winner?: string;
|
||||
keys?: number;
|
||||
}>;
|
||||
installed?: boolean;
|
||||
enabled?: boolean;
|
||||
state?: string;
|
||||
@@ -3878,6 +3920,19 @@ export type AdminEnableExtensionResponseBody = {
|
||||
ui_entry: string | null;
|
||||
ui_mode?: string;
|
||||
frontend_entry: string | null;
|
||||
/**
|
||||
* Locales the package translates the panel into.
|
||||
*/
|
||||
languages: Array<string>;
|
||||
/**
|
||||
* For a language pack: per locale and other enabled pack, how many keys both define without one requiring the other, and which pack wins.
|
||||
*/
|
||||
language_conflicts: Array<{
|
||||
locale?: string;
|
||||
extension?: string;
|
||||
winner?: string;
|
||||
keys?: number;
|
||||
}>;
|
||||
installed?: boolean;
|
||||
enabled?: boolean;
|
||||
state?: string;
|
||||
@@ -3907,6 +3962,19 @@ export type AdminDisableExtensionResponseBody = {
|
||||
ui_entry: string | null;
|
||||
ui_mode?: string;
|
||||
frontend_entry: string | null;
|
||||
/**
|
||||
* Locales the package translates the panel into.
|
||||
*/
|
||||
languages: Array<string>;
|
||||
/**
|
||||
* For a language pack: per locale and other enabled pack, how many keys both define without one requiring the other, and which pack wins.
|
||||
*/
|
||||
language_conflicts: Array<{
|
||||
locale?: string;
|
||||
extension?: string;
|
||||
winner?: string;
|
||||
keys?: number;
|
||||
}>;
|
||||
installed?: boolean;
|
||||
enabled?: boolean;
|
||||
state?: string;
|
||||
@@ -13125,6 +13193,39 @@ export type ClientUpdateAccountPasswordResponses = {
|
||||
|
||||
export type ClientUpdateAccountPasswordResponse = ClientUpdateAccountPasswordResponses[keyof ClientUpdateAccountPasswordResponses];
|
||||
|
||||
export type ClientUpdateAccountLanguageData = {
|
||||
body?: ClientUpdateAccountLanguageRequest;
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: '/api/client/account/language';
|
||||
};
|
||||
|
||||
export type ClientUpdateAccountLanguageErrors = {
|
||||
/**
|
||||
* Authentication credentials were missing or invalid.
|
||||
*/
|
||||
401: ErrorEnvelope;
|
||||
/**
|
||||
* The API key does not have permission to perform this action.
|
||||
*/
|
||||
403: ErrorEnvelope;
|
||||
/**
|
||||
* The submitted data is invalid.
|
||||
*/
|
||||
422: ValidationErrorEnvelope;
|
||||
};
|
||||
|
||||
export type ClientUpdateAccountLanguageError = ClientUpdateAccountLanguageErrors[keyof ClientUpdateAccountLanguageErrors];
|
||||
|
||||
export type ClientUpdateAccountLanguageResponses = {
|
||||
/**
|
||||
* Language updated.
|
||||
*/
|
||||
200: ClientUserResource;
|
||||
};
|
||||
|
||||
export type ClientUpdateAccountLanguageResponse = ClientUpdateAccountLanguageResponses[keyof ClientUpdateAccountLanguageResponses];
|
||||
|
||||
export type ClientDeleteAccountAvatarData = {
|
||||
body?: never;
|
||||
path?: never;
|
||||
|
||||
Reference in New Issue
Block a user