Comments (13)
perfect
thanks a lot for the great idea
so i double check on mjml and then release time 🤗
from phpunuhi.
Hi
validate:all is more about validating snippets, code coverage, rules and so on
you can specifiy a specific translation set to be validated (--set)
but yes all translations across all locales will be validated, because thats the main thing with this framework
to figure out what is missing
what you could do is to use coverages..then you can say en-GB needs 100% while it-IT only needs 50%
but remember that (technically) softens the validation checks.....
from phpunuhi.
im now more wondering why they are intentionally left blank?
from phpunuhi.
one more question
could it be that you just need the "validate structure" part in your case
then i could add a "validate:structure" command for you
that would be the special use case where you dont care about the content, but only about everything existing or not?
from phpunuhi.
This is of course a rare case.
For an international shop, the social links can differ from language. In this case, there is a Pinterest account (and link) for some languages and not for others. That's why the snippet is left black for these languages.
A "validate structure" command can help but then we are not sure that the snippets which need a translation are filled in.
from phpunuhi.
aaaaaa
ok so you want to check everything but tell the system to ignore content of a few snippet keys?
only in a locale or in general?
i could create a new rule then you can specify something.
so you can say ignore the contents of these keys. or contents of these keys in these locales. or a rule allow being empty. or allow being empty in these locales.
what do you want to have?
from phpunuhi.
In our case we only need a rule allow being empty in these locales of these keys
but I can imagine that the other rules can be helpfull for others.
from phpunuhi.
ok perfect
so yeah i need a bit time to have a good concept
but basically you need something like
<rules>
<allowEmpty>
<key name="social.youtube.link">
<locale>EN</locale>
<locale>IT</locale>
</key>
</allowEmpty>
</rules>
yeah i know this is not the most efficient one
but just to double check my understanding of it for now :)
from phpunuhi.
Looks good. That's what we are looking for.
It is just an idea to use the TypeIdentifiers from the validators as an XML element?
<rules>
<EMPTY_CONTENT>
<key name="social.facebook.link"/>
<key name="social.youtube.link">
<locale>EN</locale>
<locale>IT</locale>
</key>
</EMPTY_CONTENT>
<CASE_STYLE>
<key name="email.contact.subject"/>
</CASE_STYLE>
</rules>
from phpunuhi.
yeah not so much fan of upper case tags...it just looks bad somehow haha
and most of the time i try to not mix internal key identifiers and external user interfaces.
but i like they basic idea on that xml snippet.....ill check it out, but gimme a bit time please, pretty busy week...
from phpunuhi.
hi there
so i've added the new empty content rule in the latest dev-master
can you see if it works for you?
everything is in the README :)
thank you
from phpunuhi.
Wow, that's very cool!
Thanks @boxblinkracer, for implementing this so fast. 👏
I've tested the different rules with different (wildcard) locales, it works perfectly.
from phpunuhi.
released in 1.17.0
from phpunuhi.
Related Issues (20)
- Wrong shebang in bin script HOT 4
- Support Magento2 as Storage Format HOT 10
- Configure source language for automatic translation
- only export empty translations
- Command to find translation files
- Wildcards for filenames HOT 1
- Placeholders in filenames
- Protect markers HOT 6
- Add JSON Report HOT 1
- Add XML Storage HOT 1
- Automatic Fixing of wrong Case Styles
- Generate reports for commands with changes to storages
- Add line number to validation reports
- Automatically remove unused keys HOT 1
- Duplicate Content check can cause problems in specific languages HOT 4
- Add "basePath" for locale list
- Allow imports of sub configuration files
- Support for MJML scanner HOT 12
- Allow List for some keys and case styles
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 phpunuhi.