Skip to content

Specify language when adding image descriptions #1501

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
VojtechDostal opened this issue May 8, 2018 · 18 comments
Closed

Specify language when adding image descriptions #1501

VojtechDostal opened this issue May 8, 2018 · 18 comments

Comments

@VojtechDostal
Copy link
Collaborator

Descriptions on Wikimedia Commons are usually multilingual. Specifying the language of description is considered important and is basically mandatory in the official Commons uploader. However our app does not currently enable specification of language.

There could be a roll-out menu like I show below:

commons_app_copy_title_desc_button

The technical implementation into resulting Commons pages is then rather simple. The descriptions are encased in language templates like this one (for English description): {{en|PLACEHOLDER TEXT OF DESCRIPTION}}.

If we want, we could even allow users to add several descriptions, in any number of languages. The descriptions are then just added one after another like this: {{en|PLACEHOLDER TEXT OF DESCRIPTION}}{{cs|Another description but now in Czech}}.

@maskaravivek
Copy link
Member

This should be a very quick thing to add. If it provides so much value to our users I am sure we can find an eager contributor who can help us implement it. Both the parts should be easy enough ie specifying the language and allowing users to add several descriptions.

@ashishkumar468
Copy link
Collaborator

Hi @maskaravivek I want to take this up

@maskaravivek
Copy link
Member

Sure, go ahead! Can you share mocks for the screen once you start working on it?

@ashishkumar468
Copy link
Collaborator

Thanks @maskaravivek, Will update you with the mocks as soon as i am done :-)

@maskaravivek
Copy link
Member

@VojtechDostal Can the title also be multiple languages? If that's the case then the language selection drop-down can be common for both title and description.

By default, the drop-down should be showing the phone's language selected by default.

Moreover, a little plus button below the title and description can let the user add it in a different language.

@VojtechDostal
Copy link
Collaborator Author

Sure the title is usually typed in a specific language, but it can also be something like "DFHTTRHTHT.jpg", you can name your pictures like that and there is nothing to stop you (at worst someone will rename it). You cannot provide more than one language variant of the title (currently) because the title is filename at the same time. This may change in future with Structured Commons. But currently there is no way to mark language of title of files in Wikimedia Commons.

@maskaravivek
Copy link
Member

maskaravivek commented May 9, 2018

Great thanks for the clarification @VojtechDostal!

Here's the scope of this task.

  • have a drop-down for selecting the language while entering the description
  • the drop-down should by default have phone's language selected
  • there can be a plus button below the description textbox letting the user add the description in another language
  • once the description is set by the user, it should be updated on commons using the following format.
{{en|1=PLACEHOLDER TEXT OF DESCRIPTION}}{{cs|1=Another description but now in Czech}}

@VojtechDostal
Copy link
Collaborator Author

One small modification. I just realized it should rather be like this:

{{en|1=PLACEHOLDER TEXT OF DESCRIPTION}}{{cs|1=Another description but now in Czech}}

Language template with the "1=" construct is the correct format used by Commons Uploader.

@maskaravivek
Copy link
Member

Thanks @VojtechDostal! Have updated the scope based on your comment. :)

@ashishkumar468
Copy link
Collaborator

ashishkumar468 commented May 12, 2018

@maskaravivek @VojtechDostal Can I conclude, that the requirement is to

  1. Add an option to select the language with the description (which would be defaulted to user's current phone's language)
    2.There would be a plus button below the description, which would add a new row(every time it is clicked), looking the same as above, and finally submit would send a list of descriptions instead of just one (which is the current behaviour), in the format {{en|1=PLACEHOLDER TEXT OF DESCRIPTION}}{{cs|1=Another description but now in Czech}}

@VojtechDostal
Copy link
Collaborator Author

Yes @ashishkumar468 . If the app for any reason fails to load the default language of the system, you can instead insert {{unknown language|1=PLACEHOLDER}}.

@ashishkumar468
Copy link
Collaborator

@VojtechDostal @maskaravivek Cool, will update once done

@ashishkumar468
Copy link
Collaborator

@VojtechDostal @maskaravivek Could you guys point me to some api for image upload, as in from where I could see what all languages are supported and what exactly would be the key used for a language while uplaod

ashishkumar468 added a commit to ashishkumar468/apps-android-commons that referenced this issue May 28, 2018
@VojtechDostal
Copy link
Collaborator Author

Hi @ashishkumar0207 the list of supported languages for these language templates is here:

https://commons.wikimedia.org/wiki/Commons:Language_templates

ashishkumar468 added a commit to ashishkumar468/apps-android-commons that referenced this issue Aug 2, 2018
maskaravivek pushed a commit that referenced this issue Aug 3, 2018
* wip

* Changes for adding descriptions in multipe languages[issue #1501]

* Added callback for the adapter

* Codacy suggested changes

* Sort the languages in the spinner in alphabetical order

* scroll view nested scrolling enabled false

* Nested scrolling enabled false [Allow rv to expand]

* rebased to master, resolved conflicts

* replaced setCompoundDrawables with setCompoundDrawablesWithIntrinsicBounds [the former dint used to work on all devices]

*     replaced setCompoundDrawables with setCompoundDrawablesWithIntrinsicBounds [the former dint used to work on all devices]
ujjwalagrawal17 pushed a commit to ujjwalagrawal17/apps-android-commons that referenced this issue Aug 8, 2018
* wip

* Changes for adding descriptions in multipe languages[issue commons-app#1501]

* Added callback for the adapter

* Codacy suggested changes

* Sort the languages in the spinner in alphabetical order

* scroll view nested scrolling enabled false

* Nested scrolling enabled false [Allow rv to expand]

* rebased to master, resolved conflicts

* replaced setCompoundDrawables with setCompoundDrawablesWithIntrinsicBounds [the former dint used to work on all devices]

*     replaced setCompoundDrawables with setCompoundDrawablesWithIntrinsicBounds [the former dint used to work on all devices]
@Mansi449
Copy link
Contributor

@VojtechDostal @maskaravivek The issue is open. Is there still a bug that needs to be fixed or a feature that needs to be added?

@VojtechDostal
Copy link
Collaborator Author

This is a feature request :-)

@Mansi449
Copy link
Contributor

Yes. I meant, since the issue has not been closed, is there any feature (or part of it) that is left to be implemented?

@misaochan
Copy link
Member

This is implemented in master and should be released in 2.9. :) Thanks all!

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

5 participants