I sometimes edit Wiki pages, mostly
Value:foo=bar. Do you think it’s possible to query Wiki API to get:
list of pages translated to most languages, but not translated to my language (PL)?
List of languages is available at Data Item pages.
I found query service (is it correct one?) but I don’t know how to use it. Can someone provide some resources on that?
If you are mostly interested in Key and Tag pages, you can have a look at taginfo. This report shows all Key pages from the wiki and in which languages they are available. There is nothing for the Tag pages, though. But you can download the SQLite database that taginfo creates from the wiki and query that. There is no documentation for the contents of those databases, but you should be able to find your way around it if you have some experience with SQL. To find all Key pages without polish translation, you can do
select * from wikipages_keys where langs not like '%pl%';
for instance. Similar for the
The ubiquitous Language template adds the English article to tracking categories for languages that lack translations of the article. Unfortunately, for performance reasons, this template can only support the handful of languages that have dedicated legacy namespaces. Like many languages, Polish does not have a legacy namespace, so the Polish tracking category is nearly empty.
A MediaWiki extension called WikibaseCirrusSearch would enable the wiki’s built-in search engine to find data items by whether they have or don’t have a description or linked article in a particular language. This discussion includes some examples, which would hook into the
generator=search API endpoint. Unfortunately, the OSM Wiki doesn’t have the WikibaseCirrusSearch extension installed, and my request to install it has gotten no response so far.
Sophox is designed to query OSM data, OSM Wiki data items, and taginfo-like usage statistics with the ability to cross-reference Wikidata, Wikipedia, and other linked data sources. For example, this SPARQL query finds the data items for the most common keys and tags that lack a description in Russian. It can be tweaked to search by documentation wiki pages (P31) instead. Unfortunately, the public instance of Sophox started returning very incomplete OSM results back in 2021, and this problem began affecting data items as well last year. You’d have to stand up your own Sophox instance to make use of this tool.
In the meantime, if you’re OK with some false positives and false negatives, you can perform a full-text search of the Item: namespace for pages that link to key (Q7) or tag (Q2) but lack the word “pl” in the article text. Then you can translate this query into an API query. This query relies on a quirk of how Wikibase stores items in the search index, combined with the convention of storing the key=value identifier as the item’s English label. It also relies on the fact that the ISO 639 code for Polish,
pl, is not a common word that’s relevant to OSM in any of the languages that the OSM Wiki is written in.