From 2a44888e8ede39e7b86daa1ee27b7e1e62e5d9ce Mon Sep 17 00:00:00 2001 From: Andrew Wallo Date: Wed, 11 Jan 2023 04:37:23 -0500 Subject: [PATCH 1/4] - add default language support new file: lang/en/default.php modified: src/FilamentCompaniesServiceProvider.php modified: stubs/filament/resources/views/navigation-menu.blade.php --- lang/en/default.php | 208 ++++++++++++++++++ src/FilamentCompaniesServiceProvider.php | 2 + .../resources/views/navigation-menu.blade.php | 8 +- 3 files changed, 214 insertions(+), 4 deletions(-) create mode 100644 lang/en/default.php diff --git a/lang/en/default.php b/lang/en/default.php new file mode 100644 index 0000000..fea77b4 --- /dev/null +++ b/lang/en/default.php @@ -0,0 +1,208 @@ + [ + "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", + ], + + "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", + ], + + "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", + ], + ], + + "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", + ], + + "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.", + ], + + "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.", + ], + ], +]; diff --git a/src/FilamentCompaniesServiceProvider.php b/src/FilamentCompaniesServiceProvider.php index ef4cd8a..dc4e5fa 100644 --- a/src/FilamentCompaniesServiceProvider.php +++ b/src/FilamentCompaniesServiceProvider.php @@ -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(); diff --git a/stubs/filament/resources/views/navigation-menu.blade.php b/stubs/filament/resources/views/navigation-menu.blade.php index e8610f7..092dba6 100644 --- a/stubs/filament/resources/views/navigation-menu.blade.php +++ b/stubs/filament/resources/views/navigation-menu.blade.php @@ -15,21 +15,21 @@ - {{ __('Manage Company') }} + {{ __('filament-companies::default.navigation.headers.manage_company') }} - {{ __('Company Settings') }} + {{ __('filament-companies::default.navigation.links.company_settings') }} @can('create', Wallo\FilamentCompanies\FilamentCompanies::newCompanyModel()) - {{ __('New Company') }} + {{ __('filament-companies::default.navigation.links.new_company') }} @endcan @@ -38,7 +38,7 @@ - {{ __('Switch Companies') }} + {{ __('filament-companies::default.navigation.headers.switch_companies') }}
From a0f07d99be62f025eaadcd142f1e18336bcbe422 Mon Sep 17 00:00:00 2001 From: Andrew Wallo Date: Wed, 11 Jan 2023 07:23:19 -0500 Subject: [PATCH 2/4] - default language modified: lang/en/default.php modified: stubs/filament/resources/views/api/api-token-manager.blade.php modified: stubs/filament/resources/views/auth/confirm-password.blade.php modified: stubs/filament/resources/views/auth/forgot-password.blade.php modified: stubs/filament/resources/views/auth/login.blade.php modified: stubs/filament/resources/views/auth/register.blade.php modified: stubs/filament/resources/views/auth/reset-password.blade.php modified: stubs/filament/resources/views/auth/two-factor-challenge.blade.php modified: stubs/filament/resources/views/auth/verify-email.blade.php modified: stubs/filament/resources/views/companies/company-employee-manager.blade.php modified: stubs/filament/resources/views/companies/create-company-form.blade.php modified: stubs/filament/resources/views/companies/delete-company-form.blade.php modified: stubs/filament/resources/views/companies/update-company-name-form.blade.php modified: stubs/filament/resources/views/profile/delete-user-form.blade.php modified: stubs/filament/resources/views/profile/logout-other-browser-sessions-form.blade.php modified: stubs/filament/resources/views/profile/two-factor-authentication-form.blade.php modified: stubs/filament/resources/views/profile/update-password-form.blade.php modified: stubs/filament/resources/views/profile/update-profile-information-form.blade.php --- lang/en/default.php | 22 +++++--- .../views/api/api-token-manager.blade.php | 38 ++++++------- .../views/auth/confirm-password.blade.php | 6 +-- .../views/auth/forgot-password.blade.php | 8 +-- .../resources/views/auth/login.blade.php | 16 +++--- .../resources/views/auth/register.blade.php | 20 +++---- .../views/auth/reset-password.blade.php | 8 +-- .../views/auth/two-factor-challenge.blade.php | 14 ++--- .../views/auth/verify-email.blade.php | 10 ++-- .../company-employee-manager.blade.php | 54 +++++++++---------- .../companies/create-company-form.blade.php | 10 ++-- .../companies/delete-company-form.blade.php | 19 +++---- .../update-company-name-form.blade.php | 10 ++-- .../views/profile/delete-user-form.blade.php | 21 ++++---- ...gout-other-browser-sessions-form.blade.php | 31 +++++------ .../two-factor-authentication-form.blade.php | 37 ++++++------- .../profile/update-password-form.blade.php | 12 ++--- .../update-profile-information-form.blade.php | 22 ++++---- 18 files changed, 176 insertions(+), 182 deletions(-) diff --git a/lang/en/default.php b/lang/en/default.php index fea77b4..3eb1b2b 100644 --- a/lang/en/default.php +++ b/lang/en/default.php @@ -39,6 +39,7 @@ "leave" => "Leave", "remove" => "Remove", "delete_company" => "Delete Company", + "remember_me" => "Remember me", ], "labels" => [ @@ -51,6 +52,10 @@ "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" => [ @@ -96,13 +101,13 @@ ], "grid_section_descriptions" => [ - "profile_information" => "Update your account\'s profile information and email address.", + "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.", + "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.", ], @@ -128,15 +133,17 @@ "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.", + "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" => [ @@ -150,7 +157,7 @@ "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_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.", ], ], @@ -191,9 +198,9 @@ "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.", + "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.", ], @@ -203,6 +210,7 @@ "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." ], ], ]; diff --git a/stubs/filament/resources/views/api/api-token-manager.blade.php b/stubs/filament/resources/views/api/api-token-manager.blade.php index ce08f4b..92360c1 100644 --- a/stubs/filament/resources/views/api/api-token-manager.blade.php +++ b/stubs/filament/resources/views/api/api-token-manager.blade.php @@ -2,11 +2,11 @@ - {{ __('Create API Token') }} + {{ __('filament-companies::default.grid_section_titles.create_api_token') }} - {{ __('API tokens allow third-party services to authenticate with our application on your behalf.') }} + {{ __('filament-companies::default.grid_section_descriptions.create_api_token') }}
@@ -14,7 +14,7 @@
- + @@ -23,7 +23,7 @@ @if (Wallo\FilamentCompanies\FilamentCompanies::hasPermissions())
- +
@foreach (Wallo\FilamentCompanies\FilamentCompanies::$permissions as $permission) @@ -42,7 +42,7 @@
- {{ __('Create') }} + {{ __('filament-companies::default.buttons.create') }}
@@ -57,7 +57,7 @@

