Giter Site home page Giter Site logo

mte90 / glotdict Goto Github PK

View Code? Open in Web Editor NEW
55.0 14.0 24.0 816 KB

This extension for WordPress polyglots implements new features to improve the quality of translation/reviews!

Home Page: https://translate.wordpress.org

License: GNU General Public License v2.0

JavaScript 83.72% Python 2.04% CSS 14.24%
glotpress hotkeys wordpress browser-extension consistency hacktoberfest

glotdict's Introduction

GlotDict

License Codacy Badge

GlotDict extension implements many new features to improve the quality of translation and speed up the process on translate.wordpress.org, where users can translate plugins, themes, WordPress itself and other related projects.

PS: If you are using NoScript or Privacy Badger enable wordpress.org domain or else the extension will not work!

Features

  • Checks for:
    • missing glossary terms
    • missing start capitalization
    • missing start and end space
    • missing end hellip
    • missing end symbols ; . ! : 、。؟ ?
    • straight single ' or double quote " usage
  • Highlights non-breaking-spaces
  • Review translations button to show and count warnings
  • Links Glossary terms to Consistency tool
  • Autoloads Consistency suggestions in the editor
  • Easy insertion of non-translatable items
  • Bulk Actions in the footer
  • Auto-save after "Copy from Original" bulk action.
  • Link and scroll to locale button for the Translation Global Status
  • Right column with quick Approve/Reject/Fuzzy buttons
  • Character and Word counts in Meta panel
  • Localized dates in the Meta panel
  • QuickLinks in Meta menu - open or copy link
  • Optional sticky header
  • Marks older than 6 months strings - black border
  • Notices counts for Approved, Rejected, Fuzzied, Submitted and Selected rows
  • Daily update of the list of locales
  • Anonymous author search filter
  • Dropdown Pagination
  • Custom Style Guide link
  • Many hotkeys and shortcuts

Hotkeys

Action Hotkey
Add Glossary definition in the translation area Right click on a Glossary term
Add non-breaking spaces near symbols Ctrl+Shift+X
Approve Ctrl+Shift+A
Cancel Ctrl+Shift+Z
Copy from original Ctrl+Shift+B
Dismiss validation warnings for the current visible editor Ctrl+D
Dismiss all validation warnings Ctrl+Shift+D
Force suggest or Force save translation Ctrl+Shift+Enter
Fuzzy Ctrl+Shift+F
Load all consistency suggestions Alt+C
Open next string editor Page Down
Open previous string editor Page Up
Reject Ctrl+Shift+R
Suggest or Save translation Ctrl+Enter

Settings

  • Don’t validate strings ending with ..., ., :
  • Don’t validate strings ending with ;.!:、。؟?!
  • Don’t show a warning when the translation doesn't contain an initial uppercase letter when the original string starts with one.
  • Don’t show a warning when the translation is missing a glossary term.
  • Don’t visualize non-breaking-spaces in preview.
  • Hide warning for initial space in translation.
  • Hide warning for trailing space in translation.
  • Show a warning for missing curly apostrophe in preview.
  • Show a warning for using non-typographic quotes in preview (except for HTML attributes quotes).
  • Auto-submit the Copy From Original Bulk Action (Warning: When enabled will submit all originals).
  • Auto-copy original to clipboard on editor opening.
  • Don’t validate strings during "Copy From Original" Bulk Action to bypass validation. (Warning: When enabled will submit originals with Glossary terms or other warnings.)

Download

The pack-ext.py script generate 2 different packages one for Firefox using Manifest V2 and for Chrome Manifest V3.

Spell Checking?

If you are looking for spell checking we recommend Grammarly and LanguageTool as they both provide browser extensions for spelling and grammar checking.

Update times and release

When the developers of the extension think that a new release is ready and tested, they create a new release and publish it on Firefox and Chrome addons stores. Then, we have to wait a few hours for Chrome and Firefox. After that, all installations will be updated automatically.

Additional resources

Videos

Presentations

Contributors

Maintainers

Other contributors

glotdict's People

Contributors

adnan-sait avatar ajoah avatar audrasjb avatar cefm avatar deconf avatar defkon1 avatar dillonkyledev avatar emreerkan avatar epascalc avatar kaskar2008 avatar mte90 avatar nekojonez avatar presskopp avatar sebastienserre avatar sgelob avatar tilak999 avatar vlad-timotei avatar webaxones avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glotdict's Issues

Absent description on how to select the glossary

