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

Integration for bookmarklet "Press This" #380

Open
alexisju opened this issue Apr 25, 2016 · 13 comments
Open

Integration for bookmarklet "Press This" #380

alexisju opened this issue Apr 25, 2016 · 13 comments

Comments

@alexisju
Copy link

I frequently use the WP bookmarklet (Press this) to publish articles.

However, when i use it, article's language is "not set" and, if i modify the article, the original text will appear the same in all languages.

qtranslatex should be implemented into bookmaklet to avoid that.

Maybe someone could suggest me some trick to let me use Press this with qtranslate as simple (and efficient) as possible.

@johnclause
Copy link
Member

I never used it and do not know how that works. Could you give a list of specific steps to reproduce the problem? Thanks a lot.

@alexisju
Copy link
Author

alexisju commented Apr 27, 2016

Situation : Wordpress + qtranslatex plugin

  • In Wordpress, go to available tools and drag & drop the bookmarlet "Press this" to your browser's toolbar (more info).
  • Visit a website and click on press this button (a popup windows opens)
  • You can directly publish your new article and/or open the standard post editor.

In first case (popup), you will note that there is no language tabs;
In the second case (the standard editor), you will note that all the language tabs are prefilled with the same content.

In both situation the result is the same : using the bookmaklet, there is no (direct) way to edit a post in several languages and (what is most annoying for me) the post a repliated in all configured languages.

@johnclause
Copy link
Member

So, for publishing I do not see a problem, sine you would need to use one language only on sharing message, right? WordPress does not have ability to publish multilingual content.

I could not reproduce the second case, how do you open a standard editor?

@alexisju
Copy link
Author

Not at all! When i use the bookmarklet the language is not set. What mean there is not effect on language management on front end. The same post is displayed in all languages of my website.

I cannot neither choose in wich language i create the post with the bookmaklet.

In the popup, you can choose between publish or open the the current post in the standard editor.

@johnclause
Copy link
Member

I am still confused. Instructions says "Then, when you’re on a page you want to share, simply “press” it." Share where? On WordPress.com? Or will it simply create another post on the same website? I do not want to try pressing "Publish", as I do not wish to publish my testing anywhere.

@johnclause johnclause changed the title Press this (bookmaklet) : languages are not set Integration for bookmarklet "Press This" Apr 27, 2016
@alexisju
Copy link
Author

When you click on the bookmaklet, a popup windows opens. It prefil some information (title, description, source link). When you click on "publish", the post is published on your wordpress website (wordpress.com instance or self hosted wp).

You can find all information here : https://make.wordpress.org/support/user-manual/content/posts/creating-quick-blog-posts-with-press-this/

@johnclause
Copy link
Member

johnclause commented Apr 27, 2016

Ok, this is apparently another quick way to create a new post on the same website. Then this is a matter of integration. I updated list of desirable features, so that we would not forget it, but I do not have time to deal with it right now.

Can anyone take initiative to implement it? I believe it is only a matter of additional JSON configuration, which for testing purposes can be tried via field "Custom Configuration" on page "/wp-admin/options-general.php?page=qtranslate-x#integration". Once it works, we can move it into file i18n-config.json permanently.

@johnclause
Copy link
Member

johnclause commented Apr 27, 2016

I guess, with this code in "Custom Configuration" on page /wp-admin/options-general.php?page=qtranslate-x#integration:

{
    "admin-config": {
        "press-this": {
            "pages": {
                "press-this.php": ""
            },
            "anchors": {
                "pressthis-form": {
                    "where": "before"
                }
            },
            "forms": {
                "pressthis-form": {
                    "fields": {
                        "pressthis": []
                    }
                }
            }
        }
    }
}

it would solve most of your problems. Only title is not multilingual. WordPress came up with a new way of implementing editable field, so more work is needed on this. But I think it is already helpful?

@alexisju
Copy link
Author

Thank you for your help. Indeed, this custom configuration help me even it is not perfect.

Now, i have language tabs displayed into the popup, so I can more easily remove (or translate) content into supposed language.

What still a bit strange is that prefiled content (description/source) is always prefilled in all tabs/languages.

@johnclause
Copy link
Member

Where do you want the prefill to be? It is everywhere, and you are supposed to enter translations of it. Does not it help to have what you translate in front of you? It should be possible to auto-convert it to multilingual text, but this would already require modification of PHP code in order to integrate. Hopefully they put appropriate filters there.

@alexisju
Copy link
Author

When i create a new post into Wordpress backend, the language tab who is opened is always the one i previously used. Ideally the prefilled content could have the same behavior and only fill one tab/language (the last used or default language?), not all.

@johnclause
Copy link
Member

When you create a new post all are "pre-filled" with empty string. Further modifications go into each language separately.

@alexisju
Copy link
Author

Ok i understand. Thank you for your explaination.

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

2 participants