diff --git a/.phraseapp.yml b/.phraseapp.yml new file mode 100644 index 000000000..937adcddc --- /dev/null +++ b/.phraseapp.yml @@ -0,0 +1,28 @@ +phraseapp: + project_id: 1a5e1909ba1c536141639cd8fa24c3d2 + file_format: laravel + push: + sources: + - file: ./resources/lang//.php +# - file: ./resources/lang/en/.php + params: + locale_code: en +# file_format: laravel + pull: + targets: + - file: ./resources/lang//about.php + params: + tag: about +# file_format: laravel + - file: ./resources/lang//account.php + params: + tag: account + - file: ./resources/lang//index.php + params: + tag: index + - file: ./resources/lang//snippets.php + params: + tag: snippets + - file: ./resources/lang//validation.php + params: + tag: validation diff --git a/resources/lang/de/about.php b/resources/lang/de/about.php new file mode 100644 index 000000000..89ea65b01 --- /dev/null +++ b/resources/lang/de/about.php @@ -0,0 +1,6 @@ + array( + "release" => "Veröffentlichungsdatum: :reldate", + ), +); \ No newline at end of file diff --git a/resources/lang/de/account.php b/resources/lang/de/account.php new file mode 100644 index 000000000..f3999f891 --- /dev/null +++ b/resources/lang/de/account.php @@ -0,0 +1,10 @@ + array( + "question" => "Passwort vergessen?", + "resetpasswd" => "Zurücksetzen", + ), + "register" => array( + "title" => "Registrierung", + ), +); \ No newline at end of file diff --git a/resources/lang/de/index.php b/resources/lang/de/index.php new file mode 100644 index 000000000..890c7000c --- /dev/null +++ b/resources/lang/de/index.php @@ -0,0 +1,22 @@ + "Über uns", + "buildinfo" => array( + "release" => "Veröffentlichungsdatum: :reldate", + ), + "forgot" => array( + "question" => "Passwort vergessen?", + "resetpasswd" => "Zurücksetzen", + ), + "linkoptions" => "Weitere Optionen ", + "logout" => "Ausloggen", + "private" => "Privat", + "public" => "Öffentlich", + "register" => array( + "title" => "Registrierung", + ), + "settings" => "Einstellungen ", + "short" => "Kürzen", + "signin" => "Einloggen", + "signup" => "Registrieren", +); \ No newline at end of file diff --git a/resources/lang/de/snippets.php b/resources/lang/de/snippets.php new file mode 100644 index 000000000..b4dfc8110 --- /dev/null +++ b/resources/lang/de/snippets.php @@ -0,0 +1,8 @@ + "Über uns", + "logout" => "Ausloggen", + "settings" => "Einstellungen ", + "signin" => "Einloggen", + "signup" => "Registrieren", +); \ No newline at end of file diff --git a/resources/lang/de/validation.php b/resources/lang/de/validation.php new file mode 100644 index 000000000..26701437b --- /dev/null +++ b/resources/lang/de/validation.php @@ -0,0 +1,3 @@ + array( + "learnmore" => "Learn more at its GitHub page or its project site.", + "license" => "Polr is licensed under the GNU GPL License.", + "powered" => ":app is powered by Polr 2, an open source, minimalist link shortening platform.", + ), + "buildinfo" => array( + "admin" => "You are seeing the information above because you are logged in as an administrator.", + "appinstall" => "App Install: :appname on :appaddress on :genat", + "release" => "Release date: :reldate", + "title" => "Build Information", + "version" => "Version: :ver", + ), + "moreinfo" => "More Information", +); \ No newline at end of file diff --git a/resources/lang/en/account.php b/resources/lang/en/account.php new file mode 100644 index 000000000..c59776bc6 --- /dev/null +++ b/resources/lang/en/account.php @@ -0,0 +1,40 @@ + array( + "question" => "Forgot your password?", + "resetpasswd" => "Reset", + ), + "login" => array( + "form" => array( + "password" => "Password", + "username" => "Username", + ), + "login" => "Login", + "loginbtn" => "Login", + "question" => "Already have an account?", + "title" => "Login", + ), + "register" => array( + "form" => array( + "email" => array( + "help" => "The email you will use to verify your account or to recover your account.", + "label" => "Email:", + "placeholder" => "Email", + ), + "password" => array( + "help" => "The secure password you will use to login to :app.", + "label" => "Password:", + "placeholder" => "Password", + ), + "username" => array( + "help" => "The username you will use to login to :app.", + "label" => "Username:", + "placeholder" => "Username", + ), + ), + "question" => "Don't have an account?", + "register" => "Register", + "registerbtn" => "Register", + "title" => "Register", + ), +); \ No newline at end of file diff --git a/resources/lang/en/index.php b/resources/lang/en/index.php new file mode 100644 index 000000000..b035c12f6 --- /dev/null +++ b/resources/lang/en/index.php @@ -0,0 +1,152 @@ + array( + "learnmore" => "Learn more at its GitHub page or its project site.", + "license" => "Polr is licensed under the GNU GPL License.", + "powered" => ":app is powered by Polr 2, an open source, minimalist link shortening platform.", + ), + "accepted" => "The :attribute must be accepted.", + "active_url" => "The :attribute is not a valid URL.", + "after" => "The :attribute must be a date after :date.", + "alpha" => "The :attribute may only contain letters.", + "alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.", + "alpha_num" => "The :attribute may only contain letters and numbers.", + "array" => "The :attribute must be an array.", + "attributes" => array( + "link-url" => "link URL", + ), + "before" => "The :attribute must be a date before :date.", + "between" => array( + "array" => "The :attribute must have between :min and :max items.", + "file" => "The :attribute must be between :min and :max kilobytes.", + "numeric" => "The :attribute must be between :min and :max.", + "string" => "The :attribute must be between :min and :max characters.", + ), + "boolean" => "The :attribute field must be true or false.", + "buildinfo" => array( + "admin" => "You are seeing the information above because you are logged in as an administrator.", + "appinstall" => "App Install: :appname on :appaddress on :genat", + "release" => "Release date: :reldate", + "title" => "Build Information", + "version" => "Version: :ver", + ), + "checkavailability" => "check availability", + "close" => "Close", + "confirmed" => "The :attribute confirmation does not match.", + "custom" => array( + "attribute-name" => array( + "rule-name" => "custom-message", + ), + ), + "dashboard" => "Dashboard", + "date" => "The :attribute is not a valid date.", + "date_format" => "The :attribute does not match the format :format.", + "different" => "The :attribute and :other must be different.", + "digits" => "The :attribute must be :digits digits.", + "digits_between" => "The :attribute must be between :min and :max digits.", + "email" => "The :attribute must be a valid email address.", + "exists" => "The selected :attribute is invalid.", + "filled" => "The :attribute field is required.", + "forgot" => array( + "question" => "Forgot your password?", + "resetpasswd" => "Reset", + ), + "image" => "The :attribute must be an image.", + "in" => "The selected :attribute is invalid.", + "integer" => "The :attribute must be an integer.", + "ip" => "The :attribute must be a valid IP address.", + "linkoptions" => "link options", + "linktable" => array( + "clicks" => "Clicks", + "creator" => "Creator", + "date" => "Date", + "delete" => "Delete", + "disable" => "Disable", + "linkending" => "Link Ending", + "longlink" => "Long Link", + ), + "loadingtips" => "Loading tips...", + "login" => array( + "form" => array( + "password" => "Password", + "username" => "Username", + ), + "login" => "Login", + "loginbtn" => "Login", + "question" => "Already have an account?", + "title" => "Login", + ), + "logout" => "Logout", + "max" => array( + "array" => "The :attribute may not have more than :max items.", + "file" => "The :attribute may not be greater than :max kilobytes.", + "numeric" => "The :attribute may not be greater than :max.", + "string" => "The :attribute may not be greater than :max characters.", + ), + "mimes" => "The :attribute must be a file of type: :values.", + "min" => array( + "array" => "The :attribute must have at least :min items.", + "file" => "The :attribute must be at least :min kilobytes.", + "numeric" => "The :attribute must be at least :min.", + "string" => "The :attribute must be at least :min characters.", + ), + "moreinfo" => "More Information", + "not_in" => "The selected :attribute is invalid.", + "numeric" => "The :attribute must be a number.", + "private" => "private", + "public" => "public", + "regex" => "The :attribute format is invalid.", + "register" => array( + "form" => array( + "email" => array( + "help" => "The email you will use to verify your account or to recover your account.", + "label" => "Email:", + "placeholder" => "Email", + ), + "password" => array( + "help" => "The secure password you will use to login to :app.", + "label" => "Password:", + "placeholder" => "Password", + ), + "username" => array( + "help" => "The username you will use to login to :app.", + "label" => "Username:", + "placeholder" => "Username", + ), + ), + "question" => "Don't have an account?", + "register" => "Register", + "registerbtn" => "Register", + "title" => "Register", + ), + "required" => "The :attribute field is required.", + "required_if" => "The :attribute field is required when :other is :value.", + "required_with" => "The :attribute field is required when :values is present.", + "required_without" => "The :attribute field is required when :values is not present.", + "required_without_all" => "The :attribute field is required when none of :values are present.", + "required_with_all" => "The :attribute field is required when :values is present.", + "same" => "The :attribute and :other must match.", + "settings" => "Settings", + "short" => "shorten", + "signin" => "Sign In", + "signup" => "Sign Up", + "size" => array( + "array" => "The :attribute must contain :size items.", + "file" => "The :attribute must be :size kilobytes.", + "numeric" => "The :attribute must be :size.", + "string" => "The :attribute must be :size characters.", + ), + "timezone" => "The :attribute must be a valid zone.", + "togglenav" => "Toggle navigation", + "unique" => "The :attribute has already been taken.", + "url" => "The :attribute format is invalid.", + "usertable" => array( + "activated" => "Activated", + "api" => "API", + "createdat" => "Created At", + "delete" => "Delete", + "email" => "Email", + "role" => "Role", + "username" => "Username", + ), +); \ No newline at end of file diff --git a/resources/lang/en/snippets.php b/resources/lang/en/snippets.php new file mode 100644 index 000000000..0d739614f --- /dev/null +++ b/resources/lang/en/snippets.php @@ -0,0 +1,30 @@ + "About", + "close" => "Close", + "dashboard" => "Dashboard", + "linktable" => array( + "clicks" => "Clicks", + "creator" => "Creator", + "date" => "Date", + "delete" => "Delete", + "disable" => "Disable", + "linkending" => "Link Ending", + "longlink" => "Long Link", + ), + "login" => "Login", + "logout" => "Logout", + "settings" => "Settings", + "signin" => "Sign In", + "signup" => "Sign Up", + "togglenav" => "Toggle navigation", + "usertable" => array( + "activated" => "Activated", + "api" => "API", + "createdat" => "Created At", + "delete" => "Delete", + "email" => "Email", + "role" => "Role", + "username" => "Username", + ), +); \ No newline at end of file diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php index 909c77ebd..7f9114cbd 100644 --- a/resources/lang/en/validation.php +++ b/resources/lang/en/validation.php @@ -1,109 +1,71 @@ 'The :attribute must be accepted.', - 'active_url' => 'The :attribute is not a valid URL.', - 'after' => 'The :attribute must be a date after :date.', - 'alpha' => 'The :attribute may only contain letters.', - 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.', - 'alpha_num' => 'The :attribute may only contain letters and numbers.', - 'array' => 'The :attribute must be an array.', - 'before' => 'The :attribute must be a date before :date.', - 'between' => [ - 'numeric' => 'The :attribute must be between :min and :max.', - 'file' => 'The :attribute must be between :min and :max kilobytes.', - 'string' => 'The :attribute must be between :min and :max characters.', - 'array' => 'The :attribute must have between :min and :max items.', - ], - 'boolean' => 'The :attribute field must be true or false.', - 'confirmed' => 'The :attribute confirmation does not match.', - 'date' => 'The :attribute is not a valid date.', - 'date_format' => 'The :attribute does not match the format :format.', - 'different' => 'The :attribute and :other must be different.', - 'digits' => 'The :attribute must be :digits digits.', - 'digits_between' => 'The :attribute must be between :min and :max digits.', - 'email' => 'The :attribute must be a valid email address.', - 'filled' => 'The :attribute field is required.', - 'exists' => 'The selected :attribute is invalid.', - 'image' => 'The :attribute must be an image.', - 'in' => 'The selected :attribute is invalid.', - 'integer' => 'The :attribute must be an integer.', - 'ip' => 'The :attribute must be a valid IP address.', - 'max' => [ - 'numeric' => 'The :attribute may not be greater than :max.', - 'file' => 'The :attribute may not be greater than :max kilobytes.', - 'string' => 'The :attribute may not be greater than :max characters.', - 'array' => 'The :attribute may not have more than :max items.', - ], - 'mimes' => 'The :attribute must be a file of type: :values.', - 'min' => [ - 'numeric' => 'The :attribute must be at least :min.', - 'file' => 'The :attribute must be at least :min kilobytes.', - 'string' => 'The :attribute must be at least :min characters.', - 'array' => 'The :attribute must have at least :min items.', - ], - 'not_in' => 'The selected :attribute is invalid.', - 'numeric' => 'The :attribute must be a number.', - 'regex' => 'The :attribute format is invalid.', - 'required' => 'The :attribute field is required.', - 'required_if' => 'The :attribute field is required when :other is :value.', - 'required_with' => 'The :attribute field is required when :values is present.', - 'required_with_all' => 'The :attribute field is required when :values is present.', - 'required_without' => 'The :attribute field is required when :values is not present.', - 'required_without_all' => 'The :attribute field is required when none of :values are present.', - 'same' => 'The :attribute and :other must match.', - 'size' => [ - 'numeric' => 'The :attribute must be :size.', - 'file' => 'The :attribute must be :size kilobytes.', - 'string' => 'The :attribute must be :size characters.', - 'array' => 'The :attribute must contain :size items.', - ], - 'unique' => 'The :attribute has already been taken.', - 'url' => 'The :attribute format is invalid.', - 'timezone' => 'The :attribute must be a valid zone.', - - /* - |-------------------------------------------------------------------------- - | Custom Validation Language Lines - |-------------------------------------------------------------------------- - | - | Here you may specify custom validation messages for attributes using the - | convention "attribute.rule" to name the lines. This makes it quick to - | specify a specific custom language line for a given attribute rule. - | - */ - - 'custom' => [ - 'attribute-name' => [ - 'rule-name' => 'custom-message', - ], - ], - - /* - |-------------------------------------------------------------------------- - | Custom Validation Attributes - |-------------------------------------------------------------------------- - | - | The following language lines are used to swap attribute place-holders - | with something more reader friendly such as E-Mail Address instead - | of "email". This simply helps us make messages a little cleaner. - | - */ - - 'attributes' => [ - 'link-url' => 'link URL' - ], - -]; +return array( + "accepted" => "The :attribute must be accepted.", + "active_url" => "The :attribute is not a valid URL.", + "after" => "The :attribute must be a date after :date.", + "alpha" => "The :attribute may only contain letters.", + "alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.", + "alpha_num" => "The :attribute may only contain letters and numbers.", + "array" => "The :attribute must be an array.", + "attributes" => array( + "link-url" => "link URL", + ), + "before" => "The :attribute must be a date before :date.", + "between" => array( + "array" => "The :attribute must have between :min and :max items.", + "file" => "The :attribute must be between :min and :max kilobytes.", + "numeric" => "The :attribute must be between :min and :max.", + "string" => "The :attribute must be between :min and :max characters.", + ), + "boolean" => "The :attribute field must be true or false.", + "confirmed" => "The :attribute confirmation does not match.", + "custom" => array( + "attribute-name" => array( + "rule-name" => "custom-message", + ), + ), + "date" => "The :attribute is not a valid date.", + "date_format" => "The :attribute does not match the format :format.", + "different" => "The :attribute and :other must be different.", + "digits" => "The :attribute must be :digits digits.", + "digits_between" => "The :attribute must be between :min and :max digits.", + "email" => "The :attribute must be a valid email address.", + "exists" => "The selected :attribute is invalid.", + "filled" => "The :attribute field is required.", + "image" => "The :attribute must be an image.", + "in" => "The selected :attribute is invalid.", + "integer" => "The :attribute must be an integer.", + "ip" => "The :attribute must be a valid IP address.", + "max" => array( + "array" => "The :attribute may not have more than :max items.", + "file" => "The :attribute may not be greater than :max kilobytes.", + "numeric" => "The :attribute may not be greater than :max.", + "string" => "The :attribute may not be greater than :max characters.", + ), + "mimes" => "The :attribute must be a file of type: :values.", + "min" => array( + "array" => "The :attribute must have at least :min items.", + "file" => "The :attribute must be at least :min kilobytes.", + "numeric" => "The :attribute must be at least :min.", + "string" => "The :attribute must be at least :min characters.", + ), + "not_in" => "The selected :attribute is invalid.", + "numeric" => "The :attribute must be a number.", + "regex" => "The :attribute format is invalid.", + "required" => "The :attribute field is required.", + "required_if" => "The :attribute field is required when :other is :value.", + "required_with" => "The :attribute field is required when :values is present.", + "required_without" => "The :attribute field is required when :values is not present.", + "required_without_all" => "The :attribute field is required when none of :values are present.", + "required_with_all" => "The :attribute field is required when :values is present.", + "same" => "The :attribute and :other must match.", + "size" => array( + "array" => "The :attribute must contain :size items.", + "file" => "The :attribute must be :size kilobytes.", + "numeric" => "The :attribute must be :size.", + "string" => "The :attribute must be :size characters.", + ), + "timezone" => "The :attribute must be a valid zone.", + "unique" => "The :attribute has already been taken.", + "url" => "The :attribute format is invalid.", +); \ No newline at end of file diff --git a/resources/views/about.blade.php b/resources/views/about.blade.php index d2ac5339d..3ee622a30 100644 --- a/resources/views/about.blade.php +++ b/resources/views/about.blade.php @@ -13,20 +13,20 @@
@if ($role == "admin")
-

