Comments (4)
Thanks 👍
from publisher.
Laravel does convert passed names, but not all of them:
This feature is documented: https://laravel.com/docs/10.x/localization#replacing-parameters-in-translation-strings
Next, regarding the transformation. Based on the Str::ucfirst()
function that Laravel calls for variables like :Attribute
, it capitalizes only the first letter without touching the rest:
Str::ucfirst('e-mail addresse') // E-mail addresse
Str::ucfirst('e-Mail Addresse') // E-Mail Addresse
Str::ucfirst('E-Mail Addresse'); // E-Mail Addresse
return [
'email' => 'The :attribute field must be a valid email address.'
// :Attribute muss eine gültige E-Mail-Adresse sein.
];
__(':Attribute muss eine gültige E-Mail-Adresse sein.', ['attribute' => 'E-Mail Addresse'])
// E-Mail Addresse muss eine gültige E-Mail-Adresse sein.
You also specified the version "Laravel Lang 3.1.1". In fact, I can suggest that this is a version of the laravel-lang/common
package, which, among other things, installs the laravel-lang/attributes
dependency.
Also a feature of Laravel is that the field names can be automatically renamed, and this is where we are faced with the fact that you get "E-mail addresse" instead of "E-Mail Addresse" for the German language because the file
contains incorrect, from the point of view German grammars, translations.
@sotten, @WhereIsLucas, can you help update the locales/de/php.json
file in the Laravel Lang: Attributes
project?
from publisher.
Ok, got it - then in fact this was "broken" when switching to the new structure 9 months ago... in the old validation.php files all attributes had capital letters - maybe this was done by a script? In meanwhile a few arguments have already been fixed but not all...
from publisher.
Indeed, I did not pay attention to it. My apologies.
I updated the values to match the previous version and released
the hotfix. Update the dependencies with the composer update
command and check again. Everything should be right now.
Thanks for the help!
from publisher.
Related Issues (20)
- Alignment = false still removes comments HOT 1
- How to install a localization from laravel-lang/lang ? HOT 8
- Information: Lost `laravel-lang/lang` on update HOT 2
- Publisher installs 'validation-inline' instead of 'validation' HOT 4
- ISO locales HOT 12
- https://publisher.laravel-lang.com/ return blank page HOT 1
- All commands fail - TypeError Processors/Processor.php HOT 9
- Make lang path configurable HOT 3
- `lang:update` breaks dot notation in the "attributes" (validation.php) and converts it into an array HOT 3
- Translation was override if has same key HOT 4
- Is the facade meant for use in code or for CI/CD? HOT 8
- Italian language installation and update fails when Pest is installed HOT 1
- Constant expression contains invalid operations HOT 8
- Attribute name translation not working HOT 1
- Publisher doesn't detect Jetstream Translations in Laravel 10 HOT 2
- Docs throw 404 HOT 5
- Add files from a custom plugin HOT 8
- Overloaded translation HOT 6
- Missing keys after lang:add XX HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from publisher.