- {{ __('Manage API Tokens') }} + {{ __('filament-companies::default.headings.api.api_token_manager.manage_api_tokens') }}

@@ -71,18 +71,18 @@
@if ($token->last_used_at)
- {{ __('Last used') }} {{ $token->last_used_at->diffForHumans() }} + {{ __('filament-companies::default.labels.last_used') }} {{ $token->last_used_at->diffForHumans() }}
@endif @if (Wallo\FilamentCompanies\FilamentCompanies::hasPermissions()) @endif + tooltip="{{ __('filament-companies::default.buttons.delete') }}" wire:click="confirmApiTokenDeletion({{ $token->id }})" />
@endforeach @@ -94,12 +94,12 @@ - {{ __('API Token') }} + {{ __('filament-companies::default.modal_titles.api_token') }}
- {{ __('Please copy your new API token. For your security, it won\'t be shown again.') }} + {{ __('filament-companies::default.modal_descriptions.api_token') }}
- {{ __('Close') }} + {{ __('filament-companies::default.buttons.close') }}
@@ -120,7 +120,7 @@ class="mt-4 w-full rounded bg-gray-100 px-4 py-2 font-mono text-sm text-gray-500 - {{ __('API Token Permissions') }} + {{ __('filament-companies::default.modal_titles.api_token_permissions') }} @@ -138,12 +138,12 @@ class="flex items-center justify-center space-x-2 rtl:space-x-reverse"> - {{ __('Cancel') }} + {{ __('filament-companies::default.buttons.cancel') }} - {{ __('Save') }} + {{ __('filament-companies::default.buttons.save') }} @@ -152,22 +152,22 @@ class="flex items-center justify-center space-x-2 rtl:space-x-reverse"> - {{ __('Delete API Token') }} + {{ __('filament-companies::default.modal_titles.delete_api_token') }} - {{ __('Are you sure you would like to delete this API token?') }} + {{ __('filament-companies::default.modal_descriptions.delete_api_token') }} - {{ __('Cancel') }} + {{ __('filament-companies::default.buttons.cancel') }} - {{ __('Delete') }} + {{ __('filament-companies::default.buttons.delete') }} diff --git a/stubs/filament/resources/views/auth/confirm-password.blade.php b/stubs/filament/resources/views/auth/confirm-password.blade.php index b08fbda..3778761 100644 --- a/stubs/filament/resources/views/auth/confirm-password.blade.php +++ b/stubs/filament/resources/views/auth/confirm-password.blade.php @@ -1,7 +1,7 @@
- {{ __('This is a secure area of the application. Please confirm your password before continuing.') }} + {{ __('filament-companies::default.headings.auth.confirm_password') }}
@@ -10,13 +10,13 @@ @csrf
- +
- {{ __('Confirm') }} + {{ __('filament-companies::default.buttons.confirm') }}
diff --git a/stubs/filament/resources/views/auth/forgot-password.blade.php b/stubs/filament/resources/views/auth/forgot-password.blade.php index 69fd1ca..19abae6 100644 --- a/stubs/filament/resources/views/auth/forgot-password.blade.php +++ b/stubs/filament/resources/views/auth/forgot-password.blade.php @@ -1,11 +1,11 @@

