GithubHelp home page GithubHelp logo

Comments (13)

boxblinkracer avatar boxblinkracer commented on August 25, 2024 1

perfect

thanks a lot for the great idea
so i double check on mjml and then release time 🤗

from phpunuhi.

boxblinkracer avatar boxblinkracer commented on August 25, 2024

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.

boxblinkracer avatar boxblinkracer commented on August 25, 2024

im now more wondering why they are intentionally left blank?

from phpunuhi.

boxblinkracer avatar boxblinkracer commented on August 25, 2024

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.

wannevancamp avatar wannevancamp commented on August 25, 2024

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.

boxblinkracer avatar boxblinkracer commented on August 25, 2024

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.

wannevancamp avatar wannevancamp commented on August 25, 2024

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.

boxblinkracer avatar boxblinkracer commented on August 25, 2024

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.

wannevancamp avatar wannevancamp commented on August 25, 2024

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.

boxblinkracer avatar boxblinkracer commented on August 25, 2024

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.

boxblinkracer avatar boxblinkracer commented on August 25, 2024

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.

wannevancamp avatar wannevancamp commented on August 25, 2024

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.

boxblinkracer avatar boxblinkracer commented on August 25, 2024

released in 1.17.0

from phpunuhi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.