Build Information

-
Version: {{env('POLR_VERSION')}}
-
Release date: {{env('POLR_RELDATE')}}
-
App Install: {{env('APP_NAME')}} on {{env('APP_ADDRESS')}} on {{env('POLR_GENERATED_AT')}}
+

@lang('about.buildinfo.title')

+
@lang('about.buildinfo.version', ['ver' => env('POLR_VERSION')])
+
@lang('about.buildinfo.release', ['reldate' => env('POLR_RELDATE')])
+
@lang('about.buildinfo.appinstall', ['appname' => env('APP_NAME'), 'appaddress' => env('APP_ADDRESS'), 'genat' => env('POLR_GENERATED_AT')])
-

You are seeing the information above because you are logged in as an administrator.

+

@lang('about.buildinfo.admin')

@endif -

{{env('APP_NAME')}} is powered by Polr 2, an open source, minimalist link shortening platform. - Learn more at its Github page or its project site. -
Polr is licensed under the GNU GPL License. +

@lang('about.about.powered', ['app' => env('APP_NAME')]) + @lang('about.about.learnmore') +
@lang('about.about.license')

-More Information +@lang('about.moreinfo')
 Copyright (C) 2013-2017 Chaoyi Zha
 
diff --git a/resources/views/env.blade.php b/resources/views/env.blade.php
index f36b23dbc..7f5ba7ff4 100644
--- a/resources/views/env.blade.php
+++ b/resources/views/env.blade.php
@@ -111,8 +111,8 @@
 MAIL_FROM_NAME="{{$MAIL_FROM_NAME}}"
 @endif
 