- {{ __('Forgot your password?') }} + {{ __('filament-companies::default.headings.auth.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.') }} + {{ __('filament-companies::default.subheadings.auth.forgot_password') }}
@if (session('status')) @@ -20,13 +20,13 @@ @csrf
- +
- {{ __('Email Password Reset Link') }} + {{ __('filament-companies::default.buttons.email_password_reset_link') }}
diff --git a/stubs/filament/resources/views/auth/login.blade.php b/stubs/filament/resources/views/auth/login.blade.php index 9213db3..1f457a2 100644 --- a/stubs/filament/resources/views/auth/login.blade.php +++ b/stubs/filament/resources/views/auth/login.blade.php @@ -1,13 +1,13 @@

- {{ __('Login in to your account') }} + {{ __('filament-companies::default.headings.auth.login') }}

- {{__('Or') }} + {{__('filament-companies::default.subheadings.auth.login') }} - {{ __('Register an account')}} + {{ __('filament-companies::default.headings.auth.register')}}
@@ -24,31 +24,31 @@ @csrf
- +
- +
@if (Route::has('password.request')) - {{ __('Forgot your password?') }} + {{ __('filament-companies::default.links.forgot_your_password') }} @endif - {{ __('Log in') }} + {{ __('filament-companies::default.buttons.login') }}
diff --git a/stubs/filament/resources/views/auth/register.blade.php b/stubs/filament/resources/views/auth/register.blade.php index b2fd560..fce50b1 100644 --- a/stubs/filament/resources/views/auth/register.blade.php +++ b/stubs/filament/resources/views/auth/register.blade.php @@ -1,7 +1,7 @@

- {{ __('Register an account') }} + {{ __('filament-companies::default.headings.auth.register') }}

@@ -9,22 +9,22 @@ @csrf
- +
- +
- +
- +
@@ -35,9 +35,9 @@
- {!! __('I agree to the :terms_of_service and :privacy_policy', [ - 'terms_of_service' => ''.__('Terms of Service').'', - 'privacy_policy' => ''.__('Privacy Policy').'', + {!! __('filament-companies::default.subheadings.auth.register', [ + 'terms_of_service' => ''.__('filament-companies::default.links.terms_of_service').'', + 'privacy_policy' => ''.__('filament-companies::default.links.privacy_policy').'', ]) !!}
@@ -47,11 +47,11 @@
- {{ __('Already registered?') }} + {{ __('filament-companies::default.links.already_registered') }} - {{ __('Register') }} + {{ __('filament-companies::default.buttons.register') }}
diff --git a/stubs/filament/resources/views/auth/reset-password.blade.php b/stubs/filament/resources/views/auth/reset-password.blade.php index 0bbf967..324d758 100644 --- a/stubs/filament/resources/views/auth/reset-password.blade.php +++ b/stubs/filament/resources/views/auth/reset-password.blade.php @@ -8,23 +8,23 @@
- +
- +
- +
- {{ __('Reset Password') }} + {{ __('filament-companies::default.buttons.reset_password') }}
diff --git a/stubs/filament/resources/views/auth/two-factor-challenge.blade.php b/stubs/filament/resources/views/auth/two-factor-challenge.blade.php index 17e63d9..7cab141 100644 --- a/stubs/filament/resources/views/auth/two-factor-challenge.blade.php +++ b/stubs/filament/resources/views/auth/two-factor-challenge.blade.php @@ -2,11 +2,11 @@
- {{ __('Please confirm access to your account by entering the authentication code provided by your authenticator application.') }} + {{ __('filament-companies::default.headings.auth.two_factor_challenge.authentication_code') }}
- {{ __('Please confirm access to your account by entering one of your emergency recovery codes.') }} + {{ __('filament-companies::default.headings.auth.two_factor_challenge.emergency_recovery_code') }}
@@ -15,12 +15,12 @@ @csrf
- +
- +
@@ -31,7 +31,7 @@ recovery = true; $nextTick(() => { $refs.recovery_code.focus() }) "> - {{ __('Use a recovery code') }} + {{ __('filament-companies::default.buttons.use_recovery_code') }} - {{ __('Log in') }} + {{ __('filament-companies::default.buttons.login') }}
diff --git a/stubs/filament/resources/views/auth/verify-email.blade.php b/stubs/filament/resources/views/auth/verify-email.blade.php index 84d770a..c36743b 100644 --- a/stubs/filament/resources/views/auth/verify-email.blade.php +++ b/stubs/filament/resources/views/auth/verify-email.blade.php @@ -1,12 +1,12 @@
- {{ __('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.') }} + {{ __('filament-companies::default.headings.auth.verify_email.verification_link_not_sent') }}
@if (session('status') == 'verification-link-sent')
- {{ __('A new verification link has been sent to the email address you provided in your profile settings.') }} + {{ __('filament-companies::default.headings.auth.verify_email.verification_link_sent') }}
@endif @@ -16,7 +16,7 @@
- {{ __('Resend Verification Email') }} + {{ __('filament-companies::default.buttons.resend_verification_email') }}
@@ -26,13 +26,13 @@ href="{{ route('filament.pages.profile') }}" class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900" > - {{ __('Edit Profile') }} + {{ __('filament-companies::default.links.edit_profile') }}
@csrf
diff --git a/stubs/filament/resources/views/companies/company-employee-manager.blade.php b/stubs/filament/resources/views/companies/company-employee-manager.blade.php index 24cd658..25d1982 100644 --- a/stubs/filament/resources/views/companies/company-employee-manager.blade.php +++ b/stubs/filament/resources/views/companies/company-employee-manager.blade.php @@ -5,25 +5,24 @@
- {{ __('Add Company Employee') }} + {{ __('filament-companies::default.grid_section_titles.add_company_employee') }} - {{ __('Add a new company employee to your company, allowing them to collaborate with you.') }} + {{ __('filament-companies::default.grid_section_descriptions.add_company_employee') }}

- {{ __('Please provide the email address of the person you would like to add to this - company.') }} + {{ __('filament-companies::default.subheadings.companies.company_employee_manager') }}

- + @@ -32,7 +31,7 @@ @if (count($this->roles) > 0)
- +
- {{ __('Add') }} + {{ __('filament-companies::default.buttons.add') }}
@@ -91,18 +90,17 @@ class="{{ $addCompanyEmployeeForm['role'] == $role->key ? 'font-semibold' : '' }
- {{ __('Pending Company Invitations') }} + {{ __('filament-companies::default.action_section_titles.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.') }} + {{ __('filament-companies::default.action_section_descriptions.pending_company_invitations') }}

- {{ __('Pending Invitations') }} + {{ __('filament-companies::default.headings.companies.company_employee_manager.pending_invitations') }}

@foreach ($company->companyInvitations as $invitation) @@ -114,7 +112,7 @@ class="{{ $addCompanyEmployeeForm['role'] == $role->key ? 'font-semibold' : '' } @if (Gate::check('removeCompanyEmployee', $company)) @endif
@@ -134,18 +132,18 @@ class="{{ $addCompanyEmployeeForm['role'] == $role->key ? 'font-semibold' : '' }
- {{ __('Company Employees') }} + {{ __('filament-companies::default.action_section_titles.company_employees') }} - {{ __('All of the people that are part of this company.') }} + {{ __('filament-companies::default.action_section_descriptions.company_employees') }}

- {{ __('Manage Employees') }} + {{ __('filament-companies::default.headings.companies.company_employee_manager.manage_employees') }}

@foreach ($company->users->sortBy('name') as $user) @@ -174,14 +172,14 @@ class="{{ $addCompanyEmployeeForm['role'] == $role->key ? 'font-semibold' : '' } @if ($this->user->id === $user->id) - {{ __('Leave') }} + {{ __('filament-companies::default.buttons.leave') }} @elseif (Gate::check('removeCompanyEmployee', $company)) - {{ __('Remove') }} + {{ __('filament-companies::default.buttons.remove') }} @endif
@@ -197,7 +195,7 @@ class="{{ $addCompanyEmployeeForm['role'] == $role->key ? 'font-semibold' : '' } - {{ __('Manage Role') }} + {{ __('filament-companies::default.modal_titles.manage_role') }} @@ -236,11 +234,11 @@ class="{{ $currentRole == $role->key ? 'font-semibold' : '' }} text-sm text-gray - {{ __('Cancel') }} + {{ __('filament-companies::default.buttons.cancel') }} - {{ __('Save') }} + {{ __('filament-companies::default.buttons.save') }} @@ -248,20 +246,20 @@ class="{{ $currentRole == $role->key ? 'font-semibold' : '' }} text-sm text-gray - {{ __('Leave Company') }} + {{ __('filament-companies::default.modal_titles.leave_company') }} - {{ __('Are you sure you would like to leave this company?') }} + {{ __('filament-companies::default.modal_descriptions.leave_company') }} - {{ __('Cancel') }} + {{ __('filament-companies::default.buttons.cancel') }} - {{ __('Leave') }} + {{ __('filament-companies::default.buttons.leave') }} @@ -269,20 +267,20 @@ class="{{ $currentRole == $role->key ? 'font-semibold' : '' }} text-sm text-gray - {{ __('Remove Company Employee') }} + {{ __('filament-companies::default.modal_titles.remove_company_employee') }} - {{ __('Are you sure you would like to remove this person from the company?') }} + {{ __('filament-companies::default.modal_descriptions.remove_company_employee') }} - {{ __('Cancel') }} + {{ __('filament-companies::default.buttons.cancel') }} - {{ __('Remove') }} + {{ __('filament-companies::default.buttons.remove') }} diff --git a/stubs/filament/resources/views/companies/create-company-form.blade.php b/stubs/filament/resources/views/companies/create-company-form.blade.php index fde1f27..51b6401 100644 --- a/stubs/filament/resources/views/companies/create-company-form.blade.php +++ b/stubs/filament/resources/views/companies/create-company-form.blade.php @@ -1,16 +1,16 @@ - {{ __('Create Company') }} + {{ __('filament-companies::default.grid_section_titles.create_company') }} - {{ __('Create a new company to collaborate with others on projects.') }} + {{ __('filament-companies::default.grid_section_descriptions.create_company') }}
- +
- + @@ -33,7 +33,7 @@
- {{ __('Create') }} + {{ __('filament-companies::default.buttons.create') }}
diff --git a/stubs/filament/resources/views/companies/delete-company-form.blade.php b/stubs/filament/resources/views/companies/delete-company-form.blade.php index bb879ff..bb449cc 100644 --- a/stubs/filament/resources/views/companies/delete-company-form.blade.php +++ b/stubs/filament/resources/views/companies/delete-company-form.blade.php @@ -1,24 +1,22 @@ - {{ __('Delete Company') }} + {{ __('filament-companies::default.action_section_titles.delete_company') }} - {{ __('Permanently delete this company.') }} + {{ __('filament-companies::default.action_section_descriptions.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.') }} + {{ __('filament-companies::default.subheadings.companies.delete_company') }}
- {{ __('Delete Company') }} + {{ __('filament-companies::default.buttons.delete_company') }}
@@ -26,23 +24,22 @@ - {{ __('Delete Company') }} + {{ __('filament-companies::default.modal_titles.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.') }} + {{ __('filament-companies::default.modal_descriptions.delete_company') }} - {{ __('Cancel') }} + {{ __('filament-companies::default.buttons.cancel') }} - {{ __('Delete Company') }} + {{ __('filament-companies::default.buttons.delete_company') }} diff --git a/stubs/filament/resources/views/companies/update-company-name-form.blade.php b/stubs/filament/resources/views/companies/update-company-name-form.blade.php index dd160d8..cfa93aa 100644 --- a/stubs/filament/resources/views/companies/update-company-name-form.blade.php +++ b/stubs/filament/resources/views/companies/update-company-name-form.blade.php @@ -1,17 +1,17 @@ - {{ __('Company Name') }} + {{ __('filament-companies::default.grid_section_titles.company_name') }} - {{ __('The company\'s name and owner information.') }} + {{ __('filament-companies::default.grid_section_descriptions.company_name') }}
- +
- + @@ -38,7 +38,7 @@
- {{ __('Save') }} + {{ __('filament-companies::default.buttons.save') }}
diff --git a/stubs/filament/resources/views/profile/delete-user-form.blade.php b/stubs/filament/resources/views/profile/delete-user-form.blade.php index e2de150..e52fd87 100644 --- a/stubs/filament/resources/views/profile/delete-user-form.blade.php +++ b/stubs/filament/resources/views/profile/delete-user-form.blade.php @@ -1,24 +1,23 @@ - {{ __('Delete Account') }} + {{ __('filament-companies::default.grid_section_titles.delete_account') }} - {{ __('Permanently delete your account.') }} + {{ __('filament-companies::default.grid_section_descriptions.delete_account') }}
- {{ __('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.') }} + {{ __('filament-companies::default.subheadings.profile.delete_user') }}
- {{ __('Delete Account') }} + {{ __('filament-companies::default.buttons.delete_account') }}
@@ -27,18 +26,16 @@ - {{ __('Delete Account') }} + {{ __('filament-companies::default.modal_titles.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.') }} + {{ __('filament-companies::default.modal_descriptions.delete_account') }}
@@ -48,11 +45,11 @@ class="flex items-center justify-center space-x-2 rtl:space-x-reverse"> - {{ __('Cancel') }} + {{ __('filament-companies::default.buttons.cancel') }} - {{ __('Delete Account') }} + {{ __('filament-companies::default.buttons.delete_account') }} diff --git a/stubs/filament/resources/views/profile/logout-other-browser-sessions-form.blade.php b/stubs/filament/resources/views/profile/logout-other-browser-sessions-form.blade.php index 55cc6df..7ab42d0 100644 --- a/stubs/filament/resources/views/profile/logout-other-browser-sessions-form.blade.php +++ b/stubs/filament/resources/views/profile/logout-other-browser-sessions-form.blade.php @@ -1,19 +1,17 @@ - {{ __('Browser Sessions') }} + {{ __('filament-companies::default.grid_section_titles.browser_sessions') }} - {{ __('Manage and log out your active sessions on other browsers and devices.') }} + {{ __('filament-companies::default.grid_section_descriptions.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.') }} + {{ __('filament-companies::default.subheadings.profile.logout_other_browser_sessions') }}
@if (count($this->sessions) > 0) @@ -44,8 +42,8 @@ class="h-8 w-8 text-gray-500">
- {{ $session->agent->platform() ? $session->agent->platform() : 'Unknown' }} - - {{ $session->agent->browser() ? $session->agent->browser() : 'Unknown' }} + {{ $session->agent->platform() ? $session->agent->platform() : 'filament-companies::default.labels.unknown' }} - + {{ $session->agent->browser() ? $session->agent->browser() : 'filament-companies::default.labels.unknown' }}
@@ -53,9 +51,9 @@ class="h-8 w-8 text-gray-500"> {{ $session->ip_address }}, @if ($session->is_current_device) - {{ __('This device') }} + {{ __('filament-companies::default.labels.this_device') }} @else - {{ __('Last active') }} {{ $session->last_active }} + {{ __('filament-companies::default.labels.last_active') }} {{ $session->last_active }} @endif
@@ -68,11 +66,11 @@ class="h-8 w-8 text-gray-500">
- {{ __('Log Out Other Browser Sessions') }} + {{ __('filament-companies::default.buttons.logout_browser_sessions') }} - {{ __('Done.') }} + {{ __('filament-companies::default.buttons.done') }}
@@ -81,17 +79,16 @@ class="h-8 w-8 text-gray-500"> - {{ __('Log Out Other Browser Sessions') }} + {{ __('filament-companies::default.modal_titles.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.') }} + {{ __('filament-companies::default.modal_descriptions.logout_browser_sessions') }}
@@ -101,11 +98,11 @@ class="flex items-center justify-center space-x-2 rtl:space-x-reverse"> - {{ __('Cancel') }} + {{ __('filament-companies::default.buttons.cancel') }} - {{ __('Log Out Other Browser Sessions') }} + {{ __('filament-companies::default.buttons.logout_browser_sessions') }} diff --git a/stubs/filament/resources/views/profile/two-factor-authentication-form.blade.php b/stubs/filament/resources/views/profile/two-factor-authentication-form.blade.php index 84f5d9f..f77d8b3 100644 --- a/stubs/filament/resources/views/profile/two-factor-authentication-form.blade.php +++ b/stubs/filament/resources/views/profile/two-factor-authentication-form.blade.php @@ -1,28 +1,27 @@ - {{ __('Two Factor Authentication') }} + {{ __('filament-companies::default.grid_section_titles.two_factor_authentication') }} - {{ __('Add additional security to your account using two factor authentication.') }} + {{ __('filament-companies::default.grid_section_descriptions.two_factor_authentication') }}

@if ($this->enabled) @if ($showingConfirmation) - {{ __('Finish enabling two factor authentication.') }} + {{ __('filament-companies::default.headings.profile.two_factor_authentication.finish_enabling') }} @else - {{ __('You have enabled two factor authentication!') }} + {{ __('filament-companies::default.headings.profile.two_factor_authentication.enabled') }} @endif @else - {{ __('You have not enabled two factor authentication.') }} + {{ __('filament-companies::default.headings.profile.two_factor_authentication.not_enabled') }} @endif

- {{ __('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.') }} + {{ __('filament-companies::default.subheadings.profile.two_factor_authentication.summary') }}
@if ($this->enabled) @@ -30,11 +29,9 @@

@if ($showingConfirmation) - {{ __('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.') }} + {{ __('filament-companies::default.subheadings.profile.two_factor_authentication.finish_enabling') }} @else - {{ __('Two factor authentication is now enabled. Scan the following QR code using your phone\'s authenticator - application or enter the setup key.') }} + {{ __('filament-companies::default.subheadings.profile.two_factor_authentication.enabled') }} @endif

@@ -45,13 +42,13 @@

- {{ __('Setup Key') }}: {{ decrypt($this->user->two_factor_secret) }} + {{ __('filament-companies::default.labels.setup_key') }}: {{ decrypt($this->user->two_factor_secret) }}

@if ($showingConfirmation)
- +

- {{ __('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.') }} + {{ __('filament-companies::default.subheadings.profile.two_factor_authentication.store_codes') }}

@@ -83,26 +80,26 @@ class="mt-4 grid max-w-xl gap-1 rounded-lg bg-gray-100 px-4 py-4 font-mono text- @if (!$this->enabled) - {{ __('Enable') }} + {{ __('filament-companies::default.buttons.enable') }} @else @if ($showingRecoveryCodes) - {{ __('Regenerate Recovery Codes') }} + {{ __('filament-companies::default.buttons.regenerate_recovery_codes') }} @elseif ($showingConfirmation) - {{ __('Confirm') }} + {{ __('filament-companies::default.buttons.confirm') }} @else - {{ __('Show Recovery Codes') }} + {{ __('filament-companies::default.buttons.show_recovery_codes') }} @endif @@ -110,13 +107,13 @@ class="mt-4 grid max-w-xl gap-1 rounded-lg bg-gray-100 px-4 py-4 font-mono text- @if ($showingConfirmation) - {{ __('Cancel') }} + {{ __('filament-companies::default.buttons.cancel') }} @else - {{ __('Disable') }} + {{ __('filament-companies::default.buttons.disable') }} @endif diff --git a/stubs/filament/resources/views/profile/update-password-form.blade.php b/stubs/filament/resources/views/profile/update-password-form.blade.php index a2f48f4..fd38b2f 100644 --- a/stubs/filament/resources/views/profile/update-password-form.blade.php +++ b/stubs/filament/resources/views/profile/update-password-form.blade.php @@ -1,30 +1,30 @@ - {{ __('Update Password') }} + {{ __('filament-companies::default.grid_section_titles.update_password') }} - {{ __('Ensure your account is using a long, random password to stay secure.') }} + {{ __('filament-companies::default.grid_section_descriptions.update_password') }}
- +
- +
- + @@ -33,7 +33,7 @@
- {{ __('Save') }} + {{ __('filament-companies::default.buttons.save') }}
diff --git a/stubs/filament/resources/views/profile/update-profile-information-form.blade.php b/stubs/filament/resources/views/profile/update-profile-information-form.blade.php index 09827a4..565b7d5 100644 --- a/stubs/filament/resources/views/profile/update-profile-information-form.blade.php +++ b/stubs/filament/resources/views/profile/update-profile-information-form.blade.php @@ -1,10 +1,10 @@ - {{ __('Profile Information') }} + {{ __('filament-companies::default.grid_section_titles.profile_information') }} - {{ __('Update your account\'s profile information and email address.') }} + {{ __('filament-companies::default.grid_section_descriptions.profile_information') }} @@ -23,7 +23,7 @@ reader.readAsDataURL($refs.photo.files[0]); " /> - +
@@ -40,12 +40,12 @@ class="h-20 w-20 rounded-full object-cover">
- {{ __('Select A New Photo') }} + {{ __('filament-companies::default.buttons.new_photo') }} @if ($this->user->profile_photo_path) - {{ __('Remove Photo') }} + {{ __('filament-companies::default.buttons.remove_photo') }} @endif @@ -56,7 +56,7 @@ class="h-20 w-20 rounded-full object-cover">
- + @@ -64,7 +64,7 @@ class="h-20 w-20 rounded-full object-cover">
- + @@ -72,19 +72,19 @@ class="h-20 w-20 rounded-full object-cover"> @if (Laravel\Fortify\Features::enabled(Laravel\Fortify\Features::emailVerification()) && !$this->user - hasVerifiedEmail())

- {{ __('Before your email can be updated, you must verify your current email address.') }} + {{ __('filament-companies::default.headings.profile.update_profile_information.verification_link_not_sent') }} - {{ __('Resend Verification Email') }} + {{ __('filament-companies::default.buttons.resend_verification_email') }}

@if ($this->verificationLinkSent)

- {{ __('A new verification link has been sent to your email address.') }} + {{ __('filament-companies::default.headings.profile.update_profile_information.verification_link_sent') }}

@endif @endif @@ -93,7 +93,7 @@ class="mt-2 text-sm font-medium text-green-600 dark:text-green-400">
- {{ __('Save') }} + {{ __('filament-companies::default.buttons.save') }}
From 36154dc168a9d67a3215244483cc577bc5a59eeb Mon Sep 17 00:00:00 2001 From: Andrew Wallo Date: Wed, 11 Jan 2023 07:38:31 -0500 Subject: [PATCH 3/4] - added default language modified: lang/en/default.php --- lang/en/default.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lang/en/default.php b/lang/en/default.php index 3eb1b2b..3e03955 100644 --- a/lang/en/default.php +++ b/lang/en/default.php @@ -85,6 +85,7 @@ "create_company" => "Create Company", "company_settings" => "Company Settings", "api_tokens" => "API Tokens", + "profile" => "Profile", ], ], From eb96f9d2e2200608cfed55a0e15632a154b5debe Mon Sep 17 00:00:00 2001 From: Andrew Wallo Date: Wed, 11 Jan 2023 07:41:38 -0500 Subject: [PATCH 4/4] -modify page titles for language modified: stubs/app/Filament/Pages/Companies/Create.php modified: stubs/app/Filament/Pages/Companies/Show.php modified: stubs/app/Filament/Pages/User/ApiTokens.php modified: stubs/app/Filament/Pages/User/Profile.php --- stubs/app/Filament/Pages/Companies/Create.php | 7 +++++-- stubs/app/Filament/Pages/Companies/Show.php | 7 +++++-- stubs/app/Filament/Pages/User/ApiTokens.php | 7 +++++-- stubs/app/Filament/Pages/User/Profile.php | 5 +++++ 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/stubs/app/Filament/Pages/Companies/Create.php b/stubs/app/Filament/Pages/Companies/Create.php index b394ac4..08477d1 100644 --- a/stubs/app/Filament/Pages/Companies/Create.php +++ b/stubs/app/Filament/Pages/Companies/Create.php @@ -6,8 +6,6 @@ class Create extends Page { - protected static ?string $title = 'Create Company'; - protected static ?string $slug = 'create'; protected static ?string $navigationIcon = 'heroicon-o-document-text'; @@ -15,4 +13,9 @@ class Create extends Page 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'); + } } diff --git a/stubs/app/Filament/Pages/Companies/Show.php b/stubs/app/Filament/Pages/Companies/Show.php index 16e5a4a..d7537d7 100644 --- a/stubs/app/Filament/Pages/Companies/Show.php +++ b/stubs/app/Filament/Pages/Companies/Show.php @@ -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'; @@ -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 [ diff --git a/stubs/app/Filament/Pages/User/ApiTokens.php b/stubs/app/Filament/Pages/User/ApiTokens.php index 55099d9..43370ea 100644 --- a/stubs/app/Filament/Pages/User/ApiTokens.php +++ b/stubs/app/Filament/Pages/User/ApiTokens.php @@ -6,8 +6,6 @@ class ApiTokens extends Page { - protected static ?string $title = 'API Tokens'; - protected static ?string $slug = 'api-tokens'; protected static ?string $navigationIcon = 'heroicon-o-document-text'; @@ -15,4 +13,9 @@ class ApiTokens extends Page 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'); + } } diff --git a/stubs/app/Filament/Pages/User/Profile.php b/stubs/app/Filament/Pages/User/Profile.php index bad6212..08c7886 100644 --- a/stubs/app/Filament/Pages/User/Profile.php +++ b/stubs/app/Filament/Pages/User/Profile.php @@ -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'); + } }