Giter Club home page Giter Club logo

Comments (5)

samikeijonen avatar samikeijonen commented on July 21, 2024

Looks good and seems easier.

from edd-theme-updater.

devinsays avatar devinsays commented on July 21, 2024

4526754 extracts the remaining strings and requires them to be passed when EDD_Theme_Updater_Admin is set up. This allows them to be easily overridden and translated, but I'm also not sure this is the best approach.

Here's the alternate I considered:

Put all the strings into a function that is filtered

When a string is needed, the function is called and filters can be applied by the theme (or plugin).

Questions for this approach:

  • What textdomain should be used for those strings? (pass textdomain as a variable, use unique textdomain, have theme author change textdomain)

Benefits: Most developers will not be changing the strings, so it makes sense not to surface them in theme-updater.php if they're not needed.

This approach can also be combined with approach I'm currently using. Passing the string arguments from theme-updater.php would just be optional.

from edd-theme-updater.

pippinsplugins avatar pippinsplugins commented on July 21, 2024

Text domains should never be passed as variables: http://ottopress.com/2012/internationalization-youre-probably-doing-it-wrong/

I love the idea of strings all being easily accessible.

from edd-theme-updater.

devinsays avatar devinsays commented on July 21, 2024

Do you like them surfaced in the config? https://github.com/devinsays/edd-theme-updater/blob/master/updater/theme-updater.php

Or do you think it would make more sense to bury them in the class (easily overridden + filterable)?

from edd-theme-updater.

devinsays avatar devinsays commented on July 21, 2024

When the .pot file is generated- it doesn't seem to matter what the text domain is set as. Moved the strings back into the class. This is the way I'd prefer to do it as long as long as it doesn't mess up anything for translators. 0455746

from edd-theme-updater.

Related Issues (12)

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.