-APP_LOCALE=en
-APP_FALLBACK_LOCALE=en
+APP_LOCALE=de
+APP_FALLBACK_LOCALE=en_US
 
 CACHE_DRIVER=file
 SESSION_DRIVER=file
diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php
index cb75f1cb6..517d93a44 100644
--- a/resources/views/index.blade.php
+++ b/resources/views/index.blade.php
@@ -18,10 +18,10 @@ class='form-control long-link-input' placeholder='http://' name='link-url' />
         {{-- Show secret toggle only if using counter-based ending --}}
         
@endif @@ -32,18 +32,18 @@ class='form-control long-link-input' placeholder='http://' name='link-url' /> - - Link Options + + @lang('index.linkoptions')
- Loading Tips... + @lang('index.loadingtips')
@endsection diff --git a/resources/views/login.blade.php b/resources/views/login.blade.php index 511aaacc6..3982fb6e5 100644 --- a/resources/views/login.blade.php +++ b/resources/views/login.blade.php @@ -6,22 +6,22 @@ @section('content')
-

Login



+

@lang('account.login.title')



- - + + - +
diff --git a/resources/views/signup.blade.php b/resources/views/signup.blade.php index 58b4aa050..f8b55c11b 100644 --- a/resources/views/signup.blade.php +++ b/resources/views/signup.blade.php @@ -6,38 +6,38 @@ @section('content')
-

Register

+

@lang('account.register.title')

- Username: - Password: - Email: + @lang('account.register.form.username.label') + @lang('account.register.form.password.label') + @lang('account.register.form.email.label') @if (env('POLR_ACCT_CREATION_RECAPTCHA'))
@endif - +