Apps-android-commons: Specify language when adding image descriptions

Created on 8 May 2018  路  18Comments  路  Source: commons-app/apps-android-commons

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}}.

assigned enhancement good first issue

Most helpful comment

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.

All 18 comments

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.

Hi @maskaravivek I want to take this up

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

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

@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.

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.

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}}

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.

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

@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}}

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}}.

@VojtechDostal @maskaravivek Cool, will update once done

@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

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

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

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

This is a feature request :-)

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

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

Was this page helpful?
0 / 5 - 0 ratings