Closed theggs closed 2 months ago
We don't use the values from tmdb for the purpose of localisation. It's handled by @formatjs/react-intl
.
And this is their localised name for that production country.
Here is the code snippet:
I see, it come from JS internal function Intl.DisplayNames.. The translation is fine if standalone. But it is not good to use this translation as 'countries'.
Is there a reason why we don't use the displayname returned by TMDB firstly?
The translation in fine if standalone. But it is not good to use this translation as 'countries'.
It is the translation done by that package. So you should raise an issue with them.
Is there a reason why we don't use the displayname returned by TMDB firstly?
Yes. For localisation.
@Fallenbagel The displayname returned by TMDB is already localized. And it seems already considered the semantic in this situation. Can jellyseerr use it firstly?
@Fallenbagel The displayname returned by TMDB is already localized. And it seems already considered the semantic in this situation. Can jellyseerr use it firstly?
The production name returned by tmdb api is not localised to the display language that is set. It returns the iso code and the display name of that country in english. That is not localised.
As you can see the production country names are in english and this was after requesting for a movie in japanese lang.
below you can see the localised country names when react-intl is used.
Therefore,
you should raise an issue with them. [ react-intl package ]
@Fallenbagel
It is not a Intl.displaynames
issue. React-Intl use JavaScript’s internal function , and the translation is ok in generaral speaking.
While it is not suitable if the context is 'production countries'. Let me give an example to make it easier to understand.
const regionNamesInEnglish = new Intl.DisplayNames(['en'], { type: 'region' });
console.log(regionNamesInEnglish.of('GU'));
> "Guam"
It is true that "GU" stand for "Guam". But it is not suitable to say it is a country. Hong Kong is a special area. It is a special administrative region(SAR). It publishes movies as a standalone region. When in this context, it is called 'Hong Kong SAR, China' -- Just as how TMDB call it.
Hi @theggs I tried to replicate your issue on the latest version (1.9.2) in three different display language: English, Chinese and French. Here is the results:
English:
Chinese:
French:
I can't replicate your issue in these 3 languages, the production country is "Hong Kong SAR, China".
That's strange. I am also running version 1.9.2
I just tested as well.
Develop as well.
That's quite strange. @gauthier-th @Fallenbagel What OS and browser did you guys use?
That's quite strange. @gauthier-th @Fallenbagel What OS and browser did you gus used?
I'm using docker + firefox
That's quite strange. @gauthier-th @Fallenbagel What OS and browser did you gus used?
I'm using docker + firefox
Same thing for me, Docker and Firefox (I tried mobile and desktop)
I can get a good result in MacOS + firefox
It seems a browser used javascript issue. It get different results in different browsers.
Intl.DisplayNames
has a input para style
, which is long
by default.
firefox: style=long
-> 'Hong Kong SAR China'
firefox: style=short
-> 'Hong Kong'
chrome: style=long
-> 'Hong Kong'
chrome: style=short
-> 'Hong Kong'
safari: style=long
-> 'Hong Kong'
safari: style=short
-> 'Hong Kong'
I can get a good result in MacOS + firefox
It seems a browser used javascript issue. It get different results in different browsers.
Intl.DisplayNames
has a input parastyle
, which islong
by default.firefox:
style=long
-> 'Hong Kong SAR China' firefox:style=short
-> 'Hong Kong'chrome:
style=long
-> 'Hong Kong' chrome:style=short
-> 'Hong Kong'safari:
style=long
-> 'Hong Kong' safari:style=short
-> 'Hong Kong'
Good to know. Unfortunately, this means we can't really do anything about it.
yes, and can't expect the brower js engine will fix it quickly. Let me will see what I can do for it when I have time.
Description
In production countries field, value
中国香港特别行政区
is transformed to香港
, which should keep the oriainal value中国香港特别行政区
Version
1.9.2
Steps to Reproduce
简体中文
Screenshots
When viewing the details of movie 'Shaolin Soccer' in language Chinese, we can see the production country is filled with
香港
。While the field in TMDB (https://www.themoviedb.org/movie/11770?language=zh-CN) it is
中国香港特别行政区
。I can see in the browser, Jellyseerr's response of
/movie/{movie_id}
the locale value of the field is中国香港特别行政区
.I don't why it becomes
香港
as the final display of result.It should be
中国香港特别行政区
- the same result of TMDB's information.Logs
No response
Platform
desktop
Device
Macbook Pro 16'
Operating System
MacOS 14.5
Browser
Chrome 125
Additional Context
No response
Code of Conduct