Giter Site home page Giter Site logo

i18n issues about wordpress-seo HOT 3 CLOSED

yoast avatar yoast commented on May 18, 2024
i18n issues

from wordpress-seo.

Comments (3)

echoLP avatar echoLP commented on May 18, 2024

Some outstanding issues:

  • I'm not sure where do these come from, but all the strings in the post edit metabox under the Focus Keyword field where it says "You focus keyword was found in: Article Heading: Yes (1), Page Title: No, etc." <-- all of these are not translatable. Can't find them in the source code.

This is generated via jquery in js/wp-seo-metabox.js at line 90. The server will need to handle this in order for translation to work

  • The three strings for keyword usage check introduced in v1.4.5 in file /admin/class-metabox.php at lines 1232, 1234, and 1236
if ( count( $posts ) == 0 )
    $this->save_score_result( $results, 9, __( "You've never used this focus keyword before, very good." ), 'keyword_overused' );
else if ( count( $posts ) == 1 )
    $this->save_score_result( $results, 6, sprintf( __( 'You\'ve used this focus keyword %1$sonce before%2$s, be sure to make very clear which URL on your site is the most important for this keyword.' ), '<a href="' . admin_url( 'post.php?post=' . $posts[0] . '&action=edit' ) . '">', '</a>' ), 'keyword_overused' );
else
    $this->save_score_result( $results, 1, sprintf( __( 'You\'ve used this focus keyword %3$s%4$d times before%2$s, it\'s probably a good idea to read %1$sthis post on cornerstone content%2$s and improve your keyword strategy.' ), '<a href="http://yoast.com/cornerstone-content-rank/">', '</a>', '<a href="' . admin_url( 'edit.php?seo_kw_filter=' . urlencode( $job['keyword'] ) ) . '">', count( $posts ) ), 'keyword_overused' );

I think this just means changing the namespace from 'keyword_overused' to 'wordpress-seo'

  • The SEO score strings (i.e. bad, poor, etc.) which appear when hovering over the colored circle image in various areas (in Publish metabox, table listings, admin bar). I think the code for those is scattered across a coupe of files? Not sure though, because sometimes they are capitalized (e.g. "Poor") and other times they are just small caps (e.g. "poor")

This is defined in inc/wpseo-non-ajax-functions.php function wpseo_translate_score(). I set the translation string here, but a few of the outputs gets passed to ucfirst afterwards which capitalizes the first letter. Not sure how well ucfirst plays with translated string though.

from wordpress-seo.

jdevalk avatar jdevalk commented on May 18, 2024
  • for the JS strings there is this stuff.
  • "I think this just means changing the namespace from 'keyword_overused' to 'wordpress-seo' " - correct. Please do.
  • Let's make them all capitalized the same way if possible, makes translation easier, and make sure they're translated everywhere.

from wordpress-seo.

senlin avatar senlin commented on May 18, 2024

In the line

$this->save_score_result( $results, 9, __( "You've never used this focus keyword before, very good." ), 'keyword_overused' );

it doesn't look like keyword_overused being the namespace. I think it should be changed into:

$this->save_score_result( $results, 9, __( 'You&#39;ve never used this focus keyword before, very good.', 'wordpress-seo' ), 'keyword_overused' );

from wordpress-seo.

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.