-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add content flag assets and strings #1512
Changes from 3 commits
eb17cfa
bd91bca
d4fc3c1
5d83057
45e21bf
693f7f3
4c15b6d
cd4e7b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"color" : { | ||
"color-space" : "srgb", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "0x29", | ||
"green" : "0x12", | ||
"red" : "0x1B" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"color" : { | ||
"color-space" : "srgb", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "0x25", | ||
"green" : "0x10", | ||
"red" : "0x18" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"color" : { | ||
"color-space" : "srgb", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "0x0C", | ||
"green" : "0x04", | ||
"red" : "0x07" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"color" : { | ||
"color-space" : "srgb", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "0x7D", | ||
"green" : "0x39", | ||
"red" : "0x45" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"color" : { | ||
"color-space" : "srgb", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "0x75", | ||
"green" : "0x3F", | ||
"red" : "0xF4" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"color" : { | ||
"color-space" : "srgb", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "0x08", | ||
"green" : "0x85", | ||
"red" : "0xF0" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -5054,6 +5054,28 @@ | |||||
} | ||||||
} | ||||||
}, | ||||||
"harassmentFlagContentDescription" : { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I'd switch the words around a bit, so all of them are sorted together in the file. So this one would be:
Suggested change
And then all the others would be similar, starting with |
||||||
"extractionState" : "manual", | ||||||
"localizations" : { | ||||||
"en" : { | ||||||
"stringUnit" : { | ||||||
"state" : "translated", | ||||||
"value" : "Harmful and unwanted replies or mentions" | ||||||
} | ||||||
} | ||||||
} | ||||||
}, | ||||||
"harassmentFlagContentTitle" : { | ||||||
"extractionState" : "manual", | ||||||
"localizations" : { | ||||||
"en" : { | ||||||
"stringUnit" : { | ||||||
"state" : "translated", | ||||||
"value" : "Harassment & Profanity" | ||||||
} | ||||||
} | ||||||
} | ||||||
}, | ||||||
"homeFeed" : { | ||||||
"extractionState" : "manual", | ||||||
"localizations" : { | ||||||
|
@@ -5266,6 +5288,28 @@ | |||||
} | ||||||
} | ||||||
}, | ||||||
"illegalFlagContentDescription" : { | ||||||
"extractionState" : "manual", | ||||||
"localizations" : { | ||||||
"en" : { | ||||||
"stringUnit" : { | ||||||
"state" : "translated", | ||||||
"value" : "Content that violates the law in your country or CSAM" | ||||||
} | ||||||
} | ||||||
} | ||||||
}, | ||||||
"illegalFlagContentTitle" : { | ||||||
"extractionState" : "manual", | ||||||
"localizations" : { | ||||||
"en" : { | ||||||
"stringUnit" : { | ||||||
"state" : "translated", | ||||||
"value" : "Illegal" | ||||||
} | ||||||
} | ||||||
} | ||||||
}, | ||||||
"invalidKey" : { | ||||||
"extractionState" : "manual", | ||||||
"localizations" : { | ||||||
|
@@ -5420,6 +5464,9 @@ | |||||
} | ||||||
} | ||||||
}, | ||||||
"Key" : { | ||||||
"extractionState" : "manual" | ||||||
}, | ||||||
"keys" : { | ||||||
"extractionState" : "manual", | ||||||
"localizations" : { | ||||||
|
@@ -8292,6 +8339,17 @@ | |||||
} | ||||||
} | ||||||
}, | ||||||
"nudityFlagContentDescription" : { | ||||||
"extractionState" : "manual", | ||||||
"localizations" : { | ||||||
"en" : { | ||||||
"stringUnit" : { | ||||||
"state" : "translated", | ||||||
"value" : "Nudity, porn, or violent content not appropriate for work" | ||||||
} | ||||||
} | ||||||
} | ||||||
}, | ||||||
"ok" : { | ||||||
"extractionState" : "manual", | ||||||
"localizations" : { | ||||||
|
@@ -8517,6 +8575,28 @@ | |||||
} | ||||||
} | ||||||
}, | ||||||
"otherFlagContentDescription" : { | ||||||
"extractionState" : "manual", | ||||||
"localizations" : { | ||||||
"en" : { | ||||||
"stringUnit" : { | ||||||
"state" : "translated", | ||||||
"value" : "Items not included above" | ||||||
} | ||||||
} | ||||||
} | ||||||
}, | ||||||
"others" : { | ||||||
pelumy marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
"extractionState" : "manual", | ||||||
"localizations" : { | ||||||
"en" : { | ||||||
"stringUnit" : { | ||||||
"state" : "translated", | ||||||
"value" : "Others" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
} | ||||||
} | ||||||
} | ||||||
}, | ||||||
"outsideNetwork" : { | ||||||
"extractionState" : "manual", | ||||||
"localizations" : { | ||||||
|
@@ -11609,6 +11689,17 @@ | |||||
} | ||||||
} | ||||||
}, | ||||||
"spam" : { | ||||||
"extractionState" : "manual", | ||||||
"localizations" : { | ||||||
"en" : { | ||||||
"stringUnit" : { | ||||||
"state" : "translated", | ||||||
"value" : "Spam" | ||||||
} | ||||||
} | ||||||
} | ||||||
}, | ||||||
"start" : { | ||||||
"extractionState" : "manual", | ||||||
"localizations" : { | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,36 @@ | ||||||
import Foundation | ||||||
|
||||||
/// A model representing a flagging option used in content moderation. | ||||||
/// - `title`: The title of the flagging option. | ||||||
/// - `description`: An optional description that provides more detail about the flagging option. | ||||||
/// - `id`: A unique identifier for the flagging option, based on the `title`. | ||||||
|
||||||
pelumy marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
struct FlagOption: Identifiable { | ||||||
let title: String | ||||||
let description: String? | ||||||
var id: String { title } | ||||||
|
||||||
// `FlagOption` instances representing different categories of content that can be flagged. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
If you make this a triple-slash (HeaderDoc comment) it will show up in the documentation pane (right hand pane of Xcode) or when this variable is option-clicked! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for catching these @mplorentz |
||||||
static let flagContentCategories: [FlagOption] = [ | ||||||
FlagOption( | ||||||
title: String(localized: .localizable.spam), | ||||||
description: nil | ||||||
), | ||||||
FlagOption( | ||||||
title: String(localized: .localizable.harassmentFlagContentTitle), | ||||||
description: String(localized: .localizable.harassmentFlagContentDescription) | ||||||
), | ||||||
FlagOption( | ||||||
title: "NSFW", | ||||||
description: String(localized: .localizable.nudityFlagContentDescription) | ||||||
), | ||||||
FlagOption( | ||||||
title: String(localized: .localizable.illegalFlagContentTitle), | ||||||
description: String(localized: .localizable.illegalFlagContentDescription) | ||||||
), | ||||||
FlagOption( | ||||||
title: String(localized: .localizable.others), | ||||||
description: String(localized: .localizable.otherFlagContentDescription) | ||||||
) | ||||||
] | ||||||
} |
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.
I suggest renaming this
radio-button-selected-bottom
(and the otherradio-button-selected-top
).