Strange language behaviour with photo credits

Anyone else noticed that some text for photo attribution is in the wrong language? On the iPhone everyone has a Spanish attribution, on the website it varies.

For example: image

3 Likes

Not for photo credits, but my iNat randomly flips thru a few European languages.
Then settles back to English.

1 Like

It would be great if you can add some screenshots of this when it happens next, so we can take a look.

Well here is the same issue on phones, if that helps.

seeing similar issue in iOS app with mixed language in the photo credit overlay

1 Like

Heh, I see English for that brown anole photo on our website

But other credits on that page showed in Spanish.

I’ll add it to my report this week.

2 Likes

Interestingly, the website and the app both shows English credits for this species for me. So does green anole. But northern green anole shows in Spanish on the app.

I checked the app again today and Brown Anole is now showing Spanish credits (was Russian before for me I think).

1 Like

On Android those species all show English photo credit translations for me.

On the website it’s all in English as well. Is this issue still happening for anyone?

image

1 Like

At 3 pm ADT today, I was looking at this taxon and was pleased to find one of my photos was used for the default taxon image. However, the attribution text was surprisingly in French, which is not my language. I started to look into this with upupa-epops who wanted to see if it could be confirmed, as a curator, who the person is who last edited photos for this taxon. While he was starting that, I went to display it again within 15 minutes of first spotting the problem, and the attribution text was in English again.

https://www.inaturalist.org/taxa/125165

So if you look at it right now, the attribution texts will be in English. However, here’s a screenshot of the Discord bot embed which shows it in French, which is how it looked at 3 pm:

image

I also confirmed shortly after 3 pm that the attribution was French on the web, and when I looked at the attributions of all default photos for the taxon within the JSON response from the API call, not just my own: they were also all in French at the time.

When, several minutes later, I noticed the switch back to English, all 3 methods of accessing the taxon (bot, web, API call) contained English attribution texts again.

My questions now are:

  1. Is it possible someone else’s locale is accidentally applied when those attribution texts are generated, maybe a curator’s locale, or the person who edited the photos for the taxon?
  2. Is it possible that the act of having a curator look into the matter caused them to revert back to English?
  3. Shouldn’t they always be in English, or at least the locale of the user requesting the taxon from the system? (But neither my browser nor my bot have now, nor have ever been set to a French locale.)

Thanks,
Ben

1 Like

image About last question it’s complicated as I see it, app shows such things on English always, but the browser shows the text in the set language for you. Knowing how discord bots can work sometimes it can be anything.

This is definitely not about my browser language, and not about the bot.

I was able to reproduce the issue just now by visiting the API url with curl:

https://api.inaturalist.org/v1/taxa/125165

This is an excerpt from the result (reformatted with python -m json.tool for legibility):

{
    "total_results": 1,
    "page": 1,
    "per_page": 30,
    "results": [
        {
            "observations_count": 3552,
            "taxon_schemes_count": 2,
            "ancestry": "48460/1/47120/372739/47158/184884/47744/334037/901813/52380/52381",
            "is_active": true,
            "flag_counts": {
                "unresolved": 0,
                "resolved": 0
            },
            "wikipedia_url": "http://en.wikipedia.org/wiki/Eriosomatinae",
            "current_synonymous_taxon_ids": null,
            "iconic_taxon_id": 47158,
            "taxon_photos": [
                {
                    "taxon_id": 125165,
                    "photo": {
                        "flags": [],
                        "type": "LocalPhoto",
                        "url": "https://static.inaturalist.org/photos/54894187/square.jpeg?1571952547",
                        "square_url": "https://static.inaturalist.org/photos/54894187/square.jpeg?1571952547",
                        "native_page_url": "https://www.inaturalist.org/photos/54894187",
                        "native_photo_id": "54894187",
                        "small_url": "https://static.inaturalist.org/photos/54894187/small.jpeg?1571952547",
                        "original_url": "https://static.inaturalist.org/photos/54894187/original.jpeg?1571952547",
                        "attribution": "(c) Ben Armstrong, algunos derechos reservados (CC BY)",
                        "medium_url": "https://static.inaturalist.org/photos/54894187/medium.jpeg?1571952547",
                        "id": 54894187,
                        "license_code": "cc-by",
                        "original_dimensions": {
                            "width": 2048,
                            "height": 1536
                        },
                        "large_url": "https://static.inaturalist.org/photos/54894187/large.jpeg?1571952547"
                    },
...

Today it has “attribution”:“© Ben Armstrong, algunos derechos reservados (CC BY)”. curl does not send any language headers, so the API should not be responding with a random other language.

1 Like

My suspicion, thinking this through, is that the API may actually care about the user language so that it can send back the attribution in their own language, but it may also cache the result, … and so any users asking for the same item may get the cached result from a prior user of a non-English language, seemingly at random! This would continue to happen only until the item expired out of the cache, which is why I saw it eventually revert back to English.

If I’m right, this may not be so easy to fix, as there is likely a performance penalty to too simplistic an implementation of another default behaviour.

One way it could be done for our bot is to build a table into the bot, keyed to license_code, then drop everything in “attribution” after comma and append the English string looked up in the table.

I see in this example: "attribution": "(c) David J. Ringer, todos los derechos reservados", ...,"license_code":null, that with a null license_code, I’m just getting “all rights reserved” (I assume that’s what that translates to).

I’ll do some exploration of the iNaturalist code on github & see if I can just lift the table directly from that to use as my workaround. This won’t help web users, though, who will still randomly see wrong language attribution texts, especially for frequently accessed taxon pages.

3 Likes

Reopened this one and merged a few posts here since it’s still happening. Thanks for pointing it out @benarmstrong!

2 Likes

Please fill out the following sections to the best of your ability, it will help us investigate bugs if we have this information at the outset. Screenshots are especially helpful, so please provide those if you can.

Platform: Android

App version number, if a mobile app issue (shown under Settings or About): 1.24.0

Screenshots of what you are seeing (instructions for taking a screenshot on computers and mobile devices: https://www.take-a-screenshot.org/):




Description of problem (please provide a set of steps we can use to replicate the issue, and make as many as you need.):

Step 1: Open app

Step 2: Open a taxa not seen in the range of English speakers (eg. “Scarabs” would not be applicable but Xenobolus carnifex would)

Step 3: the Rights Reserved is in random languages.

Only occurs in taxa not seen in primarily-English areas.

3 Likes