opencaching/okapi

Cache attribute in native language returned by OKAPI

bekuno opened this issue · 5 comments

see cgeo/cgeo#7671

The result from the okapi call for cache OR00C1 gives 4 attributes, one of them in german (native language here).
Is this a okapi error, or an error in the OR database ore something other problem?

ocrstro_attributes

"Unauffällig vorgehen" actually is the only OKAPI attribute name in the screenshot. The other three do not exist in OKAPI and must have been produced by c:geo.

The services/caches/geocache(s) methods do not return attribute names, but just A-codes. How does c:geo map those A-codes to names?

OR00C1 has the A-codes A39, A42, A71 and A74. When I request the names for that via OKAPI

https://www.opencaching.ro/okapi/services/attrs/attributes?consumer_key=xxx&acodes=A39|A42|A71|A72

I get this output:

{
    "A39": {
        "name": "Available 24/7"
    },
    "A42": {
        "name": "Recommended at night"
    },
    "A71": {
        "name": "Suitable for children (10-12 years)"
    },
    "A72": {
        "name": "Reverse Cache"
    }
}

The A74 was the "problematic" attribute. Does okapi gives the result also in native language?

I found the solution in c:geo - the acode 74 was not mapped in the internal configuration.

You can use the langpref argument to chose the language of Attribute names returned by OKAPI. Romanian however is not fully translated, so you may receive a mixture of Romanian and English.

Yes, the langpref argument was set for the okapi call.