Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n issues #19

Closed
jdevalk opened this issue May 15, 2013 · 3 comments
Closed

i18n issues #19

jdevalk opened this issue May 15, 2013 · 3 comments
Milestone

Comments

@jdevalk
Copy link
Contributor

jdevalk commented May 15, 2013

Got an email from one of our translators (Hassan) who'd gone through the core rather meticulously, please address all these small issues:

  • class-metabox.php
    • The string "Pick the main keyword or keyphrase that this post/page is about.

      Read %sthis post%s for more info." inside the file /admin/class-metabox.php at line 265
    • The three strings for keyword usage check introduced in v1.4.5 in file /admin/class-metabox.php at lines 1232, 1234, and 1236
    • The string "SEO" and the "Check" link text in the Publish metabox both in file /admin/class-metabox.php at line 137
    • The "index" and "noindex" strings in file /admin/class-metabox.php at lines 329 and 330
    • The string "All SEO Scores" of the filter dropdown in file /admin/class-metabox.php at line 775
    • The word "Google+" in the file /admin/class-admin.php at line 307 (Yes, some brand names need to be translated for specific languages, e.g. Arabic)
    • 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")
    • 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.
  • /admin/pages/metas.php
    • The string "Don't show" in the author dropdown in file /admin/pages/metas.php at line 93
  • /admin/pages/xml-sitemaps.php
    • The string "XML Sitemaps" which is the page header in file /admin/pages/xml-sitemaps.php at line 13
  • /admin/pages/rss.php
    • The string "RSS" which is the page header in file /admin/pages/rss.php at line 14
  • /admin/pages/files.php
    • The string "Files" which is the page header in file /admin/pages/files.php at line 46 (btw, I think you should rename that header to "Edit Files" instead , not just "Files"-- so as to match the naming of the page in the admin menu)
  • /admin/pages/import.php
    • The string "Import" which is the page header in file /admin/pages/import.php at line 256 (btw, I think you should rename that header to "Import & Export" instead, not just "Import"-- so as to match the naming of the page in the admin menu)
  • General
    • Not directly related to i18n, but I think you should fix all instances of the string "OpenGraph". I believe the correct name is "Open Graph" <-- without a space. References here and here.
@ghost ghost assigned echoLP May 15, 2013
@echoLP
Copy link
Contributor

echoLP commented May 15, 2013

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.

@jdevalk
Copy link
Contributor Author

jdevalk commented May 16, 2013

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

@senlin
Copy link

senlin commented May 16, 2013

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' );

@echoLP echoLP closed this as completed in c4e3a74 May 16, 2013
barrykooij added a commit that referenced this issue Jan 29, 2014
hansjovis pushed a commit that referenced this issue Nov 21, 2022
Created a landing page in favor of redirecting visitors to a doc
hansjovis pushed a commit that referenced this issue Nov 21, 2022
Content and meta refinements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants