Repository navigation
[ios, macos] Update the attribution format for small snapshots. - #10456
Conversation
e23d217 to
90f6cc7
Compare
|
What changed in mapbox.pdf, other than downgrading from PDF version 1.5 to 1.4? Also, helmet.pdf appears to be slightly off-center. |
|
I didn't realize mapbox.pdf was changed. I only opened in Xcode. The helmet is an image I made to test. I need the design team give me the right version. |
d8413c5 to
f25bb65
Compare
|
@1ec5 do you think this is OK to go on the final version? |
There was a problem hiding this comment.
It’s a bit confusing that an array of attribution options is called attributionOptions, as though it were only a single MGLSnapshotAttributionOptions object.
There was a problem hiding this comment.
Can you think of a way to defer the logoImage logic above until we know which size to use, so that we don’t have to put together three MGLSnapshotAttributionOptions objects?
There was a problem hiding this comment.
What do you mean? Each of these attribution options represent a rule as in #10423 (comment) which I use to get the best size.
There was a problem hiding this comment.
Currently, we precompute the attribution styles before selecting the most appropriate one. My suggestion was to figure out which style would be most appropriate before loading the relevant resources, like the logo, since we ultimately only care about one of the styles. That way, the attributionOptions array becomes unnecessary.
There was a problem hiding this comment.
We’re in a hurry to get v3.7.0 out the door, so I’ve outlined the refactor that needs to take place for v3.7.1 in #10490.
There was a problem hiding this comment.
Make these strings localizable, in case one of the localizations translates “OpenStreetMap” and “OSM” into a different script (as Chinese and Japanese probably should).
f25bb65 to
ab8203a
Compare
There was a problem hiding this comment.
The string we’re looking for is “OpenStreetMap”, unlocalized, because the most common OpenStreetMap-based sources have this string baked in (mapbox/tilejson-spec#20). If we see “OpenStreetMap” (unlocalized), we should replace it with “OpenStreetMap” (localized) or “OSM” (localized) depending on isAbbreviated.
There was a problem hiding this comment.
abbreviated:(BOOL)isAbbreviated
There was a problem hiding this comment.
“OpenStreetMap” has no spaces. The keys should be OSM_LONG_NAME and OSM_SHORT_NAME, respectively, and the comments should be “Full/abbreviated name of OpenStreetMap in attribution text.”
ab8203a to
e8d8e1f
Compare
|
I updated the path to Localizable.strings in Transifex to point to the release-agua branch, so that translators can get started right away. |
9a248de to
c85fc0a
Compare
There was a problem hiding this comment.
Technically a source can underline something that isn’t a link, using <u> for example. The more correct attribute to remove is the link attribute, which would be nonfunctional on an image.
There was a problem hiding this comment.
I've tried that NSLinkAttributeName but didn't work that's why I used NSUnderlineStyleAttributeName
There was a problem hiding this comment.
Ah, it probably has to do with the HTML-to-attributed-string conversion. I think that step started forcefully applying an underline (and color) around the Sierra timeframe. I’m fine with this change (which fixes #10493), but can you add a comment explaining the removal, in case we need to accommodate intentional underlining in the future?
c85fc0a to
aadd25c
Compare


Fixes #10423