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

Add support to filter by tag #10

Open
extmkv opened this issue Jun 29, 2019 · 16 comments
Open

Add support to filter by tag #10

extmkv opened this issue Jun 29, 2019 · 16 comments
Labels
enhancement New feature or request

Comments

@extmkv
Copy link

extmkv commented Jun 29, 2019

Currently, I'm using the gradle-poeditor-plugin in one of my android multi module project and in that project I've strings in several modules. In POEditor all strings have a specific tag, that tag is the name of the module where the string is inside.
So, I was checking the POEditor API 2.0 and in the export endpoint it's possible to filter by tag.

Example of the curl request:

     -d api_token=$TOKEN \
     -d tags="library" \
     -d id=$PROJECT_ID" \
     -d language="en" \
     -d type="android_strings"

So the ideia is to add a new field to the trans called tags:
Example:

trans type: 'android_strings', file: 'library/src/main/res/values/strings.xml', tags:["library"]

@jansauer
Copy link
Owner

jansauer commented Jul 2, 2019

Hey @extmkv; thx for input. I like the idea and the resulting possibilities.
I started looking into implementing this but did not find the api parameter you mentioned.
Screenshot 2019-07-02 at 18 57 51
As far as i kenn tell the v2 export endpoint does not have a tags argument 🤔
v1 seams to heave this.

@jansauer jansauer added the enhancement New feature or request label Jul 2, 2019
@extmkv
Copy link
Author

extmkv commented Jul 2, 2019

They don't have the tags in the documentation for v2 but I already have tested and works fine ;)

@extmkv
Copy link
Author

extmkv commented Jul 3, 2019

@jansauer I'm adding here the full curl request:

curl -X POST https://api.poeditor.com/v2/projects/export \ -d api_token=$TOKEN \ -d tags="library" \ -d id=$ID \ -d language="en" \ -d type="android_strings"

Tested and works fine.

@jzeferino
Copy link

Also needed this improvement in the past would be fine to have this.

@extmkv
Copy link
Author

extmkv commented Jul 30, 2019

any news @jansauer ?

@c-b-h
Copy link

c-b-h commented Aug 30, 2019

This enhancement is a must for multi-module-projects.

Also both our mobile teams (iOS and Android) share the same set of localized strings and tagging is a way we plan to differentiate strings that are specific for each platform.

I really hope this enhancement is included soon as to not resort to fastlane or similar scripts. You would make my work a lot easier if this is included and if weren't for a fact that I have never managed to correctly build a forked gradle project I would have added it my self.🙏

@c-b-h
Copy link

c-b-h commented Aug 30, 2019

@extmkv I just noticed that you have forked this project. Have you managed to include this enhancement in your fork?

@extmkv
Copy link
Author

extmkv commented Aug 30, 2019

@c-b-h yes I've forked this project, but I don't have so much time to code this improvement. I don't have any idea if @jansauer or someone else is planning to do it or not...

@extmkv
Copy link
Author

extmkv commented Sep 5, 2019

@jansauer @c-b-h any update on this?

@c-b-h
Copy link

c-b-h commented Sep 11, 2019

@extmkv, @jansauer

I created a pull request for this change and it works.

#17

@extmkv
Copy link
Author

extmkv commented Sep 11, 2019

Thank you so much @c-b-h !

@extmkv
Copy link
Author

extmkv commented Sep 20, 2019

@c-b-h I was checking and we're not sending the tags when creating the terms.
Imagine the following scenario, I add a new string into the project and when I run the task to upload the terms don't contain the tag.

Screenshot-2019-09-20-at-10-29-01.png

@c-b-h
Copy link

c-b-h commented Sep 20, 2019

How would you, in the string.xml-file, tag an entry? I didn't know it was possible to let POEditor know that a certain XML-entry has a tag therefore I haven't implemented a way of pushing the tags either.

@c-b-h
Copy link

c-b-h commented Sep 23, 2019

@extmkv ^^

@extmkv
Copy link
Author

extmkv commented Sep 25, 2019

@c-b-h Please take a look on the following screenshot

Screenshot 2019-09-25 at 17 38 07

So, it's possible to send also tags to the terms and everytime when we push the terms they will have the specific tags.

More info:

@extmkv
Copy link
Author

extmkv commented Sep 25, 2019

I've created a PR to support tags on pushing terms #18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants