Bug #1025

Camera model names are defined as localized strings, causing automatic defaults to report incorrect names

Added by Thomas Schmidt over 2 years ago. Updated about 2 years ago.

Status:ClosedStart date:15 Jan 2015
Priority:NormalDue date:24 Jan 2015
Assignee:Thomas Schmidt% Done:

100%

Category:translation
Target version:0.25

Description

In src/canonmn.cpp, there are definitions like this:
extern const TagDetails canonModelId[] = {
... { (long int)0x3000000, N_("PowerShot ELPH 500 HS / IXUS 310 HS / IXY 31S") },
...
This means that the localization tools generate an entry in the .pot table for this string, and try to find a default for a specific language.

BUT: This generates a lot of wrong assignments (note the "fuzzy" flag), e.g.

po/pl.po-#: src/canonmn.cpp:218
po/pl.po-#, fuzzy
po/pl.po:msgid "PowerShot ELPH 310 HS / IXUS 230 HS / IXY 600F"
po/pl.po-msgstr "PowerShot S300 / Digital IXUS 300 / IXY Digital 300"
po/pl.po-
--
po/ru.po-#: src/canonmn.cpp:218
po/ru.po-#, fuzzy
po/ru.po:msgid "PowerShot ELPH 310 HS / IXUS 230 HS / IXY 600F"
po/ru.po-msgstr "PowerShot S300 / Digital IXUS 300 / IXY Digital 300"
po/ru.po-
--
po/sk.po-#: src/canonmn.cpp:218
po/sk.po-#, fuzzy
po/sk.po:msgid "PowerShot ELPH 310 HS / IXUS 230 HS / IXY 600F"
po/sk.po-msgstr "PowerShot S300 / Digital IXUS 300 / IXY Digital 300"
po/sk.po-

-> For all languages but the default (i.e. English), many camera models will be reported incorrectly!

=> IMHO there is no reason why these string should be localized. In the code, the N_ should be removed?!

T1025.patch Magnifier (81.4 KB) Thomas Schmidt, 16 Jan 2015 21:45

Associated revisions

Revision 3569
Added by Robin Mills over 2 years ago

#1025. Thank You Thomas for the patch.

Revision 3578
Added by Niels Kristian Bech Jensen over 2 years ago

Fix bug #1025: Only recognize two versions of the Nikon 18-200mm lens (like ExifTool).

History

#1 Updated by Robin Mills over 2 years ago

  • Category set to translation
  • Status changed from New to Assigned
  • Assignee set to Niels Kristian Bech Jensen
  • Target version set to 0.25

I can't think of a reason why those strings should be localised. I've assigned this to Niels to get his opinion. Niels, if you think this should be fixed, can you assign it to Thomas to be fixed? Of you might want to assign it to Andreas to get his opinion. I'll add Andreas as a "watcher" for this issue to be sure he is aware.

#2 Updated by Niels Kristian Bech Jensen over 2 years ago

  • Assignee changed from Niels Kristian Bech Jensen to Thomas Schmidt

Hi Thomas.

Welcome to the team.

I agree that these strings should not be localised. The 'N_(' and ')' must be removed from the strings to fix this. The po files will then be updated automatically during the release process.

Best regards,
Niels Kristian Bech Jensen

#3 Updated by Thomas Schmidt over 2 years ago

  • File T1025.patchMagnifier added
  • Assignee changed from Thomas Schmidt to Robin Mills

Attached is a patch that removes the N_ declaration from strings in .cpp files that should not be localized. When this is not obvious (i.e. not a camera or lens model name, or a simple number like a dimension), the N_ should remain.

#4 Updated by Robin Mills over 2 years ago

Submitted r3569. Thank you Thomas for the patch.

I'm not sure we can readily test the effectiveness of this patch without images from affected devices. However by code inspection it seems safe to be marked as resolved. It has built on the build server and passed the test suite. http://exiv2.dyndns.org:8080/job/Exiv2-trunk/1838/ It's very pleasing to see the .gmo files being regenerated by the build server.

I've discovered today that my submission r3566 in connection with #917 has introduced an error in the test suite. I will mark this issue (#1025) "Resolved" when I fix r3566 tomorrow.

Very good team work by everybody involved in fixing this. Thank You, Gentlemen.

#5 Updated by Niels Kristian Bech Jensen over 2 years ago

Hi Robin.

I have removed the offending lines from bugfixes-test.out with r3577. Tests run clean on my systems now.

Best regards,
Niels Kristian Bech Jensen

#6 Updated by Niels Kristian Bech Jensen over 2 years ago

  • Due date set to 24 Jan 2015
  • Status changed from Assigned to Resolved
  • Assignee changed from Robin Mills to Thomas Schmidt
  • % Done changed from 0 to 100

#7 Updated by Robin Mills over 2 years ago

Thanks very much for dealing with this, Niels. I've checked the build server and all tests pass on all 5 platforms (MSVC/Mac/Linux/Cygwin/MinGW).

http://exiv2.dyndns.org:8080/job/Exiv2-trunk/1845/

Thanks for doing, I had forgotten about this. Resolved. On to the next challenge!

#8 Updated by Andreas Huggel about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF

Redmine Appliance - Powered by TurnKey Linux