GithubHelp home page GithubHelp logo

Improve i18n about glotpress HOT 9 CLOSED

glotpress avatar glotpress commented on June 18, 2024
Improve i18n

from glotpress.

Comments (9)

toolstack avatar toolstack commented on June 18, 2024

PR #101 cleans up _n().

from glotpress.

shield-9 avatar shield-9 commented on June 18, 2024

Some strings in gp-templates/project-permissions.php would be impossible to be translated into some languages. (For example, Japanese.)

from glotpress.

toolstack avatar toolstack commented on June 18, 2024

Could you provide an example of what can't be translated?

Items like the slug, username, login id, etc. aren't translated as they shouldn't be.

from glotpress.

shield-9 avatar shield-9 commented on June 18, 2024

@toolstack: Japanese has quite different sentence structure. In this case, word order is the problem. Here's an example:

  • English: user <a href="{user_nicename}">{user_login}</a> can {action} strings with locale {locale_slug} and slug {set_slug}
  • Japanese: ユーザー <a href="{user_nicename}">{user_login}</a> はロケール {locale_slug} で、スラッグ {set_slug} の文字列を {action} できます

from glotpress.

toolstack avatar toolstack commented on June 18, 2024

@shield-9 take a look at #188, would that work better?

from glotpress.

ramiy avatar ramiy commented on June 18, 2024

See also https://github.com/deliciousbrains/GlotPress/pull/198

Merge similar strings with different variations and avoid using HTML <code> tags in translation strings.

from glotpress.

pedro-mendonca avatar pedro-mendonca commented on June 18, 2024

Hi @ocean90

I have some suggestions to improve i18n.

  • Merge the following Priority labels (have commit):

  • Priority of the original:

  • Priority:

  • Move arrows outside of the following strings and merge similar (have commit):

  • Project actions &darr;

  • Project actions &uarr;

  • Personal project options &darr;

  • Personal project options &uarr;

from glotpress.

pedro-mendonca avatar pedro-mendonca commented on June 18, 2024

Hi @ocean90,
Regarding the above item:

  • Strings like __( 'edit', 'glotpress' ) should get a context: _x( 'edit', 'glossary', 'glotpress' )

Did you mean the __( '(edit)', 'glotpress' ) used for Glossary, Project and Translation set?

There are also these two, that I believe you weren't refering to:
__( 'Edit', 'glotpress' ),
__( 'Delete', 'glotpress' ),

from glotpress.

pedro-mendonca avatar pedro-mendonca commented on June 18, 2024

I'll post here another I18n issue that occurs in many pages:
imagem

The action links aren't separated with a space.
This would be easily fixed as below:
Current code example:
return gp_link_get( gp_url( gp_url_join( '/glossaries', $glossary->id, '-edit' ) ), $text, gp_attrs_add_class( $attrs, 'action edit' ) );

Fix with prepend empty space on add custom text link:
return gp_link_get( gp_url( gp_url_join( '/glossaries', $glossary->id, '-edit' ) ), ' ' . $text, gp_attrs_add_class( $attrs, 'action edit' ) );

from glotpress.

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.