• Resolved moduca

    (@moduca)


    Great plugin, but I think you should not translate the suggested classes for widget.

    Now I take a look of the code the last widget have a “widget-último” class, in english there is not problem becuase it would be last-widget class, but in spanish it add special characters, so we have incorrect html inside our website.

    I am wondering what will happen if I have a multi language wp? will it translate the classes too?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @moduca

    Thanks for your report. I’m relatively new as a contributor to this plugin but did see this part of the code which I also thought was weird.

    I will discuss this with the main dev and come up with a fix for this. I can’t just remove the translation code since with 90k users there are most probably some sites that are using it.

    I am wondering what will happen if I have a multi language wp? will it translate the classes too?

    Yep, with the current code these classes will be different for other languages.

    To help you now, there are 3 options:

    1. Use the plugin filters to fore force your own choice of classes. Click here for an example
    2. If you are comfortable with PHP I can show you the changes and you are good to go. I promise the next release will feature the fix so don’t worry about update overwrites.
    3. There is a plugin “Loco Translate” which lets you change the translation files. You could remove the translations with that plugin until the next update gets out.

    Hope this helps!

    Cheers, Jory

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @moduca,

    Forgot to give you an update.

    Your issue has been fixed on your GitHub repository development branch.
    https://github.com/cleverness/widget-css-classes/tree/dev

    Click here for the Pull Request: https://github.com/cleverness/widget-css-classes/pull/30

    I’ve made it optional to translate those classes so you can turn it off/on yourself.
    This patch will be in the next release (1.5.2)

    Regards, Jory

    Plugin Author Jory Hogeveen

    (@keraweb)

    I’d like to elaborate on the widget-último selector.
    While this is very uncommon, it is actually not an invalid CSS selector.
    You can target it with CSS using .widget-\último. Note the \ for special characters.

    More info here: https://stackoverflow.com/questions/448981/which-characters-are-valid-in-css-class-names-selectors

    • This reply was modified 7 years, 6 months ago by Jory Hogeveen.
    Thread Starter moduca

    (@moduca)

    Thank you for all your responses! I will test it.

    sorry not replay before.

    Regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Plugin Spanish translation’ is closed to new replies.