New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Description editing UI #2632
Description editing UI #2632
Conversation
will need to switch image once vector asset is ready
will cleanup layout in upcoming commits
based on app welcome screens, but theme-able
First pass at wiring up with #2650 : montehurd@4cf1124 Will push commits to this PR once #2650 is merged - some changes may land tomorrow morning. |
@@ -146,4 +146,8 @@ public class CommonStrings: NSObject { | |||
@objc public static let appStoreShortDescription = WMFLocalizedString("app-store-short-description", value: "Download the Wikipedia app to explore places near you, sync articles to read offline and customize your reading experience.", comment: "Short description of the app for the app store") | |||
@objc public static let appStoreReleaseNotes = WMFLocalizedString("app-store-release-notes", value: "Fully customizable and easier to read Explore feed. Localization, performance improvements and bug fixes.", comment: "Short summary of what is new in this version of the app for the app store") | |||
@objc public static let appStoreKeywords = WMFLocalizedString("app-store-keywords", value: "Wikipedia, reference, wiki, encyclopedia, info, knowledge, research, information, explore, learn", comment: "Short list of keywords describing the app for the app store. It is required that these are individual words, not phrases, and are comma separated.") | |||
|
|||
@objc public static let editAttribution = WMFLocalizedStringWithDefaultValue("wikitext-upload-save-anonymously-warning", nil, nil, "Edits will be attributed to the IP address of your device. If you %1$@ you will have more privacy.", "Button sub-text informing user or draw-backs of not signing in before saving wikitext. Parameters:\n* %1$@ - sign in button text") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there precedent for using the parameter to fill in other localized text or some guidance from Apple that says this OK? There are likely cases where the item localized separately is different than how it would fit in the full sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good question - iirc we did this in the section editing workflow, but i'll double-check and ponder...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apple's advice:
Don’t overload keys or compose phrases from multiple keys. Some languages have gender articles, adjective endings, and completely different word order. Instead, add a separate key-value pair to the strings file for all unique phrases.
For example, replace these key-value pairs:
/* Go to next page/chapter */
--
"GoToNext" = "Go to next %@";
"chapter" = "chapter";
"page" = "page";
with separate key-value pairs for each phrase:
/* Go to next chapter */
--
"GoToNextChapter" = "Go to next chapter";
/* Go to next page */
"GoToNextPage" = "Go to next page";
via
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So to achieve ^ w/o composition... hmm... (editing uses composition too)... so maybe a single string with html links then a web view and intercept those link taps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
poking around TWN docs for links deets: https://www.mediawiki.org/wiki/Help:Extension:Translate/Page_translation_example
Update: Looks like we may be able to use {{#tag:
(see very bottom of https://www.mediawiki.org/wiki/Help:Magic_words#Formatting)
</stackView> | ||
</subviews> | ||
<constraints> | ||
<constraint firstAttribute="width" constant="288" id="Ka3-zi-uhG"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The width of the edit content on landscape should be tied to readable width instead of a fixed width. You can make the superview margins follow readable width and constrain the stack view to the margins.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
https://phabricator.wikimedia.org/T193691
Add title description
Edit title description
/Edit introduction
/Cancel
buttonsdescription published
panel