-
-
Notifications
You must be signed in to change notification settings - Fork 168
Adding more translation strings for server panel (non-admin) #1418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
All contributors have signed the CLA ✍️ ✅ |
Translation is all done on Crowdin. Please submit your translations here |
noted, but this pr is to add more translation strings related to the panel by server user, i.e., the console, file browser etc. |
Haha, sorry. I just saw the title and assumed there were translations, like with the other dozens of PRs |
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please take out the Chinese translations, we use crowdin for translations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a bunch, just need to fix up these final keys and I think we're ready to go!
@@ -32,6 +32,6 @@ public function getColor(): string | |||
|
|||
public function getLabel(): string | |||
{ | |||
return str($this->value)->headline(); | |||
return trans('strings.backupstatus.'.str($this->value)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spaces should be replaced with underscores! BackupStatus
= backup_status
or Backup Status
for example.
return trans('strings.backupstatus.'.str($this->value)); | |
return trans('strings.backup_status.'.str($this->value)); |
@@ -68,7 +68,7 @@ public function getColor(bool $hex = false): string | |||
|
|||
public function getLabel(): string | |||
{ | |||
return str($this->value)->title(); | |||
return trans('strings.containerstatus.'.str($this->value)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return trans('strings.containerstatus.'.str($this->value)); | |
return trans('strings.container_status.'.str($this->value)); |
@@ -152,20 +152,23 @@ protected function getHeaderActions(): array | |||
|
|||
return [ | |||
Action::make('start') | |||
->label(trans('strings.consolestatus.start')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
->label(trans('strings.consolestatus.start')) | |
->label(trans('strings.console_status.start')) |
->color('primary') | ||
->size(ActionSize::ExtraLarge) | ||
->dispatch('setServerState', ['state' => 'start', 'uuid' => $server->uuid]) | ||
->authorize(fn () => auth()->user()->can(Permission::ACTION_CONTROL_START, $server)) | ||
->disabled(fn () => $server->isInConflictState() || !$this->status->isStartable()) | ||
->icon('tabler-player-play-filled'), | ||
Action::make('restart') | ||
->label(trans('strings.consolestatus.restart')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
->label(trans('strings.consolestatus.restart')) | |
->label(trans('strings.console_status.restart')) |
->color('gray') | ||
->size(ActionSize::ExtraLarge) | ||
->dispatch('setServerState', ['state' => 'restart', 'uuid' => $server->uuid]) | ||
->authorize(fn () => auth()->user()->can(Permission::ACTION_CONTROL_RESTART, $server)) | ||
->disabled(fn () => $server->isInConflictState() || !$this->status->isRestartable()) | ||
->icon('tabler-reload'), | ||
Action::make('stop') | ||
->label(trans('strings.consolestatus.stop')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
->label(trans('strings.consolestatus.stop')) | |
->label(trans('strings.console_status.stop')) |
'unarchive' => 'Unarchive', | ||
'unarchive_completed' => 'Unarchive completed', | ||
'deletefileconfirm' => 'Delete file?', | ||
'bulkmove' => [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'bulkmove' => [ | |
'bulk_move' => [ |
'archive_created' => 'Archive created', | ||
'unarchive' => 'Unarchive', | ||
'unarchive_completed' => 'Unarchive completed', | ||
'deletefileconfirm' => 'Delete file?', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'deletefileconfirm' => 'Delete file?', | |
'delete_file_confirm' => 'Delete file?', |
'is_directory' => [ | ||
'title' => '<code> :file is a directory', | ||
], | ||
'ignorefile' => [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'ignorefile' => [ | |
'ignore_file' => [ |
return [ | ||
'edit' => [ | ||
'editing_title' => 'Editing :path', | ||
'save&close' => 'Save & Close', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'save&close' => 'Save & Close', | |
'save_and_close' => 'Save & Close', |
'assignall' => 'Assign All', | ||
'heading' => 'Invite User', | ||
'actionlabel' => 'Invite', | ||
'userinvited' => 'User Invited!', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'assignall' => 'Assign All', | |
'heading' => 'Invite User', | |
'actionlabel' => 'Invite', | |
'userinvited' => 'User Invited!', | |
'assign_all' => 'Assign All', | |
'heading' => 'Invite User', | |
'action_label' => 'Invite', | |
'user_invited' => 'User Invited!', |
Thanks for your comments and guides. I will work on it and finishing hopefully this Jun, please hold the merge for now. |
@@ -32,6 +32,6 @@ public function getColor(): string | |||
|
|||
public function getLabel(): string | |||
{ | |||
return str($this->value)->headline(); | |||
return trans('strings.backupstatus.'.str($this->value)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return trans('strings.backupstatus.'.str($this->value)); | |
return trans('strings.backupstatus.' . $this->value); |
No need for str when not using headline since this Enum is a string
panel/app/Enums/BackupStatus.php
Line 9 in de166bc
enum BackupStatus: string implements HasColor, HasIcon, HasLabel |
@@ -68,7 +68,7 @@ public function getColor(bool $hex = false): string | |||
|
|||
public function getLabel(): string | |||
{ | |||
return str($this->value)->title(); | |||
return trans('strings.containerstatus.'.str($this->value)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return trans('strings.containerstatus.'.str($this->value)); | |
return trans('strings.containerstatus.' . $this->value); |
No need for str when not using headline since this Enum is a string
panel/app/Enums/BackupStatus.php
Line 9 in de166bc
enum BackupStatus: string implements HasColor, HasIcon, HasLabel |
No description provided.