Skip to content

Show caption in media details #2337

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

Closed
nicolas-raoul opened this issue Jan 23, 2019 · 24 comments
Closed

Show caption in media details #2337

nicolas-raoul opened this issue Jan 23, 2019 · 24 comments

Comments

@nicolas-raoul
Copy link
Member

from Structured Commons.
Show on first line, before title, in user's language or fallback language.

@vanshikaarora
Copy link
Contributor

@nicolas-raoul What is that structured commons you are talking about

@nicolas-raoul
Copy link
Member Author

@vanshikaarora see #2096

@vanshikaarora
Copy link
Contributor

Hey @nicolas-raoul as mentioned by here #2297 (comment). Shall I include the steps from to or should i just change the filename and make it multilingual?

@nicolas-raoul
Copy link
Member Author

@vanshikaarora Can you see the "Captions" section at https://commons.wikimedia.org/wiki/File:R%C3%A9union_publique_de_La_R%C3%A9publique_En_Marche_!_Japon,_avec_le_d%C3%A9put%C3%A9_C%C3%A9dric_Villani_le_jeudi_26_novembre_de_%C3%A0_Akasaka,_Tokyo.jpg ?

The idea is to implement the same section in the app.
Search for this picture in the app, and you will see that captions are not shown.

@vanshikaarora
Copy link
Contributor

Rename the current filename field to "Caption"
Make it multilingual
When uploading, just take the first caption and use it as the filename

@nicolas-raoul So shall I start working upon it this way?

@nicolas-raoul
Copy link
Member Author

No, these instructions are for a different issue (uploading).
The current issue is about the activity when just view a picture within the app.

@vanshikaarora
Copy link
Contributor

So, I can add the field for caption in the UI of that activity.
But from where will I get the caption for the image being viewed?
Shall I add an additional field for caption while uploading the image itself?

@nicolas-raoul
Copy link
Member Author

We don't know either, so you will have to look up Mediawiki documentation. You might have to search for a few hours, good luck!

@vanshikaarora
Copy link
Contributor

OK I'll see the API's currently available

@vanshikaarora
Copy link
Contributor

Hey @nicolas-raoul I have gone through the API's available on the documentation here. For our concern I would this Upload API. OUt of these we can use either if comment or text parameter to send the caption that will be added by user while uploading any image.

Please give me suggestions whether I am working on this correctly or not

@iadeelzafar
Copy link

Hi @vanshikaarora , are you working on this or is it open?

@vanshikaarora
Copy link
Contributor

Hi @iadeelzafar actually I had gone through the documentation and other resources for working on this issue. And was awaiting for suggestions. Well if you can also pitch in some suggestions then it would be great. Or if you already know how to work on this then you can go ahead with this issue:)

@brendajerop
Copy link
Contributor

brendajerop commented Mar 6, 2019

@nicolas-raoul I may have found a way to extract captions:

  1. Get the contents of the page containing the file using MediaWiki API- the response is html
  2. Extract the captions from the html string using Jsoup
    Tried with a test app and it worked
    20190306_183753
    screenshot_2019-03-06-18-33-35_1

@nicolas-raoul
Copy link
Member Author

@brendajerop That's an option in case there is no API :-)

I am pretty sure there must be some kind of API, though... that would be ideal in terms of speed and reliability :-)

@brendajerop
Copy link
Contributor

@nicolas-raoul You're right. There has to be a cleaner way to do this. I'll keep looking

@brendajerop
Copy link
Contributor

brendajerop commented Mar 7, 2019

@nicolas-raoul So I asked here and when I implemented the solution, the response was...
captions_final

@nicolas-raoul
Copy link
Member Author

@brendajerop What is the status on this? :-)

@noahwalugembe
Copy link

Is this still available

@brendajerop
Copy link
Contributor

I don't think this was ever assigned to me so it's open. I was only helping in regards to getting the captions:)

@nicolas-raoul
Copy link
Member Author

@noahwalugembe I suggest you start working on #1107 and then get another issue after #1107 is done :-)

@cypherop
Copy link
Contributor

@nicolas-raoul Shall I pick it up?

@namrata-jha
Copy link

Can I work on this issue please?

@nicolas-raoul
Copy link
Member Author

@sp2710 It is yours, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants