Opened 14 years ago
Closed 11 years ago
#7491 closed enhancement (fixed)
AboutSystem: clicking on localized license name doesn't open license file
Reported by: | taos | Owned by: | nielx |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Applications/AboutSystem | Version: | R1/Development |
Keywords: | localization | Cc: | adam.s.hartford@… |
Blocked By: | Blocking: | ||
Platform: | All |
Description
Using hrev41319 (gcc2hybrid).
Normally, when clicking on a license name in AboutSystem the corresponding license file is opened - e.g. clicking on "BSD (3-clause)" opens /boot/system/data/licenses/BSD (3-clause) in StyledEdit.
When working with a localized system, a number of license names are translated (BSD (x-clause), MIT (no promotion), etc). Now, AboutSystem still looks for the corresponding (translated) license files but - of course - can't find a match in the license directories because the file names are not localized. A french system would search for "BSD (3-clauses)", a german system for "3-Klausel-BSD" instead of "BSD (3-clause)".
Not localizing the license strings might be an easy workaround. However, it would be nicer if AboutSystem could - as fall-back in case there is no localized file - just open the corresponding not-localized license file.
Attachments (2)
Change History (11)
by , 12 years ago
Attachment: | ticket_7491.patch added |
---|
comment:1 by , 12 years ago
patch: | 0 → 1 |
---|
comment:2 by , 12 years ago
Cc: | added |
---|
comment:3 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → in-progress |
I will review this patch.
comment:4 by , 12 years ago
patch: | 1 → 0 |
---|
comment:5 by , 12 years ago
the patch as it is there will break collecting catkeys. You need to use B_TRANSLATE_NOCOLLECT on the fist one, and use B_TRANSLATE_MARK (or whatever it is called this days) for the licence strings. There should be one macro which marks the string for collecting, but returns it as-is for compilation of the program. Check the headers to make sure.
by , 11 years ago
Attachment: | 0001-AboutSystem-Only-translate-hyperlink-text.-Fixes-749.patch added |
---|
comment:6 by , 11 years ago
patch: | 0 → 1 |
---|
comment:7 by , 11 years ago
I'm not sure if should mark all instances in .SetLicense for translating or not... if it's acceptable as is, I'll push to repo.
comment:8 by , 11 years ago
Yes, I thought so while reviewing the patch. It's safe to not mark all licenses, as B_TRANSLATE will default to english when no translations are found.
I think adding all the licenses to the translation is just cluttering the catalog files, wasting space and annoying the people doing the translations. So, I think we should instead:
- Mark only the licences where there is something to translate ("MIT (no promotion)", but not "MIT").
- Mark only the first occurence of each license. Maybe move them to constants instead of repeating the strings.
Patch to localize license names only, not URLs.