-
Notifications
You must be signed in to change notification settings - Fork 108
feat(schema): Add Culture Context #5615
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
Changes from all commits
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,110 @@ | ||||||||
| use relay_protocol::{Annotated, Empty, FromValue, IntoValue, Object, Value}; | ||||||||
|
|
||||||||
| use crate::processor::ProcessValue; | ||||||||
|
|
||||||||
| /// Culture information. | ||||||||
| /// | ||||||||
| /// Culture context describes the cultural properties relevant to how software is used | ||||||||
| /// in specific regions or locales. | ||||||||
| #[derive(Clone, Debug, Default, PartialEq, Empty, FromValue, IntoValue, ProcessValue)] | ||||||||
| pub struct CultureContext { | ||||||||
| /// The calendar system in use. | ||||||||
| /// | ||||||||
| /// For example, `GregorianCalendar`. | ||||||||
| #[metastructure(pii = "maybe")] | ||||||||
| pub calendar: Annotated<String>, | ||||||||
|
|
||||||||
| /// Human-readable name of the culture. | ||||||||
| /// | ||||||||
| /// For example, `English (United States)`. | ||||||||
| #[metastructure(pii = "maybe")] | ||||||||
| pub display_name: Annotated<String>, | ||||||||
|
|
||||||||
| /// The name identifier, usually following the RFC 4646. | ||||||||
| /// | ||||||||
| /// For example, `en-US` or `pt-BR`. | ||||||||
logaretm marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||
| #[metastructure(pii = "maybe")] | ||||||||
| pub locale: Annotated<String>, | ||||||||
|
|
||||||||
| /// Whether the locale uses 24-hour time format. | ||||||||
| #[metastructure(pii = "maybe")] | ||||||||
| pub is_24_hour_format: Annotated<bool>, | ||||||||
|
|
||||||||
| /// The timezone of the locale. | ||||||||
| /// | ||||||||
| /// For example, `Europe/Vienna`. | ||||||||
|
||||||||
| /// For example, `Europe/Vienna`. | |
| /// For example, `Europe/Vienna`. | |
| #[metastructure(pii = "maybe")] |
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
display_namefield should be marked with#[metastructure(pii = "maybe")]annotation. This field contains human-readable locale information (e.g., "English (United States)") which can reveal user location and preferences, similar to other locale-related fields that are marked as potentially containing PII.