Difference between revisions of "Translations"

From Wikidocumentaries
Jump to navigation Jump to search
(How to add a new user interface language to Wikidocumentaries?)
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
Wikidocumentaries is multilingual. The user interface language can be changed to any available language. The UI languages are translated in TranslateWiki.net.
+
Wikidocumentaries is multilingual. The user interface language can be changed to any available language on Wikimedia projects.
  
It is also possible to view only the article in another language. The article language menu will display the user's available languages and a link to all available languages. See [[Article]].
+
==Translations==
* If the topic exists in Wikidata, the articles generally exist in different language Wikipedias.
+
* The item information comes from Wikidata, and the translations are managed there.
* If the topic exists in Wikidocumentaries, the articles generally exist in Wikidocumentaries.
+
* The article comes from that language Wikipedia, and it is edited there.
dispo displays Wikipedia articles Interface and content language can be changed in the main menu.
+
* The UI is translated to any of the languages in [https://translatewiki.net/wiki/Translating:Wikidocumentaries TranslateWiki].
 +
 
 +
==UI languages==
 +
* The default user interface language is the browser language.
 +
* The user may change the interface language of the site to another language, if it has been translated to that language.
 +
* The language menu displays the available languages in alphabetical order. Later, custom language fallback order will be made possible.
 +
* Even if the UI is not translated to a language, it is still possible to navigate using the language code in the site URL. For example https://wikidocumentaries-demo.wmflabs.org/Q32815?language=dag.
 +
* The menu is created in [https://github.com/Wikidocumentaries/wikidocumentaries-ui/blob/master/src/components/menu/UILanguageMenu.vue UILanguageMenu.vue].
 +
* English is used as the ultimate fallback option.
 +
 
 +
===How to add a new user interface language to Wikidocumentaries?===
 +
* Navigate to [https://translatewiki.net/wiki/Translating:Wikidocumentaries TranslateWiki].
 +
* Sign up.
 +
* Select your language and start translating missing messages or checking existing ones.
 +
 
 +
===Process===
 +
* The UI language must have at least 25% translated messages to be imported to the project.
 +
* TranslateWiki sends translated files to Wikidocumentaries twice a week. The json translation files are put together in wikidocumentaries-ui/src/store/messages.js. A new language is not automatically added to Wikidocumentaries. Please alert about new language translations by emailing wikidocumentaries@gmail.com.
  
[[File:Wikipedia Other languages.png]]
+
==Language fallback==
 +
Wikidata language fallback is [https://meta.wikimedia.org/wiki/Wikidata/Notes/Language_fallback described here]. Can that be utilized?
  
==Languages used==
+
===Language fallback mechanisms===
 +
Language fallback is handled differently in different cases. The MediaWiki API uses one mechanism and the SPARQL queries use another. Different components are based on different queries.
  
===User Interface language===
+
====MediWiki API====
* The UI language must be one of the available translated UI languages.
+
* Topic title and description
* The default language is the browser language.
+
* Map labels
* The user may change the interface language of the site to a supported interface language.
+
* Wikidata component values
** The interface languages are translated in [https://translatewiki.net/wiki/Translating:Wikidocumentaries TranslateWiki].
+
 
* The language menu displays the the available languages in the order of the user's language fallback chain. Last item in the list displays all languages. An extra option could link to adding/editing translations.
+
====SPARQL query====
* The menu is created in [https://github.com/Wikidocumentaries/wikidocumentaries-ui/blob/master/src/components/menu/UILanguageMenu.vue UILanguageMenu.vue].
+
These use SPARQL, and the fallback chain is declared in each query.
* English is used as the ultimate fallback option.
+
* The works, locations, related people and depicted in.
  
===Language fallback chain for topic title and description, map labels, Wikidata entries===
+
===Fallback chain guideline===
* The topic title and description are returned from Wikidata.
+
The desired display language is based on the following fallback chain.
* The language fallback is based on the following fallback chain.
+
# UI language (English default, user-defined.)
# UI language
 
 
# Topic's original language (how?)
 
# Topic's original language (how?)
 
# Best option in the user-defined language fallback chain. The fallback chain is initially a hard-coded list of languages. Later on, the user may construct this list.
 
# Best option in the user-defined language fallback chain. The fallback chain is initially a hard-coded list of languages. Later on, the user may construct this list.
Line 29: Line 47:
  
 
===Article===
 
===Article===
* The user may decide to show a single article in a chosen language.
+
* The article is primarily displayed in the UI language
* The language switch menu displays the available articles ordered by the user's language fallback chain
+
* If the article does not exist in the UI language
 +
*# a message to select another language is displayed.
 +
*# Alternatively, the article can be displayed in the best available language option of the language fallback chain.
 +
*# It is possible to create article generators that create stub articles from recorded facts.
 +
* The article language menu displays a list of available article languages. The list is scrollable and displays all available languages in the following order.
 +
*# Available languages in the order of the user-defined language fallback chain. The fallback chain is initially a hard-coded list of languages. Later on, the user may construct this list.
 +
*# English
 +
*# Any language ordered by...
 
* The menu is created in [https://github.com/Wikidocumentaries/wikidocumentaries-ui/blob/master/src/components/menu/ArticleLanguageMenu.vue ArticleLanguageMenu.vue].
 
* The menu is created in [https://github.com/Wikidocumentaries/wikidocumentaries-ui/blob/master/src/components/menu/ArticleLanguageMenu.vue ArticleLanguageMenu.vue].
* The menu shows 5 best language options for the article and the remaining ones behind a single option.
 
  
 
===Search conditions===
 
===Search conditions===
 +
See also other search conditions in the [[Images]] page.
 
* The topic title is used to search for images
 
* The topic title is used to search for images
* Additional properties and aliases may be used also
+
* Additional labels in different languages, properties and aliases may be used also
* The topic title is used to show a nearby place on the map
+
** Labels and aliases in primary languages
 
+
** Also use values of name properties if available.
==Translations==
+
* The primary language for the search term is chosen based on  
* Translations are managed in [https://translatewiki.net/wiki/Translating:Wikidocumentaries TranslateWiki]. It produces json-files in all included languages
+
** API service's preferred language(s)
* The json files are put together in wikidocumentaries-ui/src/store/messages.js.
 
 
 
==Fallback logic==
 
 
 
===Article language menu===
 
* The article is displayed in the UI language
 
* If the article does not exist in the UI language, a message to select another language is displayed. Alternatively, the article can be displayed in the best available language option.
 
* The language menu displays a list of available article languages in the following order. 5 best options are displayed, and the rest can be reviewed by clicking on the last item on the list.
 
*# Best option in the user-defined language fallback chain. The fallback chain is initially a hard-coded list of languages. Later on, the user may construct this list.
 
*# English
 
*# Any language ordered by...
 
 
 
===Search term for images===
 
* Topic title and aliases
 
** API service's preferred language
 
 
** Topic's original language (how is this reasoned?)
 
** Topic's original language (how is this reasoned?)
 
** English
 
** English
 +
 +
==Top language-related issues to fix==
 +
* RTL support in the UI, T255530
  
 
{{design-nav}}
 
{{design-nav}}

Latest revision as of 12:31, 7 November 2021

Wikidocumentaries is multilingual. The user interface language can be changed to any available language on Wikimedia projects.

Translations

  • The item information comes from Wikidata, and the translations are managed there.
  • The article comes from that language Wikipedia, and it is edited there.
  • The UI is translated to any of the languages in TranslateWiki.

UI languages

  • The default user interface language is the browser language.
  • The user may change the interface language of the site to another language, if it has been translated to that language.
  • The language menu displays the available languages in alphabetical order. Later, custom language fallback order will be made possible.
  • Even if the UI is not translated to a language, it is still possible to navigate using the language code in the site URL. For example https://wikidocumentaries-demo.wmflabs.org/Q32815?language=dag.
  • The menu is created in UILanguageMenu.vue.
  • English is used as the ultimate fallback option.

How to add a new user interface language to Wikidocumentaries?

  • Navigate to TranslateWiki.
  • Sign up.
  • Select your language and start translating missing messages or checking existing ones.

Process

  • The UI language must have at least 25% translated messages to be imported to the project.
  • TranslateWiki sends translated files to Wikidocumentaries twice a week. The json translation files are put together in wikidocumentaries-ui/src/store/messages.js. A new language is not automatically added to Wikidocumentaries. Please alert about new language translations by emailing wikidocumentaries@gmail.com.

Language fallback

Wikidata language fallback is described here. Can that be utilized?

Language fallback mechanisms

Language fallback is handled differently in different cases. The MediaWiki API uses one mechanism and the SPARQL queries use another. Different components are based on different queries.

MediWiki API

  • Topic title and description
  • Map labels
  • Wikidata component values

SPARQL query

These use SPARQL, and the fallback chain is declared in each query.

  • The works, locations, related people and depicted in.

Fallback chain guideline

The desired display language is based on the following fallback chain.

  1. UI language (English default, user-defined.)
  2. Topic's original language (how?)
  3. Best option in the user-defined language fallback chain. The fallback chain is initially a hard-coded list of languages. Later on, the user may construct this list.
  4. English
  5. Any language ordered by...

Article

  • The article is primarily displayed in the UI language
  • If the article does not exist in the UI language
    1. a message to select another language is displayed.
    2. Alternatively, the article can be displayed in the best available language option of the language fallback chain.
    3. It is possible to create article generators that create stub articles from recorded facts.
  • The article language menu displays a list of available article languages. The list is scrollable and displays all available languages in the following order.
    1. Available languages in the order of the user-defined language fallback chain. The fallback chain is initially a hard-coded list of languages. Later on, the user may construct this list.
    2. English
    3. Any language ordered by...
  • The menu is created in ArticleLanguageMenu.vue.

Search conditions

See also other search conditions in the Images page.

  • The topic title is used to search for images
  • Additional labels in different languages, properties and aliases may be used also
    • Labels and aliases in primary languages
    • Also use values of name properties if available.
  • The primary language for the search term is chosen based on
    • API service's preferred language(s)
    • Topic's original language (how is this reasoned?)
    • English

Top language-related issues to fix

  • RTL support in the UI, T255530


Navigation

About Technology Design Content modules Tool pages Projects
Status

Wikidocumentaries blog

Wikidocumentaries demo

Phabricator project

Facebook group

GitHub repository

Translation in TranslateWiki

Wikidocumentaries Slack

Setting up dev environment

Resources

Translations

Languages

Using Wikibase

Federation with Wikidata

APIs

Linking

Media metadata

Properties to content

User registration

Licensing

Page types

Landing page

Search page

Topic page

User page

Organisation page

Project page

Tool page

Tasks

Components

Main toolbar and footer

Search

Faceting

Topic page header

Content module

Dropdown

Modal

Icons

Active modules

Article

Family tree

Gallery

Historical map

Images

Image viewer

Infobox

Map

Module ideas

Audio/Video

Bibliography

Correspondence

Discussion

Graph

Name

Newspaper articles

Testimonials

Timeline

Visualizations

Wikidocumentary

3D

Visual editor

Query tool

QuickStatements

Open Refine

Creating topics

Uploading images

Geolocating tool

Metadata editor

Rectifying maps

Transcription

Annotation tool

Central Park Archives

Convent Quarter

Wikisource