@intlify/vite-plugin-vue-i18n locale translation files splitting
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 32/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript, vite
- Lĩnh vực
- build-system, localization
Hướng nghiên cứu
Bắt đầu bằng việc xem xét entry point của @intlify/vite-plugin-vue-i18n và tài liệu hiện tại trong README về việc tải locale. Tái hiện hành vi đã được báo cáo với cấu trúc thư mục en và fr trong issue, sau đó xác định hành vi tách và gộp nào là chủ đích; được xem là hoàn tất khi nhiều tệp cho mỗi locale được kết hợp chính xác hoặc phương án thay thế được hỗ trợ được ghi vào tài liệu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Clear and concise description of the problem
- for some projects custom block code is not the right way
- if we want place locale files in separate directory, we need to use "global" access, so everything is in one file per locale,
example (these files can really grow in size and be really unclear):
locales/en.yaml
locales/fr.yaml
- if we split locale translation files into multiple files, import all locales at once is not working, because its not correctly merged
Suggested solution
- add possibility to split each locale to multiple files, so our structure can look like this:
locales/en/group1/subject1.yaml
locales/en/group1/subject2.yaml
locales/en/group2/subject3.yaml
locales/fr/group1/subject1.yaml
locales/fr/group1/subject2.yaml
locales/fr/group2/subject3.yaml
There are to possibilities how to achieve this:
- more complex way - first directory will define the locale and each directory is a subject path, so if
locales/en/group1/subject1.yamlcontent is this:
foo: foo
bar:
baz: baz
the "generated" file for en locale will be:
group1:
subject1:
foo: foo
bar:
baz: baz
- more simple way - just merge the content, use root subject as locale - we will need to define whole subject in each file, the plugin will just merge everything in one
locales/en/group1/subject1.yaml
en:
group1:
subject1:
foo: foo
bar:
baz: baz
locales/fr/group1/subject1.yaml
fr:
group1:
subject1:
foo: foo
bar:
baz: baz
Alternative
If there is any existing way how to achieve similar code spliting right now without need to implement it, please add it to documentation, because now there is nothing about it.
Additional context
I tried several ways how to structure the dirs, files and content of yaml/json files and nothing was correctly merged, always only one file worked and other were ignored.
Validations
- Read the Contributing Guidelines.
- Read the README
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Ngôn ngữ chính
- TypeScript
- Star
- 270
- Fork
- 46
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của intlify/bundle-tools
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
intlify/bundle-tools#612 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
intlify/bundle-tools#611 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
intlify/bundle-tools#600 · 5 bình luận ·
-
Locale files are never invalidated on Vite 8 — dev server serves stale translations until restartĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
intlify/bundle-tools#599 · 1 bình luận · 1 reaction ·
-
Messages containing @ character are silently dropped in production build with JIT compilationĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
intlify/bundle-tools#533 ·
Tất cả issue của intlify/bundle-tools
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/vscode-livepreview#876 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
JustJarethB/invoicer#54 ·
-
ICP 1.2.0 shows a scheduled task's interval in milliseconds under the label "Interval (In seconds)"Đang mởNeeds Triage Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
wso2/product-integrator#2585 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: Telemundo West sdĐang mởcheck:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
design
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
MTES-MCT/monitor-field#119 ·
Maintainer thường phản hồi trong vòng 1 ngày