• Resolved aurezio

    (@aurezio)


    Hello, I have an issue with the translation files. I translated some of the terms in italian but I still see them in english on the site… I created the .po file but, for example, the “older posts” and “newer posts” buttons are still in english.

    https://www.sognoesondesto.it

Viewing 15 replies - 1 through 15 (of 21 total)
  • Hi there – thanks for the report. I’m asking our developers to have a look at this and will keep you posted here.

    Could you please let me know specifically which additional strings are not being translated, in addition to Older Posts/Newer Posts, and provide links to those pages/posts if they’re visible somewhere other than the homepage? Thanks a lot.

    Hi there, could you please paste the content of your .po file into a Pastebin and link to it here, and do the same with your .mo file? https://pastebin.com/

    Thanks.

    Thread Starter aurezio

    (@aurezio)

    I don’t know how to do that…

    Thread Starter aurezio

    (@aurezio)

    This is the .po file opened with notepad++

    https://pastebin.com/hWkKFfG7

    The .mo file is full of strange characters…

    Howdy!

    I did a quick test and was able to get a PO file to work with Sunspot. You can view the base PO I used here (no translations):
    https://pastebin.com/2fsdCybz

    The biggest difference I noticed was your file is looking in a directory above (../404.php, ../archive.php, etc.) and mine is looking in the same directory (404.php, archive.php, etc.) so I think there is some confusion with the directory structure and the location of the PO file.

    Ensure your file is located in the parent theme’s /languages folder (unless you’ve told it to look somewhere else in your child theme) and, if that fails, try using the above PO file.

    Thread Starter aurezio

    (@aurezio)

    My .po file is already located in the languages folder…

    Anyway, none of the files work. I also noticed that when I translate

    <span class=\”meta-nav\”>←</span> Older posts

    in

    <span class=\”meta-nav\”>←</span> Sogni precedenti

    I get a fatal error from poedit when saving the file…

    So I have to translate it like

    ← Sogni precedenti

    without the span stuff…

    I also tried to delete the source links (the . and the ..) but nothing changed…

    Don’t know what to do at this point. I guess I have to leave them in english…

    <span class=\”meta-nav\”>←</span> Older posts

    <span class=\”meta-nav\”>←</span> Sogni precedenti

    To prevent errors, make sure you’re using straight quotes and not curly quotes. (The code you pasted above uses curly quotes.)

    Silkulix

    (@silkulix)

    Hi,
    I like the sunspot-theme very much but unfortunately I’ve also a problem with the language – precise with the translation.

    I’ve made a textdocument instead of using pastebin – I hope it’s o.k.?
    You can download it from dropbox: https://www.dropbox.com/s/5v7rpz36nz37jas/themes-sunspot-languages-sunspot_pot?dl=0

    The filename shows you the structure of the folders. The real filename is sunspot.pot

    The most strings I’ve translated meanwhile – you can see. But there is no Result or effect to see on my site – it’s still in english: https://www.silkeramik.de/blog/ :'(

    I also tried to use CodeStyling Localization but they send an error-notification like: The Textdomains are not according, there is a problem with the source-file-programming – I should contact the theme-author
    There is a warning too: It seems like in the sourcefiles is a code that was copied and pasted from other Plugins, Themes or Widgets.

    I’ve also another language-file which is located here: wp-content / languages / de_DE.po but you can’t find there “Continue reading…” for example …

    I hope you can help me …
    Greetings
    Silke

    Moderator Kathryn Presner

    (@zoonini)

    Hi Silke – for security reasons I won’t be able to download your Dropbox file, sorry about that.

    Before we start troubleshooting, let me explain the recommended steps to install an Automattic theme in another language and see if you can get your translation working by following these steps:

    1) Create a child theme
    2) Download theme translation (.mo file) from GlotPress. The German version of Sunspot is here: https://translate.wordpress.com/projects/wpcom/themes/sunspot/de/default
    3) Set up child theme’s functions.php to pull in the language file
    4) Upload .mo file and the rest of your child theme files
    5) Activate child theme

    Here is a detailed, step-by-step guide on how to do the above:
    https://www.ads-software.com/support/topic/change-read-text-or-hide-front-page-button-after-posts?replies=6#post-5964621

    Let me know how it goes.

    Silkulix

    (@silkulix)

    Hi Kathryn, thank you very much for your help. I understand, that you can’t download the file.

    I regret to say that it still does not work, so I’ll tell you what I’ve done to follow your steps:
    1. My childtheme is called “sunspotchild” – and it works after aktivating ??
    2. Than I renamed the .mo file in de_DE.mo and put it into a new languages-folder in the sunspotchild-folder
    3. I also have in the sunspotchildfolder a style.css-file:

    /*
    Theme Name: sunspotchild
    Description: Childtheme vom sunspot parenttheme
    Author: Silke Lamla
    Author URI: https://www.silkeramik.de
    Template: sunspot
    Version: 1.0
    Tags:
    */
    @import url("../sunspot/style.css");

    and the functions.php:

    <?php
    add_action( 'after_setup_theme', 'my_child_theme_setup' );
    function my_child_theme_setup() {
        load_child_theme_textdomain( 'sunspotchild', get_stylesheet_directory() . '/languages' );
    }

    But its still in english …
    Can you see the mistake?

    Silkulix

    (@silkulix)

    Maybe if it’s still useful, you can see the sunspot.pot-file in the languages-folder of the parent-theme (without downloading) here: https://pastebin.com/mWJVFsSc

    Moderator Kathryn Presner

    (@zoonini)

    Please change sunspotchild to sunspot in the last line of your function:

    <?php
    add_action( 'after_setup_theme', 'my_child_theme_setup' );
    function my_child_theme_setup() {
        load_child_theme_textdomain( 'sunspot', get_stylesheet_directory() . '/languages' );
    }

    This function must reference the textdomain of the parent theme (sunspot). Let me know how it goes.

    Silkulix

    (@silkulix)

    Huiiii now it works. I can’t believe it :)))
    Thank you very very much Kathryn!
    Cool ??

    Silkulix

    (@silkulix)

    … but there’s still standing “Continue reading” instead of “Weiterlesen” …

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Translation to italian’ is closed to new replies.