Skip to content

Commit

Permalink
Merge pull request #11 from andrewdwallo/lang
Browse files Browse the repository at this point in the history
Add default language support
  • Loading branch information
andrewdwallo authored Jan 11, 2023
2 parents f384048 + eb96f9d commit 1a07d49
Show file tree
Hide file tree
Showing 24 changed files with 404 additions and 185 deletions.
217 changes: 217 additions & 0 deletions lang/en/default.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
<?php

return [
"fields" => [
"name" => "Name",
"email" => "Email",
"password" => "Password",
"code" => "Code",
"recovery_code" => "Recovery Code",
"current_password" => "Current Password",
],

"buttons" => [
"register" => "Register",
"login" => "Log in",
"confirm" => "Confirm",
"email_password_reset_link" => "Email Password Reset Link",
"reset_password" => "Reset Password",
"use_recovery_code" => "Use a recovery code",
"use_authentication_code" => "Use an authentication code",
"resend_verification_email" => "Resend Verification Email",
"logout" => "Log Out",
"new_photo" => "Select A New Photo",
"remove_photo" => "Remove Photo",
"save" => "Save",
"enable" => "Enable",
"regenerate_recovery_codes" => "Regenerate Recovery Codes",
"show_recovery_codes" => "Show Recovery Codes",
"cancel" => "Cancel",
"disable" => "Disable",
"logout_browser_sessions" => "Log Out Other Browser Sessions",
"done" => "Done.",
"delete_account" => "Delete Account",
"create" => "Create",
"delete" => "Delete",
"permissions" => "Permissions",
"close" => "Close",
"add" => "Add",
"leave" => "Leave",
"remove" => "Remove",
"delete_company" => "Delete Company",
"remember_me" => "Remember me",
],

"labels" => [
"company_name" => "Company Name",
"company_owner" => "Company Owner",
"setup_key" => "Setup Key",
"role" => "Role",
"photo" => "Photo",
"password_confirmation" => "Confirm Password",
"token_name" => "Token Name",
"permissions" => "Permissions",
"new_password" => "New Password",
"unknown" => "Unknown",
"this_device" => "This device",
"last_active" => "Last active",
"last_used" => "Last used",
],

"links" => [
"terms_of_service" => "Terms of Service",
"privacy_policy" => "Privacy Policy",
"already_registered" => "Already registered?",
"register_an_account" => "Register an account",
"forgot_your_password" => "Forgot your password?",
"edit_profile" => "Edit Profile",
],

"navigation" => [
"headers" => [
"manage_company" => "Manage Company",
"switch_companies" => "Switch Companies",
],

"links" => [
"company_settings" => "Company Settings",
"new_company" => "New Company",
"api_tokens" => "API Tokens",
],
],

"pages" => [
"titles" => [
"create_company" => "Create Company",
"company_settings" => "Company Settings",
"api_tokens" => "API Tokens",
"profile" => "Profile",
],
],

"grid_section_titles" => [
"profile_information" => "Profile Information",
"update_password" => "Update Password",
"two_factor_authentication" => "Two Factor Authentication",
"browser_sessions" => "Browser Sessions",
"delete_account" => "Delete Account",
"create_api_token" => "Create API Token",
"company_name" => "Company Name",
"create_company" => "Create Company",
"add_company_employee" => "Add Company Employee",
],

"grid_section_descriptions" => [
"profile_information" => "Update your account's profile information and email address.",
"update_password" => "Ensure your account is using a long, random password to stay secure.",
"two_factor_authentication" => "Add additional security to your account using two factor authentication.",
"browser_sessions" => "Manage and log out your active sessions on other browsers and devices.",
"delete_account" => "Permanently delete your account.",
"create_api_token" => "API tokens allow third-party services to authenticate with our application on your behalf.",
"company_name" => "The company's name and owner information.",
"create_company" => "Create a new company to collaborate with others on projects.",
"add_company_employee" => "Add a new company employee to your company, allowing them to collaborate with you.",
],

"action_section_titles" => [
"pending_company_invitations" => "Pending Company Invitations",
"company_employees" => "Company Employees",
"delete_company" => "Delete Company",
],

"action_section_descriptions" => [
"pending_company_invitations" => "These people have been invited to your company and have been sent an invitation email. They may join the company by accepting the email invitation.",
"company_employees" => "All of the people that are part of this company.",
"delete_company" => "Permanently delete this company.",
],

"modal_titles" => [
"api_token" => "API Token",
"api_token_permissions" => "API Token Permissions",
"delete_api_token" => "Delete API Token",
"manage_role" => "Manage Role",
"leave_company" => "Leave Company",
"remove_company_employee" => "Remove Company Employee",
"logout_browser_sessions" => "Log Out Other Browser Sessions",
"delete_account" => "Delete Account",
"delete_company" => "Delete Company",
],

"modal_descriptions" => [
"api_token" => "Please copy your new API token. For your security, it won't be shown again.",
"delete_api_token" => "Are you sure you would like to delete this API token?",
"leave_company" => "Are you sure you would like to leave this company?",
"remove_company_employee" => "Are you sure you would like to remove this person from the company?",
"logout_browser_sessions" => "Please enter your password to confirm you would like to log out of your other browser sessions across all of your devices.",
"delete_account" => "Are you sure you want to delete your account? Once your account is deleted, all of its resources and data will be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.",
"delete_company" => "Are you sure you want to delete this company? Once a company is deleted, all of its resources and data will be permanently deleted.",
],

"headings" => [
"auth" => [
"register" => "Register an account",
"login" => "Log in to your account",
"confirm_password" => "This is a secure area of the application. Please confirm your password before continuing.",
"forgot_password" => "Forgot your password?",
"two_factor_challenge" => [
"authentication_code" => "Please confirm access to your account by entering the authentication code provided by your authenticator application.",
"emergency_recovery_code" => "Please confirm access to your account by entering one of your emergency recovery codes.",
],
"verify_email" => [
"verification_link_not_sent" => "Before continuing, could you verify your email address by clicking on the link we just emailed to you? If you didn't receive the email, we will gladly send you another.",
"verification_link_sent" => "A new verification link has been sent to the email address you provided in your profile settings.",
],
],

"profile" => [
"update_profile_information" => [
"verification_link_not_sent" => "Before your email can be updated, you must verify your current email address.",
"verification_link_sent" => "A new verification link has been sent to your email address.",
],

"two_factor_authentication" => [
"finish_enabling" => "Finish enabling two factor authentication.",
"enabled" => "You have enabled two factor authentication!",
"not_enabled" => "You have not enabled two factor authentication.",
],
],

"api" => [
"api_token_manager" => [
"manage_api_tokens" => "Manage API Tokens",
],
],

"companies" => [
"company_employee_manager" => [
"pending_invitations" => "Pending Invitations",
"manage_employees" => "Manage Employees",
],
],
],

"subheadings" => [
"auth" => [
"login" => "Or",
"forgot_password" => "Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.",
"register" => "I agree to the :terms_of_service and :privacy_policy",
],

"profile" => [
"two_factor_authentication" => [
"summary" => "When two factor authentication is enabled, you will be prompted for a secure, random token during authentication. You may retrieve this token from your phone's Google Authenticator application.",
"finish_enabling" => "To finish enabling two factor authentication, scan the following QR code using your phone's authenticator application or enter the setup key and provide the generated OTP code.",
"enabled" => "Two factor authentication is now enabled. Scan the following QR code using your phone's authenticator application or enter the setup key.",
"store_codes" => "Store these recovery codes in a secure password manager. They can be used to recover access to your account if your two factor authentication device is lost.",
],

"logout_other_browser_sessions" => "If necessary, you may log out of all of your other browser sessions across all of your devices. Some of your recent sessions are listed below; however, this list may not be exhaustive. If you feel your account has been compromised, you should also update your password.",
"delete_user" => "Once your account is deleted, all of its resources and data will be permanently deleted. Before deleting your account, please download any data or information that you wish to retain.",
],

"companies" => [
"company_employee_manager" => "Please provide the email address of the person you would like to add to this company.",
"delete_company" => "Once a company is deleted, all of its resources and data will be permanently deleted. Before deleting this company, please download any data or information regarding this company that you wish to retain."
],
],
];
2 changes: 2 additions & 0 deletions src/FilamentCompaniesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ public function boot()
{
$this->loadViewsFrom(__DIR__.'/../resources/views', 'filament-companies');

$this->loadTranslationsFrom(__DIR__.'/../lang', 'filament-companies');

Fortify::viewPrefix('auth.');

$this->configureComponents();
Expand Down
7 changes: 5 additions & 2 deletions stubs/app/Filament/Pages/Companies/Create.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@

class Create extends Page
{
protected static ?string $title = 'Create Company';

protected static ?string $slug = 'create';

protected static ?string $navigationIcon = 'heroicon-o-document-text';

protected static string $view = 'filament.pages.companies.create';

protected static bool $shouldRegisterNavigation = false;

protected function getTitle(): string
{
return __('filament-companies::default.pages.titles.create_company');
}
}
7 changes: 5 additions & 2 deletions stubs/app/Filament/Pages/Companies/Show.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

class Show extends Page
{
protected static ?string $title = 'Company Settings';

protected static ?string $slug = 'show';

protected static ?string $navigationIcon = 'heroicon-o-document-text';
Expand All @@ -16,6 +14,11 @@ class Show extends Page

protected static bool $shouldRegisterNavigation = false;

protected function getTitle(): string
{
return __('filament-companies::default.pages.titles.company_settings');
}

protected function getViewData(): array
{
return [
Expand Down
7 changes: 5 additions & 2 deletions stubs/app/Filament/Pages/User/ApiTokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@

class ApiTokens extends Page
{
protected static ?string $title = 'API Tokens';

protected static ?string $slug = 'api-tokens';

protected static ?string $navigationIcon = 'heroicon-o-document-text';

protected static string $view = 'filament.pages.user.api-tokens';

protected static bool $shouldRegisterNavigation = false;

protected function getTitle(): string
{
return __('filament-companies::default.pages.titles.api_tokens');
}
}
5 changes: 5 additions & 0 deletions stubs/app/Filament/Pages/User/Profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ class Profile extends Page
protected static string $view = 'filament.pages.user.profile';

protected static bool $shouldRegisterNavigation = false;

protected function getTitle(): string
{
return __('filament-companies::default.pages.titles.profile');
}
}
Loading

0 comments on commit 1a07d49

Please sign in to comment.