Skip to content

feat(i18n): translate src/content/learn/understanding-your-ui-as-a-tree.md from English to Vietnamese #478

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KotonoSora
Copy link
Contributor

@KotonoSora KotonoSora commented Jun 7, 2025

🇻🇳 Vietnamese Translation: Understanding Your UI as a Tree

Hi! I'm contributing as a volunteer translator for vi.react.dev, and this PR adds the Vietnamese translation for the "Understanding Your UI as a Tree" lesson.

What's included

  • Vietnamese translation of understanding-your-ui-as-a-tree.md
  • Preserved all code examples and markdown formatting
  • Kept terminology consistent with existing translations

Changes

  • ✅ Fully translated the guide covering React's tree-based UI modeling concepts
  • ✅ Maintained code blocks, links, Sandpack components and Diagram sections
  • ✅ Verified all internal links and formatting render correctly
  • ✅ Translated all diagram alt text to Vietnamese while preserving accessibility

Looking forward to contributing more translations to the project! 🚀


Tóm tắt những gì đã được dịch:

Tiêu đề và phần Intro:
"Understanding Your UI as a Tree" → "Hiểu giao diện người dùng theo cấu trúc cây"

Các phần chính:

  • "Your UI as a tree" → "Giao diện người dùng theo cấu trúc cây"
  • "The Render Tree" → "Render Tree"
  • "The Module Dependency Tree" → "Module Dependency Tree"

Phần DeepDive:

  • "Where are the HTML tags in the render tree?" → "Các thẻ HTML ở đâu trong render tree?"

Nội dung chính đã dịch:

  • Giải thích về cách React sử dụng cấu trúc cây để mô hình hóa UI
  • Khái niệm render tree và module dependency tree
  • Mối quan hệ giữa component cha và component con
  • Conditional rendering và ảnh hưởng đến render tree
  • Ứng dụng thực tế của dependency trees trong việc bundle code
  • Tối ưu hóa hiệu suất và debug ứng dụng React

Copy link

vercel bot commented Jun 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
vi-legacy-reactjs-org ⬜️ Ignored (Inspect) Visit Preview Jun 7, 2025 1:29am

Copy link
Collaborator

@chriskhoa chriskhoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review suggestions! Thanks


React, as a UI framework, is platform agnostic. On react.dev, we showcase examples that render to the web, which uses HTML markup as its UI primitives. But a React app could just as likely render to a mobile or desktop platform, which may use different UI primitives like [UIView](https://developer.apple.com/documentation/uikit/uiview) or [FrameworkElement](https://learn.microsoft.com/en-us/dotnet/api/system.windows.frameworkelement?view=windowsdesktop-7.0).
React, với tư cách là một framework UI, là platform agnostic. Trên react.dev, chúng tôi trình bày các ví dụ render cho web, sử dụng HTML markup làm UI primitives. Nhưng một ứng dụng React cũng có thể render cho nền tảng di động hoặc desktop, có thể sử dụng các UI primitives khác như [UIView](https://developer.apple.com/documentation/uikit/uiview) hoặc [FrameworkElement](https://learn.microsoft.com/en-us/dotnet/api/system.windows.frameworkelement?view=windowsdesktop-7.0).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
React, với tư cách là một framework UI, là platform agnostic. Trên react.dev, chúng tôi trình bày các ví dụ render cho web, sử dụng HTML markup làm UI primitives. Nhưng một ứng dụng React cũng có thể render cho nền tảng di động hoặc desktop, có thể sử dụng các UI primitives khác như [UIView](https://developer.apple.com/documentation/uikit/uiview) hoặc [FrameworkElement](https://learn.microsoft.com/en-us/dotnet/api/system.windows.frameworkelement?view=windowsdesktop-7.0).
React, với tư cách là một framework UI, là platform agnostic (không phụ thuộc vào nền tảng). Trên react.dev, chúng tôi trình bày các ví dụ render cho web, sử dụng HTML markup làm UI primitives. Nhưng một ứng dụng React cũng có thể render cho nền tảng di động hoặc desktop, có thể sử dụng các UI primitives khác như [UIView](https://developer.apple.com/documentation/uikit/uiview) hoặc [FrameworkElement](https://learn.microsoft.com/en-us/dotnet/api/system.windows.frameworkelement?view=windowsdesktop-7.0).


</DeepDive>

A render tree represents a single render pass of a React application. With [conditional rendering](/learn/conditional-rendering), a parent component may render different children depending on the data passed.
Một render tree đại diện cho một lần render duy nhất của ứng dụng React. Với [conditional rendering](/learn/conditional-rendering), một component cha có thể render các con khác nhau tùy thuộc vào dữ liệu được truyền.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Một render tree đại diện cho một lần render duy nhất của ứng dụng React. Với [conditional rendering](/learn/conditional-rendering), một component cha có thể render các con khác nhau tùy thuộc vào dữ liệu được truyền.
Một render tree đại diện cho một lần render duy nhất của ứng dụng React. Với [conditional rendering (render theo điều kiện)](/learn/conditional-rendering), một component cha có thể render các con khác nhau tùy thuộc vào dữ liệu được truyền.

* What a module dependency tree is and what it is useful for
* React "nhìn" cấu trúc component như thế nào
* Render tree là gì và nó hữu ích cho việc gì
* Module dependency tree là gì và nó hữu ích cho việc gì
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Module dependency tree là gì và nó hữu ích cho việc gì
* Module dependency (phụ thuộc vào module) tree là gì và nó hữu ích cho việc gì


</Diagram>

The root node of the tree is the root module, also known as the entrypoint file. It often is the module that contains the root component.
Nút gốc của cây là root module, còn được gọi là entrypoint file. Nó thường là module chứa component gốc.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Nút gốc của cây là root module, còn được gọi là entrypoint file. Nó thường là module chứa component gốc.
Nút gốc của cây là root module, còn được gọi là file mở đầu. Nó thường là module chứa component gốc.

* Render trees giúp xác định những component cấp cao và leaf component. Các component cấp cao ảnh hưởng đến hiệu suất render của tất cả component bên dưới chúng và các leaf component thường được re-render thường xuyên. Xác định chúng rất hữu ích để hiểu và debug hiệu suất render.
* Dependency trees đại diện cho các module dependencies trong ứng dụng React.
* Dependency trees được sử dụng bởi các build tools để bundle mã cần thiết để ship ứng dụng.
* Dependency trees hữu ích để debug kích thước bundle lớn làm chậm thời gian vẽ và tìm ra cơ hội để tối ưu hóa mã được bundle.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Dependency trees hữu ích để debug kích thước bundle lớn làm chậm thời gian vẽ tìm ra cơ hội để tối ưu hóa mã được bundle.
* Dependency trees hữu ích để debug các bundle có kích thước lớn làm chậm thời gian hiện thị giúp phát hiện cơ hội để tối ưu hóa mã code được bundle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants