upgrade of __t function, add save default_language to cache

This commit is contained in:
Milos Holba
2021-03-22 20:27:47 +01:00
parent 5910bb1206
commit df5d5cb75f
17 changed files with 351 additions and 122 deletions
@@ -121,7 +121,6 @@ class LanguageController extends Controller
'value' => $request->value
]);
Cache::forget('language_strings-' . $language->locale);
return response('Done', 204);
+35 -4
View File
@@ -805,9 +805,18 @@ function set_time_by_user_timezone($time)
}
function _t($key)
function __t($key, $values = null)
{
$locale = get_setting('language');
// Check if is in cache save default_language
if (Cache::has('default_language')) {
$locale = Cache::get('default_language');
} else {
$locale = Cache::rememberForever('default_language', function () {
return get_setting('language');
});
}
// Check if cash has string
if (Cache::has('language_strings-' . $locale)) {
@@ -816,11 +825,33 @@ function _t($key)
->languageStrings;
// Find the string by key
return $strings->firstWhere('key', $key)->value;
$string = $strings->firstWhere('key', $key)->value;
}
// If cash dont have string return string from database
return LanguageString::whereLangAndKey($locale, $key)
$string = LanguageString::whereLangAndKey($locale, $key)
->first()
->value;
if($values) {
return adjust_value($string, $values);
}
return $string;
}
function adjust_value($string, $values)
{
$search = [];
$replace = [];
if($values) {
foreach($values as $key => $variable) {
array_push($search, ':' . $key);
array_push($replace, $variable);
}
}
return str_ireplace($search, $replace, $string);
}
+12
View File
@@ -2,6 +2,7 @@
namespace App;
use Illuminate\Support\Facades\Cache;
use Illuminate\Database\Eloquent\Model;
/**
@@ -23,4 +24,15 @@ class Setting extends Model
public $timestamps = false;
protected $guarded = ['id'];
protected static function boot()
{
parent::boot();
static::updated(function($setting) {
if($setting->name === 'language') {
Cache::forget('default_language');
}
});
}
}
+89 -25
View File
@@ -315,9 +315,9 @@ return [
"page_contact_us.title" => "Contact Us",
"page_create_password.button_update" => "Update Password",
"page_create_password.label_confirm_pass" => "Confirm password",
"page_create_password.label_email" => "Email:",
"page_create_password.label_email" => "Email",
"page_create_password.label_new_pass" => "New password",
"page_create_password.subtitle" => "Create your new password here:",
"page_create_password.subtitle" => "Create your new password here",
"page_create_password.title" => "Only One Step to Log In",
"page_forgotten_password.button_get_link" => "Get Link",
"page_forgotten_password.pass_reseted_signin" => "Sign In",
@@ -327,7 +327,7 @@ return [
"page_forgotten_password.pass_sennded_title" => "Thank you!",
"page_forgotten_password.password_remember_button" => "Log In.",
"page_forgotten_password.password_remember_text" => "Remember your password?",
"page_forgotten_password.subtitle" => "Get reset link with your email:",
"page_forgotten_password.subtitle" => "Get reset link with your email",
"page_forgotten_password.title" => "Forgotten Password?",
"page_index.get_started_button" => "Sign Up Now",
"page_index.menu.contact_us" => "Contact Us",
@@ -341,7 +341,7 @@ return [
"page_login.placeholder_email" => "Type your E-mail",
"page_login.registration_button" => "Register account.",
"page_login.registration_text" => "Dont have an account?",
"page_login.subtitle" => "Please type your email to log in:",
"page_login.subtitle" => "Please type your email to log in",
"page_login.title" => "Welcome Back!",
"page_pricing_tables.description" => "Choose plan witch perfect fit your needs. All plans is billed monthly automatically via your credit card.",
"page_pricing_tables.storage_capacity" => "Of Storage Capacity",
@@ -350,20 +350,20 @@ return [
"page_registration.agreement" => "By clicking on 'Create Account' button I agree to the {0} and {1}.",
"page_registration.button_create_account" => "Create Account",
"page_registration.have_an_account" => "Do you have an account?",
"page_registration.label_confirm_pass" => "Confirm password:",
"page_registration.label_email" => "Email:",
"page_registration.label_name" => "Full Name:",
"page_registration.label_pass" => "Create password:",
"page_registration.label_confirm_pass" => "Confirm password",
"page_registration.label_email" => "Email",
"page_registration.label_name" => "Full Name",
"page_registration.label_pass" => "Create password",
"page_registration.placeholder_confirm_pass" => "Confirm your new password",
"page_registration.placeholder_email" => "Type your E-mail",
"page_registration.placeholder_name" => "Type your full name",
"page_registration.placeholder_pass" => "New password",
"page_registration.subtitle" => "Please fill registration to create account:",
"page_registration.subtitle" => "Please fill registration to create account",
"page_registration.title" => "Create New Account",
"page_shared.download_file" => "Download File",
"page_shared.placeholder_pass" => "Type password",
"page_shared.submit" => "Submit",
"page_shared.subtitle" => "Please type the password to get shared content:",
"page_shared.subtitle" => "Please type the password to get shared content",
"page_shared.title" => "Your Share Link is Protected",
"page_shared_404.subtitle" => "The content you are finding was probably deleted.",
"page_shared_404.title" => "Not Found :(",
@@ -371,7 +371,7 @@ return [
"page_sign_in.password_reset_button" => "Reset Password.",
"page_sign_in.password_reset_text" => "Forgotten your password?",
"page_sign_in.placeholder_password" => "Type your password",
"page_sign_in.subtitle" => "Confirm you by your password:",
"page_sign_in.subtitle" => "Confirm you by your password",
"page_sign_in.title" => "Are You {name}?",
"page_upgrade_account.change_payment.change_payment" => "change your default payment method",
"page_upgrade_account.change_payment.pay_by_new_card" => "pay by new credit card",
@@ -415,7 +415,7 @@ return [
"popup_paylod_error.message" => "Sorry, your file is too large and can't be uploaded",
"popup_paylod_error.title" => "File is too large",
"popup_rename.select_emoji_label" => "Pick Your Emoji Icon",
"popup_rename.color_pick_label" => "Pick Your Color:",
"popup_rename.color_pick_label" => "Pick Your Color",
"popup_rename.emoji_list_not_found" => "Not Found",
"popup_rename.label" => "Edit Name",
"popup_rename.placeholder" => "Type your title",
@@ -903,9 +903,9 @@ return [
"page_contact_us.title" => "Contact Us",
"page_create_password.button_update" => "Update Password",
"page_create_password.label_confirm_pass" => "Confirm password",
"page_create_password.label_email" => "Email:",
"page_create_password.label_email" => "Email",
"page_create_password.label_new_pass" => "New password",
"page_create_password.subtitle" => "Create your new password here:",
"page_create_password.subtitle" => "Create your new password here",
"page_create_password.title" => "Only One Step to Log In",
"page_forgotten_password.button_get_link" => "Get Link",
"page_forgotten_password.pass_reseted_signin" => "Sign In",
@@ -915,7 +915,7 @@ return [
"page_forgotten_password.pass_sennded_title" => "Thank you!",
"page_forgotten_password.password_remember_button" => "Log In.",
"page_forgotten_password.password_remember_text" => "Remember your password?",
"page_forgotten_password.subtitle" => "Get reset link with your email:",
"page_forgotten_password.subtitle" => "Get reset link with your email",
"page_forgotten_password.title" => "Forgotten Password?",
"page_index.get_started_button" => "Sign Up Now",
"page_index.menu.contact_us" => "Contact Us",
@@ -929,7 +929,7 @@ return [
"page_login.placeholder_email" => "Type your E-mail",
"page_login.registration_button" => "Register account.",
"page_login.registration_text" => "Dont have an account?",
"page_login.subtitle" => "Please type your email to log in:",
"page_login.subtitle" => "Please type your email to log in",
"page_login.title" => "Welcome Back!",
"page_pricing_tables.description" => "Choose plan witch perfect fit your needs. All plans is billed monthly automatically via your credit card.",
"page_pricing_tables.storage_capacity" => "Of Storage Capacity",
@@ -938,20 +938,20 @@ return [
"page_registration.agreement" => "By clicking on 'Create Account' button I agree to the {0} and {1}.",
"page_registration.button_create_account" => "Create Account",
"page_registration.have_an_account" => "Do you have an account?",
"page_registration.label_confirm_pass" => "Confirm password:",
"page_registration.label_email" => "Email:",
"page_registration.label_name" => "Full Name:",
"page_registration.label_pass" => "Create password:",
"page_registration.label_confirm_pass" => "Confirm password",
"page_registration.label_email" => "Email",
"page_registration.label_name" => "Full Name",
"page_registration.label_pass" => "Create password",
"page_registration.placeholder_confirm_pass" => "Confirm your new password",
"page_registration.placeholder_email" => "Type your E-mail",
"page_registration.placeholder_name" => "Type your full name",
"page_registration.placeholder_pass" => "New password",
"page_registration.subtitle" => "Please fill registration to create account:",
"page_registration.subtitle" => "Please fill registration to create account",
"page_registration.title" => "Create New Account",
"page_shared.download_file" => "Download File",
"page_shared.placeholder_pass" => "Type password",
"page_shared.submit" => "Submit",
"page_shared.subtitle" => "Please type the password to get shared content:",
"page_shared.subtitle" => "Please type the password to get shared content",
"page_shared.title" => "Your Share Link is Protected",
"page_shared_404.subtitle" => "The content you are finding was probably deleted.",
"page_shared_404.title" => "Not Found :(",
@@ -959,7 +959,7 @@ return [
"page_sign_in.password_reset_button" => "Reset Password.",
"page_sign_in.password_reset_text" => "Forgotten your password?",
"page_sign_in.placeholder_password" => "Type your password",
"page_sign_in.subtitle" => "Confirm you by your password:",
"page_sign_in.subtitle" => "Confirm you by your password",
"page_sign_in.title" => "Are You {name}?",
"popup_create_folder.folder_default_name" => "New Folder",
"popup_create_folder.label" => "Type Name",
@@ -989,7 +989,7 @@ return [
"popup_paylod_error.message" => "Sorry, your file is too large and can't be uploaded",
"popup_paylod_error.title" => "File is too large",
"popup_rename.select_emoji_label" => "Pick Your Emoji Icon",
"popup_rename.color_pick_label" => "Pick Your Color:",
"popup_rename.color_pick_label" => "Pick Your Color",
"popup_rename.emoji_list_not_found" => "Not Found",
"popup_rename.label" => "Edit Name",
"popup_rename.placeholder" => "Type your title",
@@ -1151,6 +1151,70 @@ return [
"user_subscription.status" => "Status",
"user_subscription.title" => "Subscription Plan",
"validation_errors.incorrect_password" => "Sorry, you passed incorrect password :(",
"validation_errors.wrong_image" => "You may have uploaded the wrong file, try again!"
"validation_errors.wrong_image" => "You may have uploaded the wrong file, try again!",
// Laravel
'app_description' => 'Your self-hosted storage cloud software powered by Laravel and Vue',
'user_not_fount' => 'We can\'t find a user with that e-mail address.',
'incorrect_password' => 'Sorry, your password is incorrect.',
'time' => '%d. %B. %Y at %H:%M',
'home' => 'Home',
//Shared link email message
'shared_link_email_subject' => '🙋 :user share some files with you. Look at it!',
'shared_link_email_greeting' => 'Hello!',
'shared_link_email_user' => ':user (:email) send you a link to shared files.',
'shared_link_email_link' => 'Open your files',
'shared_link_email_salutation' => 'Regards, :app_name',
// Reset password email
'reset_password_greeting' => 'Hello!',
'reset_password_subject' => 'Reset password for your account on ',
'reset_password_line_1' => 'You are receiving this email because we received a password reset request for your account.',
'reset_password_line_2' => 'If you did not request a password reset, no further action is required.',
'reset_password_action' => 'Reset Password',
'salutation' => 'Regards',
// Invoice
'print_button' => 'Print Document',
'vat' => 'VAT',
'vat_included' => 'incl.',
'subtotal' => 'Subtotal',
'tax_exempted' => 'Tax is exempted',
'tax_be_paid_reverse' => 'Tax to be paid on reverse charge basis',
'invoice_title' => 'Invoice',
'date' => 'Date',
'product' => 'Product',
'subscription' => 'Subscription',
'invoice_number' => 'Invoice Number',
'seller' => 'Seller',
'client' => 'Client',
'seller_vat' => 'VAT number',
'seller_name' => 'Name',
'seller_phone' => 'Phone',
'name' => 'Name',
'phone' => 'Phone',
'address' => 'Address',
'city' => 'City',
'state' => 'State',
'postal_code' => 'Postal code',
'country' => 'Country',
'col_description' => 'Description',
'col_date' => 'Date',
'col_amount' => 'Amount',
'total' => 'Total',
// OG Page
'user_sending' => ':name is sending you this file',
'protected_file' => 'This link is protected by password',
]
];
+86 -10
View File
@@ -13,7 +13,7 @@
"/chunks/app-billings.js": "/chunks/app-billings.js?id=aac5bd51067578358164",
"/chunks/app-email.js": "/chunks/app-email.js?id=9d1631b19f6492b8cae4",
"/chunks/app-index.js": "/chunks/app-index.js?id=2dcbe307133d780b6472",
"/chunks/app-language.js": "/chunks/app-language.js?id=62fc50db4f9950730323",
"/chunks/app-language.js": "/chunks/app-language.js?id=bb4fa6e0ca895d1d9fcb",
"/chunks/app-others.js": "/chunks/app-others.js?id=44efcfb317747ff3b508",
"/chunks/app-payments.js": "/chunks/app-payments.js?id=187ecc16f9f7fbc4ccac",
"/chunks/app-settings.js": "/chunks/app-settings.js?id=b6b0eba13665133c0a19",
@@ -22,7 +22,7 @@
"/chunks/billings-detail.js": "/chunks/billings-detail.js?id=58b28aa55eff9f41d0db",
"/chunks/contact-us.js": "/chunks/contact-us.js?id=cc28795de7e668d5919b",
"/chunks/contact-us~chunks/dynamic-page~chunks/landing-page.js": "/chunks/contact-us~chunks/dynamic-page~chunks/landing-page.js?id=a4b8a7017c82de28296b",
"/chunks/create-new-password.js": "/chunks/create-new-password.js?id=108dcc4b5af4c973be56",
"/chunks/create-new-password.js": "/chunks/create-new-password.js?id=7c2f9087003330f9da79",
"/chunks/dashboard.js": "/chunks/dashboard.js?id=ee57c44ceca0e7202363",
"/chunks/dashboard~chunks/invoices~chunks/pages~chunks/plan-subscribers~chunks/plans~chunks/settings-i~0e2a0654.js": "/chunks/dashboard~chunks/invoices~chunks/pages~chunks/plan-subscribers~chunks/plans~chunks/settings-i~0e2a0654.js?id=cc1b4cbd4aa7f70151f7",
"/chunks/database.js": "/chunks/database.js?id=576a280918ee6107d623",
@@ -32,7 +32,7 @@
"/chunks/files~chunks/settings-subscription~chunks/shared-files~chunks/shared-page~chunks/user-subscription.js": "/chunks/files~chunks/settings-subscription~chunks/shared-files~chunks/shared-page~chunks/user-subscription.js?id=b646ec02fb9d6a497e74",
"/chunks/files~chunks/shared-files~chunks/shared-page.js": "/chunks/files~chunks/shared-files~chunks/shared-page.js?id=6948f858eca208df8919",
"/chunks/files~chunks/shared-page.js": "/chunks/files~chunks/shared-page.js?id=47ade53389e84dd64310",
"/chunks/forgotten-password.js": "/chunks/forgotten-password.js?id=d5e39543eeb619cb5513",
"/chunks/forgotten-password.js": "/chunks/forgotten-password.js?id=fc920c85f1dcd41bc9e0",
"/chunks/installation-disclaimer.js": "/chunks/installation-disclaimer.js?id=285339a8dd06ace87e96",
"/chunks/invoices.js": "/chunks/invoices.js?id=0dddc007dba47ac5785e",
"/chunks/landing-page.js": "/chunks/landing-page.js?id=6c1137fd4f4d6e03b685",
@@ -45,7 +45,7 @@
"/chunks/plan-settings.js": "/chunks/plan-settings.js?id=e608674e1719be65fe6f",
"/chunks/plan-subscribers.js": "/chunks/plan-subscribers.js?id=26fbcc2472b65a745366",
"/chunks/plans.js": "/chunks/plans.js?id=d6d92de642403caa999b",
"/chunks/profile.js": "/chunks/profile.js?id=015a2fcbaf2946f7eb11",
"/chunks/profile.js": "/chunks/profile.js?id=f810af87b9500da07485",
"/chunks/profile~chunks/settings-password.js": "/chunks/profile~chunks/settings-password.js?id=555e6cf8a4b64b2bf130",
"/chunks/purchase-code.js": "/chunks/purchase-code.js?id=9c4a9daae2237285f35b",
"/chunks/settings.js": "/chunks/settings.js?id=2638798e697164161f7c",
@@ -57,9 +57,9 @@
"/chunks/settings-subscription.js": "/chunks/settings-subscription.js?id=4c5675bec1cb07152692",
"/chunks/setup-wizard.js": "/chunks/setup-wizard.js?id=b671f4f3198119b48449",
"/chunks/shared-files.js": "/chunks/shared-files.js?id=b13068f12911fbf79f74",
"/chunks/shared-page.js": "/chunks/shared-page.js?id=074f7946e1c99ceadf48",
"/chunks/sign-in.js": "/chunks/sign-in.js?id=7b6565f5df2060b45bc0",
"/chunks/sign-up.js": "/chunks/sign-up.js?id=39de7293c26fb3cef1a3",
"/chunks/shared-page.js": "/chunks/shared-page.js?id=8d1b0e7f1ce06befc7c2",
"/chunks/sign-in.js": "/chunks/sign-in.js?id=2432aeaf7b937f6031a7",
"/chunks/sign-up.js": "/chunks/sign-up.js?id=92cf018091af2b41add6",
"/chunks/stripe-credentials.js": "/chunks/stripe-credentials.js?id=402e3abd247572676394",
"/chunks/subscription-plans.js": "/chunks/subscription-plans.js?id=2670e3ba48eb3b75c627",
"/chunks/subscription-service.js": "/chunks/subscription-service.js?id=7176521fbf0047110ae1",
@@ -68,12 +68,88 @@
"/chunks/upgrade-billing~chunks/upgrade-plan.js": "/chunks/upgrade-billing~chunks/upgrade-plan.js?id=a589c99d29f03bc71487",
"/chunks/upgrade-plan.js": "/chunks/upgrade-plan.js?id=8bf12e8b93c7eaee4171",
"/chunks/user.js": "/chunks/user.js?id=bdb8a51693952859f5e1",
"/chunks/user-create.js": "/chunks/user-create.js?id=499fa0f0dca50c9e4e51",
"/chunks/user-create.js": "/chunks/user-create.js?id=3b1b7fb1874cacf56662",
"/chunks/user-delete.js": "/chunks/user-delete.js?id=91d17d44835dd32ec36f",
"/chunks/user-detail.js": "/chunks/user-detail.js?id=b5b474dd8fea7b99c766",
"/chunks/user-detail.js": "/chunks/user-detail.js?id=983b235711d5b20f08fa",
"/chunks/user-invoices.js": "/chunks/user-invoices.js?id=04b8c39ed83dc89f739a",
"/chunks/user-password.js": "/chunks/user-password.js?id=ac51d17a4aa7ae50bc88",
"/chunks/user-storage.js": "/chunks/user-storage.js?id=5cfec8a8f8a8aef24ef2",
"/chunks/user-subscription.js": "/chunks/user-subscription.js?id=10b3a108059d62d206c8",
"/chunks/users.js": "/chunks/users.js?id=6e68cb068f69fba3199c"
"/chunks/users.js": "/chunks/users.js?id=6e68cb068f69fba3199c",
"/chunks/app-language.2205bcc7f6ee689b9840.hot-update.js": "/chunks/app-language.2205bcc7f6ee689b9840.hot-update.js",
"/chunks/app-language.3f0bbb740122da0b673d.hot-update.js": "/chunks/app-language.3f0bbb740122da0b673d.hot-update.js",
"/chunks/app-language.57cfd1cb030a9f25601f.hot-update.js": "/chunks/app-language.57cfd1cb030a9f25601f.hot-update.js",
"/chunks/app-language.5ec497e5a9e02a176d12.hot-update.js": "/chunks/app-language.5ec497e5a9e02a176d12.hot-update.js",
"/chunks/app-language.f8943079f90af63054ce.hot-update.js": "/chunks/app-language.f8943079f90af63054ce.hot-update.js",
"/chunks/app-language.54afc673ab0932ef0e92.hot-update.js": "/chunks/app-language.54afc673ab0932ef0e92.hot-update.js",
"/chunks/app-language.f2aee30a97259f4a0506.hot-update.js": "/chunks/app-language.f2aee30a97259f4a0506.hot-update.js",
"/chunks/app-language.3cf39565af4e39a56266.hot-update.js": "/chunks/app-language.3cf39565af4e39a56266.hot-update.js",
"/chunks/app-language.f6f0a1f32980c917c44d.hot-update.js": "/chunks/app-language.f6f0a1f32980c917c44d.hot-update.js",
"/chunks/app-language.76e2368b6bd6fcd4b628.hot-update.js": "/chunks/app-language.76e2368b6bd6fcd4b628.hot-update.js",
"/chunks/app-language.3bc16cb03f9d669326b0.hot-update.js": "/chunks/app-language.3bc16cb03f9d669326b0.hot-update.js",
"/chunks/app-language.91a502fb0ba11520c582.hot-update.js": "/chunks/app-language.91a502fb0ba11520c582.hot-update.js",
"/chunks/app-language.4f4514565e5a3f37ad30.hot-update.js": "/chunks/app-language.4f4514565e5a3f37ad30.hot-update.js",
"/chunks/app-language.80068c2f265991830577.hot-update.js": "/chunks/app-language.80068c2f265991830577.hot-update.js",
"/chunks/app-language.22fd0622fc469111d7a2.hot-update.js": "/chunks/app-language.22fd0622fc469111d7a2.hot-update.js",
"/chunks/app-language.c169bd9688d83d0347f6.hot-update.js": "/chunks/app-language.c169bd9688d83d0347f6.hot-update.js",
"/chunks/app-language.b6f1dc94a36730e0b912.hot-update.js": "/chunks/app-language.b6f1dc94a36730e0b912.hot-update.js",
"/chunks/app-language.9e8710d0c67f398fbddc.hot-update.js": "/chunks/app-language.9e8710d0c67f398fbddc.hot-update.js",
"/chunks/app-language.4a2de5a04857f498d0c6.hot-update.js": "/chunks/app-language.4a2de5a04857f498d0c6.hot-update.js",
"/chunks/app-language.c3b396f18ee1e031755c.hot-update.js": "/chunks/app-language.c3b396f18ee1e031755c.hot-update.js",
"/chunks/app-language.ad8c7fe2060e365fff76.hot-update.js": "/chunks/app-language.ad8c7fe2060e365fff76.hot-update.js",
"/chunks/app-language.181b02cb039f8d8d680f.hot-update.js": "/chunks/app-language.181b02cb039f8d8d680f.hot-update.js",
"/chunks/app-language.fba250e9bda529813adb.hot-update.js": "/chunks/app-language.fba250e9bda529813adb.hot-update.js",
"/chunks/app-language.a6f8cfd33d82fc47b3a7.hot-update.js": "/chunks/app-language.a6f8cfd33d82fc47b3a7.hot-update.js",
"/chunks/app-language.6b7982a0e72461bbec69.hot-update.js": "/chunks/app-language.6b7982a0e72461bbec69.hot-update.js",
"/chunks/app-language.0f3e7cf3cf62de3e2f52.hot-update.js": "/chunks/app-language.0f3e7cf3cf62de3e2f52.hot-update.js",
"/chunks/app-language.b11bd599191a17ae914b.hot-update.js": "/chunks/app-language.b11bd599191a17ae914b.hot-update.js",
"/chunks/app-language.6d406fa3ed031fe4493e.hot-update.js": "/chunks/app-language.6d406fa3ed031fe4493e.hot-update.js",
"/chunks/app-language.6d0ad77a16d2689d8f69.hot-update.js": "/chunks/app-language.6d0ad77a16d2689d8f69.hot-update.js",
"/chunks/app-language.cda3d4412d5bce7cb1e5.hot-update.js": "/chunks/app-language.cda3d4412d5bce7cb1e5.hot-update.js",
"/chunks/app-language.f9514b62a434452ba4c8.hot-update.js": "/chunks/app-language.f9514b62a434452ba4c8.hot-update.js",
"/chunks/sign-up.652484c0dcbfc2f368b7.hot-update.js": "/chunks/sign-up.652484c0dcbfc2f368b7.hot-update.js",
"/chunks/sign-up.7238adafa42f256413f9.hot-update.js": "/chunks/sign-up.7238adafa42f256413f9.hot-update.js",
"/chunks/sign-up.49de17fd0e78616c7ad3.hot-update.js": "/chunks/sign-up.49de17fd0e78616c7ad3.hot-update.js",
"/chunks/user-create.107013b2d9852057ca6a.hot-update.js": "/chunks/user-create.107013b2d9852057ca6a.hot-update.js",
"/chunks/user-create.af162ad0a8d392cc6102.hot-update.js": "/chunks/user-create.af162ad0a8d392cc6102.hot-update.js",
"/chunks/user-detail.afc26c1eb03c0e6c2b37.hot-update.js": "/chunks/user-detail.afc26c1eb03c0e6c2b37.hot-update.js",
"/chunks/sign-up.5aeaffe0d584befaeba0.hot-update.js": "/chunks/sign-up.5aeaffe0d584befaeba0.hot-update.js",
"/chunks/profile.473c0ccfa89be296918c.hot-update.js": "/chunks/profile.473c0ccfa89be296918c.hot-update.js",
"/chunks/create-new-password.1ff6a77b4a7dd20b59e5.hot-update.js": "/chunks/create-new-password.1ff6a77b4a7dd20b59e5.hot-update.js",
"/chunks/user-create.c1aa3883b16d5110491e.hot-update.js": "/chunks/user-create.c1aa3883b16d5110491e.hot-update.js",
"/chunks/sign-up.af86da0f4c0bed397ea1.hot-update.js": "/chunks/sign-up.af86da0f4c0bed397ea1.hot-update.js",
"/chunks/sign-in.dcf8598e640acdbef02e.hot-update.js": "/chunks/sign-in.dcf8598e640acdbef02e.hot-update.js",
"/chunks/forgotten-password.6c5c9b747a5409c94ff3.hot-update.js": "/chunks/forgotten-password.6c5c9b747a5409c94ff3.hot-update.js",
"/chunks/create-new-password.76929662b5bf96dd6c05.hot-update.js": "/chunks/create-new-password.76929662b5bf96dd6c05.hot-update.js",
"/chunks/user-create.f31bc5fc0d846f4174bc.hot-update.js": "/chunks/user-create.f31bc5fc0d846f4174bc.hot-update.js",
"/chunks/user-detail.2d6f82d9b4ea01330cf2.hot-update.js": "/chunks/user-detail.2d6f82d9b4ea01330cf2.hot-update.js",
"/chunks/sign-up.36388d71c581430cfcbf.hot-update.js": "/chunks/sign-up.36388d71c581430cfcbf.hot-update.js",
"/chunks/profile.2113c6bf0a753609e311.hot-update.js": "/chunks/profile.2113c6bf0a753609e311.hot-update.js",
"/chunks/sign-in.45800c22490d5e34b2d1.hot-update.js": "/chunks/sign-in.45800c22490d5e34b2d1.hot-update.js",
"/chunks/shared-page.068fd94c60e7498f916d.hot-update.js": "/chunks/shared-page.068fd94c60e7498f916d.hot-update.js",
"/chunks/app-language.06d0786ce0d5c89e1c67.hot-update.js": "/chunks/app-language.06d0786ce0d5c89e1c67.hot-update.js",
"/chunks/app-language.50084d3425306c5b53ca.hot-update.js": "/chunks/app-language.50084d3425306c5b53ca.hot-update.js",
"/chunks/app-language.c7c541a5afa81eef13fd.hot-update.js": "/chunks/app-language.c7c541a5afa81eef13fd.hot-update.js",
"/chunks/app-language.07d42f6154bddb307d4c.hot-update.js": "/chunks/app-language.07d42f6154bddb307d4c.hot-update.js",
"/chunks/app-language.e9dc6e486602bd6edbc2.hot-update.js": "/chunks/app-language.e9dc6e486602bd6edbc2.hot-update.js",
"/chunks/app-language.cdff6c952adaab4a9235.hot-update.js": "/chunks/app-language.cdff6c952adaab4a9235.hot-update.js",
"/chunks/app-language.46408825f1c8ec423335.hot-update.js": "/chunks/app-language.46408825f1c8ec423335.hot-update.js",
"/chunks/app-language.6c6c0c461b1c389c4b79.hot-update.js": "/chunks/app-language.6c6c0c461b1c389c4b79.hot-update.js",
"/chunks/app-language.3d6b65041812f1b857a5.hot-update.js": "/chunks/app-language.3d6b65041812f1b857a5.hot-update.js",
"/chunks/app-language.b3e44cfb1ed4e064260b.hot-update.js": "/chunks/app-language.b3e44cfb1ed4e064260b.hot-update.js",
"/chunks/app-language.48ee61555d1d541aa5fe.hot-update.js": "/chunks/app-language.48ee61555d1d541aa5fe.hot-update.js",
"/chunks/app-language.c95b4e370a4a99517aa7.hot-update.js": "/chunks/app-language.c95b4e370a4a99517aa7.hot-update.js",
"/chunks/app-language.6d3e3fa2ad4e91fb5e6a.hot-update.js": "/chunks/app-language.6d3e3fa2ad4e91fb5e6a.hot-update.js",
"/chunks/app-language.cedbb795171698a62c32.hot-update.js": "/chunks/app-language.cedbb795171698a62c32.hot-update.js",
"/chunks/app-language.35c7442e55abbad5fc9b.hot-update.js": "/chunks/app-language.35c7442e55abbad5fc9b.hot-update.js",
"/chunks/app-language.0b860a62ccb27c8092d7.hot-update.js": "/chunks/app-language.0b860a62ccb27c8092d7.hot-update.js",
"/chunks/app-language.b05a3da3f91372228cf3.hot-update.js": "/chunks/app-language.b05a3da3f91372228cf3.hot-update.js",
"/chunks/app-language.7f0ca7b7af97f1160ce7.hot-update.js": "/chunks/app-language.7f0ca7b7af97f1160ce7.hot-update.js",
"/chunks/app-language.45fcc4e5a62eefb00e83.hot-update.js": "/chunks/app-language.45fcc4e5a62eefb00e83.hot-update.js",
"/chunks/app-language.da2401d2a9dd5113e3c7.hot-update.js": "/chunks/app-language.da2401d2a9dd5113e3c7.hot-update.js",
"/chunks/app-language.d689d0ac3fdc1de9a820.hot-update.js": "/chunks/app-language.d689d0ac3fdc1de9a820.hot-update.js",
"/chunks/app-language.f83ba6a70c9be6cf565d.hot-update.js": "/chunks/app-language.f83ba6a70c9be6cf565d.hot-update.js",
"/chunks/app-language.c85708a51bfe8b11c687.hot-update.js": "/chunks/app-language.c85708a51bfe8b11c687.hot-update.js",
"/chunks/app-language.f5031115ac662c846871.hot-update.js": "/chunks/app-language.f5031115ac662c846871.hot-update.js",
"/js/main.c2b409e3f934234e6d50.hot-update.js": "/js/main.c2b409e3f934234e6d50.hot-update.js"
}
@@ -10,7 +10,7 @@
<user-icon v-if="selected.icon === 'user'" size="14"></user-icon>
<edit2-icon v-if="selected.icon === 'user-edit'" size="14"></edit2-icon>
</div>
<span class="option-value">{{ $t(`${selected.label}`) }}</span>
<span class="option-value">{{ selected.label }}</span>
</div>
<!--If is empty-->
@@ -29,7 +29,7 @@
<user-icon v-if="option.icon === 'user'" size="14"></user-icon>
<edit2-icon v-if="option.icon === 'user-edit'" size="14"></edit2-icon>
</div>
<span class="option-value">{{ $t(`${option.label}`) }}</span>
<span class="option-value">{{ option.label }}</span>
</li>
</ul>
</transition>
@@ -182,7 +182,7 @@ export default {
margin-bottom: 5px;
.language-label {
color: $text-muted;
color: $light_text;
font-weight: 700;
@include font-size(12);
margin-top: 20px;
@@ -203,7 +203,7 @@ export default {
}
.name {
color: $theme;
color: $theme !important;
}
}
@@ -239,4 +239,16 @@ export default {
// display: none;
// }
// }
@media (prefers-color-scheme: dark) {
.language{
.name {
color: $dark_mode_text_primary !important;
}
}
.language-label {
color: $dark_mode_text_secondary !important;
}
}
</style>
@@ -1,6 +1,6 @@
<template>
<!-- Serach bar -->
<div v-if="strings" class="language-strings-wrapper">
<div v-if="strings" class="language-strings-wrapper form-block form">
<div class="search-bar-wrapper">
<div class="search-bar">
<div v-if="!searchInput" class="icon" >
@@ -15,7 +15,7 @@
class="query"
type="text"
name="searchInput"
placeholder="Search Language Strings"
placeholder="Search Language Strings..."
/>
</div>
</div>
@@ -58,7 +58,9 @@
<!-- Strings -->
<FormLabel class="mt-70">Language Strings</FormLabel>
<Spinner v-if="!loadSearch || filteredStrings.length === 0"/>
<Spinner class="spinner" v-if="!loadSearch || filteredStrings.length === 0 && !searchInput"/>
<div v-if="loadSearch && filteredStrings.length > 0">
<div class="block-wrapper string" v-for="(string,index) in filteredStrings" :key="index">
<label> {{string.value}}:</label>
@@ -72,6 +74,12 @@
</ValidationProvider>
</div>
</div>
<!-- Not Fount -->
<div class="not-found-wrapper" v-if="loadSearch && filteredStrings.length === 0 && searchInput">
<span class="not-found">Not Found</span>
</div>
</div>
</div>
@@ -118,6 +126,8 @@ export default {
watch: {
activeLanguage () {
this.getLanguageStrings(this.activeLanguage)
this.searchInput = ''
}
},
methods: {
@@ -215,6 +225,24 @@ export default {
@import '@assets/vue-file-manager/_mixins';
@import '@assets/vue-file-manager/_forms';
.spinner {
top: 60% !important;
}
.not-found-wrapper {
display: flex;
margin-top: 20%;
.not-found {
margin: auto;
font-weight: 700;
padding: 10px;
border-radius: 8px;
background: $light_background;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.12);
}
}
.string:last-child {
margin-bottom: 32px !important;
}
@@ -236,6 +264,7 @@ export default {
margin: 0 auto;
display: flex;
flex-direction: column;
position: relative;
.block-form{
overflow-y: scroll;
@@ -258,7 +287,7 @@ export default {
border-radius: 8px;
outline: 0;
padding: 9px 20px 9px 43px;
font-weight: 400;
font-weight: 700;
@include font-size(16);
width: 100%;
height: 50px;
@@ -268,9 +297,9 @@ export default {
-webkit-appearance: none;
&::placeholder {
color: $text-muted;
color: $light_text;
@include font-size(14);
font-weight: 500;
font-weight: 700;
}
&:focus {
@@ -296,7 +325,7 @@ export default {
circle,
line {
color: $text-muted;
color: $light_text;
}
.pointer {
@@ -324,7 +353,6 @@ export default {
padding: 9px 20px 9px 30px;
&:focus {
border: 1px solid transparent;
box-shadow: none;
}
}
@@ -339,16 +367,23 @@ export default {
@media (prefers-color-scheme: dark) {
.search-bar {
input {
border-color: transparent;
color: $dark_mode_text_primary;
background: $dark_mode_background ;
&::placeholder {
color: $dark_mode_text_secondary;
}
}
.icon svg path {
fill: $dark_mode_text_secondary;
.icon {
circle,
line {
color: $dark_mode_text_secondary !important;
}
}
}
.not-found-wrapper {
.not-found {
background: $dark_mode_foreground !important;
}
}
}
@@ -20,7 +20,7 @@
<!--Email-->
<div class="block-wrapper">
<label>{{ $t('page_registration.label_email') }}</label>
<label>{{ $t('page_registration.label_email') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="email" rules="required" v-slot="{ errors }">
<input v-model="user.email" :placeholder="$t('admin_page_user.create_user.label_email')" type="email" :class="{'is-error': errors[0]}"/>
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
@@ -29,7 +29,7 @@
<!--Name-->
<div class="block-wrapper">
<label>{{ $t('page_registration.label_name') }}</label>
<label>{{ $t('page_registration.label_name') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="user name" rules="required" v-slot="{ errors }">
<input v-model="user.name" :placeholder="$t('admin_page_user.create_user.label_name')" type="text" :class="{'is-error': errors[0]}"/>
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
@@ -39,7 +39,7 @@
<!--Password-->
<div class="wrapper-inline">
<div class="block-wrapper">
<label>{{ $t('page_registration.label_pass') }}</label>
<label>{{ $t('page_registration.label_pass') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="password" rules="required" v-slot="{ errors }">
<input v-model="user.password" :placeholder="$t('page_registration.placeholder_pass')" type="password" :class="{'is-error': errors[0]}"/>
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
@@ -47,7 +47,7 @@
</div>
<div class="block-wrapper">
<label>{{ $t('page_registration.label_confirm_pass') }}</label>
<label>{{ $t('page_registration.label_confirm_pass') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="password confirm" rules="required" v-slot="{ errors }">
<input v-model="user.password_confirmation" :placeholder="$t('admin_page_user.create_user.label_conf_pass')" type="password" :class="{'is-error': errors[0]}"/>
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
@@ -34,7 +34,7 @@
<!--Email-->
<div class="block-wrapper">
<label>{{ $t('page_registration.label_email') }}</label>
<label>{{ $t('page_registration.label_email') }}:</label>
<div class="input-wrapper">
<input :value="user.data.attributes.email"
:placeholder="$t('page_registration.placeholder_email')"
@@ -46,7 +46,7 @@
<!--Name-->
<div class="block-wrapper">
<label>{{ $t('page_registration.label_name') }}</label>
<label>{{ $t('page_registration.label_name') }}:</label>
<div class="input-wrapper">
<input :value="user.data.attributes.name"
:placeholder="$t('page_registration.placeholder_name')"
@@ -7,13 +7,13 @@
<b v-if="! config.app_logo" class="auth-logo-text">{{ config.app_name }}</b>
<h1>{{ $t('page_create_password.title') }}</h1>
<h2>{{ $t('page_create_password.subtitle') }}</h2>
<h2>{{ $t('page_create_password.subtitle') }}:</h2>
<ValidationObserver @submit.prevent="createNewPassword" ref="create_new_password" v-slot="{ invalid }"
tag="form" class="form block-form create-new-password">
<div class="block-wrapper">
<label>{{ $t('page_create_password.label_email') }}</label>
<label>{{ $t('page_create_password.label_email') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="E-Mail" rules="required"
v-slot="{ errors }">
<input v-model="recoverPassword.email" :placeholder="$t('page_login.placeholder_email')" type="email"
@@ -7,7 +7,7 @@
<b v-if="! config.app_logo" class="auth-logo-text">{{ config.app_name }}</b>
<h1>{{ $t('page_forgotten_password.title') }}</h1>
<h2>{{ $t('page_forgotten_password.subtitle') }}</h2>
<h2>{{ $t('page_forgotten_password.subtitle') }}:</h2>
<ValidationObserver @submit.prevent="forgottenPassword" ref="forgotten_password" v-slot="{ invalid }"
tag="form" class="form inline-form">
+2 -2
View File
@@ -7,7 +7,7 @@
<b v-if="! config.app_logo" class="auth-logo-text">{{ config.app_name }}</b>
<h1>{{ $t('page_login.title') }}</h1>
<h2>{{ $t('page_login.subtitle') }}</h2>
<h2>{{ $t('page_login.subtitle') }}:</h2>
<ValidationObserver @submit.prevent="logIn" ref="log_in" v-slot="{ invalid }" tag="form"
class="form inline-form">
@@ -35,7 +35,7 @@
<div class="user" v-if="checkedAccount">
<img class="user-avatar" :src="checkedAccount.avatar" :alt="checkedAccount.name">
<h1>{{ $t('page_sign_in.title', {name: checkedAccount.name}) }}</h1>
<h2>{{ $t('page_sign_in.subtitle') }}</h2>
<h2>{{ $t('page_sign_in.subtitle') }}:</h2>
</div>
<ValidationObserver @submit.prevent="singIn" ref="sign_in" v-slot="{ invalid }" tag="form"
+5 -5
View File
@@ -7,13 +7,13 @@
<b v-if="! config.app_logo" class="auth-logo-text">{{ config.app_name }}</b>
<h1>{{ $t('page_registration.title') }}</h1>
<h2>{{ $t('page_registration.subtitle') }}</h2>
<h2>{{ $t('page_registration.subtitle') }}:</h2>
<ValidationObserver @submit.prevent="signUp" ref="sign_up" v-slot="{ invalid }" tag="form"
class="form block-form">
<div class="block-wrapper">
<label>{{ $t('page_registration.label_email') }}</label>
<label>{{ $t('page_registration.label_email') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="E-Mail" rules="required"
v-slot="{ errors }">
<input v-model="register.email" :placeholder="$t('page_registration.placeholder_email')" type="email"
@@ -23,7 +23,7 @@
</div>
<div class="block-wrapper">
<label>{{ $t('page_registration.label_name') }}</label>
<label>{{ $t('page_registration.label_name') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Full Name" rules="required"
v-slot="{ errors }">
<input v-model="register.name" :placeholder="$t('page_registration.placeholder_name')" type="text"
@@ -33,7 +33,7 @@
</div>
<div class="block-wrapper">
<label>{{ $t('page_registration.label_pass') }}</label>
<label>{{ $t('page_registration.label_pass') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Your New Password"
rules="required" v-slot="{ errors }">
<input v-model="register.password" :placeholder="$t('page_registration.placeholder_pass')" type="password"
@@ -43,7 +43,7 @@
</div>
<div class="block-wrapper">
<label>{{ $t('page_registration.label_confirm_pass') }}</label>
<label>{{ $t('page_registration.label_confirm_pass') }}:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Confirm Your Password"
rules="required" v-slot="{ errors }">
<input v-model="register.password_confirmation" :placeholder="$t('page_registration.placeholder_confirm_pass')"
+1 -1
View File
@@ -45,7 +45,7 @@
<b v-if="! config.app_logo" class="auth-logo-text">{{ config.app_name }}</b>
<h1>{{ $t('page_shared.title') }}</h1>
<h2>{{ $t('page_shared.subtitle') }}</h2>
<h2>{{ $t('page_shared.subtitle') }}:</h2>
<ValidationObserver @submit.prevent="authenticateProtected" ref="authenticateProtected" v-slot="{ invalid }" tag="form" class="form inline-form">
+2 -2
View File
@@ -4,7 +4,7 @@
<div class="form block-form">
<FormLabel>{{ $t('user_settings.title_account') }}</FormLabel>
<div class="block-wrapper">
<label>{{ $t('page_registration.label_email') }}</label>
<label>{{ $t('page_registration.label_email') }}:</label>
<div class="input-wrapper">
<input :value="userInfo.email"
:placeholder="$t('page_registration.placeholder_email')"
@@ -14,7 +14,7 @@
</div>
</div>
<div class="block-wrapper">
<label>{{ $t('page_registration.label_name') }}</label>
<label>{{ $t('page_registration.label_name') }}:</label>
<div class="input-wrapper">
<input @keyup="changeUserName"
v-model="userInfo.name"
+45 -45
View File
@@ -1,66 +1,66 @@
<?php
return [
'app_description' => 'Your self-hosted storage cloud software powered by Laravel and Vue',
'user_not_fount' => _t('user_not_fount'),
'incorrect_password' => 'Sorry, your password is incorrect.',
'time' => '%d. %B. %Y at %H:%M',
'home' => 'Home',
'app_description' => __t('app_description'),
'user_not_fount' => __t('user_not_fount'),
'incorrect_password' => __t('incorrect_password'),
'time' => __t('time'),
'home' => __t('home'),
//Shared link email message
'shared_link_email_subject' => _t('shared_link_email_subject'),
'shared_link_email_greeting' => _t('shared_link_email_greeting'),
'shared_link_email_user' => _t('shared_link_email_user'),
'shared_link_email_link' => _t('shared_link_email_link'),
'shared_link_email_salutation' => _t('shared_link_email_salutation'),
'shared_link_email_subject' => __t('shared_link_email_subject'),
'shared_link_email_greeting' => __t('shared_link_email_greeting'),
'shared_link_email_user' => __t('shared_link_email_user'),
'shared_link_email_link' => __t('shared_link_email_link'),
'shared_link_email_salutation' => __t('shared_link_email_salutation'),
// Reset password email
'reset_password_greeting' => 'Hello!',
'reset_password_subject' => 'Reset password for your account on ',
'reset_password_line_1' => 'You are receiving this email because we received a password reset request for your account.',
'reset_password_line_2' => 'If you did not request a password reset, no further action is required.',
'reset_password_action' => 'Reset Password',
'reset_password_greeting' => __t('reset_password_greeting'),
'reset_password_subject' => __t('reset_password_subject'),
'reset_password_line_1' => __t('reset_password_line_1'),
'reset_password_line_2' => __t('reset_password_line_2'),
'reset_password_action' => __t('reset_password_action'),
'salutation' => 'Regards',
'salutation' => __t('salutation'),
// Invoice
'print_button' => 'Print Document',
'print_button' => __t('print_button'),
'vat' => 'VAT',
'vat_included' => 'incl.',
'subtotal' => 'Subtotal',
'vat' => __t('vat'),
'vat_included' => __t('vat_included'),
'subtotal' => __t('subtotal'),
'tax_exempted' => 'Tax is exempted',
'tax_be_paid_reverse' => 'Tax to be paid on reverse charge basis',
'tax_exempted' => __t('tax_exempted'),
'tax_be_paid_reverse' => __t('tax_be_paid_reverse'),
'invoice_title' => 'Invoice',
'date' => 'Date',
'product' => 'Product',
'subscription' => 'Subscription',
'invoice_number' => 'Invoice Number',
'invoice_title' => __t('invoice_title'),
'date' => __t('date'),
'product' => __t('product'),
'subscription' => __t('subscription'),
'invoice_number' => __t('invoice_number'),
'seller' => 'Seller',
'client' => 'Client',
'seller' => __t('seller'),
'client' => __t('client'),
'seller_vat' => 'VAT number',
'seller_name' => 'Name',
'seller_phone' => 'Phone',
'seller_vat' => __t('seller_vat'),
'seller_name' => __t('seller_name'),
'seller_phone' => __t('seller_phone'),
'name' => 'Name',
'phone' => 'Phone',
'address' => 'Address',
'city' => 'City',
'state' => 'State',
'postal_code' => 'Postal code',
'country' => 'Country',
'name' => __t('name'),
'phone' => __t('phone'),
'address' => __t('address'),
'city' => __t('city'),
'state' => __t('state'),
'postal_code' => __t('postal_code'),
'country' => __t('country'),
'col_description' => 'Description',
'col_date' => 'Date',
'col_amount' => 'Amount',
'col_description' => __t('col_description'),
'col_date' => __t('col_date'),
'col_amount' => __t('col_amount'),
'total' => 'Total',
'total' => __t('total'),
// OG Page
'user_sending' => ':name is sending you this file',
'protected_file' => 'This link is protected by password',
'user_sending' => __t('user_sending'),
'protected_file' => __t('protected_file'),
];