Create translation strings #10

Closed
opened 2024-05-22 09:52:52 +02:00 by tudattr · 0 comments

When creating the translation string we should have upper level components pass their "namespace" for translations along to the lower level components.

So instead of having cv.workexperience.se2_gefeba.description I should have.

#[component]
struct CV() -> Element {
  let i18_base = "cv";
  // [...]
  rsx! {
  // [...]
    WorkExperience {i18_base}
  // [...]
  }
}

struct WorkExperience(i18_base: String) -> Element {
  let i18_base = i18_base.push_str("workexperience");
  // [...]
}
When creating the translation string we should have upper level components pass their "namespace" for translations along to the lower level components. So instead of having `cv.workexperience.se2_gefeba.description` I should have. ```rust #[component] struct CV() -> Element { let i18_base = "cv"; // [...] rsx! { // [...] WorkExperience {i18_base} // [...] } } struct WorkExperience(i18_base: String) -> Element { let i18_base = i18_base.push_str("workexperience"); // [...] } ```
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: tudattr/athome#10
There is no content yet.