Hey, several people today at Global WordPress Translation Day asked on how to change glossary, because the default glossary is the first in the list, and everybody see the cyrillic and don’t know how to change. The select field is not so visible and you need to discover it on your own.

Please, add this passage in the description after installation process ;)

Thank you in advance ;)

Source string does not allow multiple translations for string

The JSON files are currently keyed by source string, directly mapped to a single translation. This is too restrictive and not how GlotPress accommodates dictionaries.

For one thing, strings can be translated by part of speech -- noun, verb, adjective, etc. -- and can have different translations in each of those modes. As an example, in Australian English the word license is license (same) when a verb but licence (different) when a noun. You can see these two translations in the GlotPress dictionary but the GlotDict dictionary has lost the noun translation (the useful one).

For another, context can change the required translation and that can be differentiated by the comments for a string. As an example, for Australian English we've added unorganized with two translations (disorganised and unorganised) separated by comments. The GotDict dictionary has lost one.

I propose that the mapping be to an array of translations, like this:

"license": [
    {
        "comment": "",
        "pos": "noun",
        "translation": "licence"
    },
    {
        "comment": "",
        "pos": "verb",
        "translation": "license"
    },
]

That obviously changes things significantly, so I imagine some discussion may be required.

Feature request: multiple translator is english word is both noun and verb

Taking the english word 'archive' as an example, this would become 'archivio' as noun and 'archiviare' as a verb in Italian. So the same English word would exist on 2 different rows.

  • How would the json file need to be changed ? Just add an extra field for each translation called 'PartOfSpeech'? Or would you use the 'pos' field that is currently unused (I think) ?
  • How to change the display ? I would go for 'archivio (noun), archiviare (verb)'
  • How to read more than one translation from the json file?

Thanks, Pascal.

Glossary item comment is unnecessarily annotated

When a glossary item comment contains any word that is a part of the glossary, the word within the comment gets annotated & breaks the layout. See:

translations___japanese___development___glotpress_ _wordpress

In the example above, the term "editor" has this comment: " Editing tool (e.g. visual editor, theme editor, plugin editor)." Since "theme" and "plugin" are also glossary terms, they are causing this issue.

'copy from original' appending whitespace

the link/function 'copy from original' copies the original string into the translations field, but it appends an extra whitespace at the end of the pasted string

Firefox 49.0,
El Capitan 10.11.6

Some strings are not recognized due to the adiacent symbols

For example in the text (in particular featured image).

featured image is not recognized as tring due to the adjacent ). and so is seen like a different string.

Can you make some filters or exceptions for this cases?

Thanks in advance ;)

Add a settings system

The perfect solution is to show that settings modal/sections on translate.wordpress.org.

Settings to add:

  • Change the language

Auto update the glossary

Add a button that download the last glossary.

Roadmap

  • Online service that generate the last glossaries
  • Add in GlotDictJSON support for versioning the glossaries in case of new features
  • Generate the list of language based from the list download
  • Think a cache system for all the different versions of glossaries locally

Make a language choice by default

I'm using fr_FR as a GTE, it will be perfect to have an option to choice it forever in the plugin option page. and if the option is setup to remove the dropdown in the page.

Welsh Glossary

When hovering over the highlighted word it offers a word from another language not Welsh (Turkish? New Post > sonraki yazi)
When you click through the highlighted word it offers the correct Welsh examples.

Could you have a look at the hover over action and link it to the Welsh glossary?
Thanks
Rhos

HTTPS for the server

I am waiting for the certificate https for my domain so the extension will work without problems.

Part of the phrase underlined instead of only a glossary word

Discovered this issue then the entire phrase (or it’s part) is underlined (dotted), instead of only the interested word from the glossary.

For example look at the word sure here: https://translate.wordpress.org/projects/wp-plugins/wp-photo-album-plus/stable/it/default?filters%5Bterm%5D=Nuovo+Album&filters%5Buser_login%5D=&filters%5Bstatus%5D=current_or_waiting_or_fuzzy_or_untranslated&filter=Filter&sort%5Bby%5D=priority&sort%5Bhow%5D=desc

screen shot 2016-05-13 at 12 02 57

Thank you in advance for the fix ;)

form elements need a properly associated label

Would be great for a11y if the text for picking a glossary was a label element with a "for" attribute targeting an id to add on the select :)

<span>Pick the glossary: </span><select class="glotdict_language"></select>

should be

<label for="gd-language-picker">Pick the glossary: </label><select id="gd-language-picker" class="glotdict_language"></select>

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.