cgeo/cgeo

Missing attribute symbol for OR00C1 (from oc.ro)

Closed this issue · 14 comments

Describe the bug:
When re-checking #4350 I observed, that now all four attributes fro OR00C1 are returned through OKAPI, but one of them (text representation in german: unauffällig vorgehen) shows a placeholder symbol (I would have expected the symbol for 'stealth required').

To Reproduce:
Download details for OR00C1

Version of c:geo used:
developer build based on 4951bdc

Is the problem reproducible:
Yes

System information:

--- System information ---
Device: E6653 (E6653, Sony)
Android version: 7.1.1
Android build: 32.4.A.1.54
c:geo version: 2019.06.09
Google Play services: disabled - 17.1.22 (040408-245988633)
Low power mode: inactive
Compass capabilities: yes
Rotation vector sensor: present
Orientation sensor: present
Magnetometer & Accelerometer sensor: present
Direction sensor used: rotation vector
Hide own/found: true
HW acceleration: enabled (default state)
System language: de_DE
System date format: dd.MM.yy
Debug mode active: yes
System internal c:geo dir: /data/user/0/cgeo.geocaching (2,8 GB free) internal
User storage c:geo dir: /storage/emulated/0/cgeo (2,8 GB free) external non-removable
Geocache data: /storage/0000-0000/Android/data/cgeo.geocaching/files/GeocacheData (9,9 GB free) external removable
Database: /data/user/0/cgeo.geocaching/databases/data (120,2 MB) on system internal storage
Fine location permission: granted
Write external storage permission: granted
Geocaching sites enabled:
   geocaching.com: Logged in (Anmeldung OK) / BASIC
   opencaching.de: Logged in (Anmeldung OK)
   opencaching.us: Logged in (Anmeldung OK)
Geocaching.com date format: yyyy-MM-dd
Installed c:geo plugins: contacts
--- End of system information ---

Attributes to be updated on OCPL-code based sites. See here:
opencaching/opencaching-pl#1251

See documentation here: https://wiki.opencaching.eu/index.php?title=Cache_attributes

Further attribute changes to follow on at least OCRO, OCUK, OCNL, OCUS. (this includes adding/removing attributes on per site basis. All changes according to documentation mentioned above).
OKAPI will be updated in due time.

OCUS to change from very old code to current opencaching-pl code by july 1st. (including hosting change)

We were to notify third party app developers once the changes were properly verified.

Note: a new copy of attribute-definitions.xml will be necessary and keep an eye on that file as further work is to follow soon.

I would like to contribute attribute images for missing OC attributes at c:geo.
What guidelines are there to follow?

I suppose the problem is on an other point.
I got (in the debugger) the following attributes:

  • available
  • Unauffällig vorgehen
  • kids
  • night
    ocro_attributes

The value "Unauffällig vorgehen" as native language result make no sense here.
The correct attribute should be stealth.
See in cgeo: cgeo.geocaching.enumerations.CacheAttribute

I would like to contribute attribute images for missing OC attributes at c:geo.
What guidelines are there to follow?

The images need to be available under a Apache 2.0 compatible license and we prefer vectors. On the contributors page you can find some sources we used in the past. Sources requiring attribution should be mentioned there. The style should fit with the existing ones.

@bekuno: The attribute value you see here is likely the string returned by the OKAPI. IIRC we use that in case we don't recognize the attribute.
There is some tooling to generate the glue between the OKAPI attributes and our internal representation but it has been quite a while since I worked with this the last time.

@rsudev I did not find the string "Unauffällig vorgehen" in the c:geo code. Therefore, this value should have been returned by OKAPI. I don't think that's what it's supposed to be.

In
https://wiki.opencaching.eu/index.php?title=Cache_attributes
is the Stealth attribute defines as

ID text_short PL text_long PL id DE gc_id DE icon DE name DE gc_inc DE ACODE
40 Stealth Stealth required           A74

The acode 74 is not supported in our CacheAttribute.
The STEALTH attribute has ocacode -1.

With the mapping acode 74 to ID 40 the icon for Stealth is now ok.
I will create a PR to resolve the mappings for alredy defined attributes by adding the acodes.

@andrixnet We need at least new icons for Acode 75 and up.

@bekuno displaying the string from the api for attributes unknown to us is the expected fall-back mechanism I had implemented. I am a bit surprised that this attribute is not mapped already.

As the top of the page https://wiki.opencaching.eu/index.php?title=Cache_attributes says, this documentation is the next representation of attributes due to enter production soon.
Some internal IDs have changed, a few ACODES have been corrected and a good number of ACODES have been added.
All the IDs described are not yet deployed, see opencaching/okapi#591 and opencaching/opencaching-pl#2069

I do want to contribute to c:geo the necessary data to support the new attributes as soon as possible, hence my question #7671 (comment)
Thanks @rsudev for your answer #7671 (comment)

I shall strive to prepare the necessary data before the end of next week.

@rsudev
the OC mapping table and the c:geo CacheAttributes are not aligned on some attributes.
These are

  • GC 11 - OC 22
    WADING(11, -1, "wading", R.drawable.attribute_wading, R.string.attribute_wading_yes, R.string.attribute_wading_no),
    SWAMP(-1, 22, "swamp", R.drawable.attribute_swamp, R.string.attribute_swamp_yes, R.string.attribute_swamp_no),

  • GC10 - OC24
    CLIMBING(10, -1, "climbing", R.drawable.attribute_climbing, R.string.attribute_climbing_yes, R.string.attribute_climbing_no),
    EASY_CLIMBING(-1, 24, "easy_climbing", R.drawable.attribute_easy_climbing, R.string.attribute_easy_climbing_yes, R.string.attribute_easy_climbing_no),

  • GC 15 - OC 47
    WINTER(15, -1, "winter", R.drawable.attribute_winter, R.string.attribute_winter_yes, R.string.attribute_winter_no),
    SNOW_PROOF(-1, 47, "snow_proof", R.drawable.attribute_snow_proof, R.string.attribute_snow_proof_yes, R.string.attribute_snow_proof_no),

  • GC 47 - OC 15
    FIELD_PUZZLE(47, -1, "field_puzzle", R.drawable.attribute_field_puzzle, R.string.attribute_field_puzzle_yes, R.string.attribute_field_puzzle_no),
    PUZZLE(-1, 15, "puzzle", R.drawable.attribute_puzzle, R.string.attribute_puzzle_yes, R.string.attribute_puzzle_no),

Should we follow the OC mapping?

I do want to contribute to c:geo the necessary data to support the new attributes as soon as possible, hence my question #7671 (comment)
Thanks @rsudev for your answer #7671 (comment)

Thank you for your commitment.
I have created a new Issue #7705 for the new OC attribute implementation.
Please use this now as reference.

fixed by PR #7701
(don't know why automatic close did not work)