Chinese Translation
Description / Background
As we prepare to expand our business into the Singaporean market, we recognize the country's rich cultural diversity, with a significant portion of its population being of Chinese descent. To ensure that we provide an inclusive and accessible experience for all potential customers, particularly the Chinese-speaking community, we are committed to implementing Chinese language translation on our platform.
Glossary
Private (https://app.clickup.com/9003122396/docs/8ca1fpw-35796/8ca1fpw-41516)
Objectives
- User can switch the language setting into Chinese

- User can see all the content of our website and app with chinese language
- Add chinese translation to (search page, dynamic pricing, search filter, navbar website, package page, checkout page, store page, booking confirmation, group landing, profile page, homepage)
- Admin can translate all restaurant tag to chinese by clicking
Get AI Help for All Tags

- Admin can translate one restaurant tag to chinese by clicking
Get AI Help

- Admin can translate the SEO of the restaurant by clicking
Get AI Help
Scope
All text on HungryHub Client (Web )
Sequence Diagram / Flow
-
ERD
-
Backend Implementation
- Add default_site_description_cn_desc(Default Site Description Cn), default_site_keywords_cn_desc (Default Site Keywords Cn), default_site_title_cn_desc (Default Site Title Cn) on admin setting
- Add chinese home translation (home section, search)
- Add chinese language email for booking confirmation (user anf owner)
- Add chinese voucher introduction (voucher detail, voucher tnc, restaurant voucher detail, restaurant voucher tnc)
- Add chinese languange field on Admin ➝ restaurants ➝ edit, add restaurant
- Add chinese languange field on Admin ➝ pakckages ➝ edit, add package
- Add chinese languange field on Admin ➝ restaurants ➝ restaurant tags
- Add chinese languange field on Admin ➝ others ➝ dining occasions
- Add chinese languange field on search icon (hungryhub icon on homepage setting)
- Add chinese language field on Admin ➝ restaurants ➝ Homepage setting
- Add chinese language field on Admin ➝ others ➝ VIM
- Add chinese language on kids price, package, pricing and special menu form
- Add chinese language on restaurant group landing page
- Add chinese langauge on SEO
- Use default language for chinese language on user mailer template
- Add
SORT_TYPE_HUMANIZESon group landing page model - Add new validation on when create or editing the restaurant tag title_cn, it should unique and the maximum length is 191 character
- Add chinese default photo locale on restaurant tag group
- Add chinese language on
app/my_lib/my_locale_manager.rb - Add chinese language field on attribute
app/serializers/admin/group_landing_page_serializer.rb - Add condition to show chinese review when user use chinese language setting
- Remove attribute content from voucher intro serializer
- Add the chinese language field on all the serializer (restaurant_tag, restaurant_tag_group, voucher_intro, sugesstion_tag, review, search_icon, group landing_page, blogger_review, selected_review) on api v5, vendor, partner, aoa,apiv6.
- Add
Get AI help for all tagsbutton andGet AI helpto translate restaurant tag from english to chinese - Add
Get AI helpbutton to translate restaurant description from english to chinese - Add worker to translate the english tag to chinese tag
- Add worker to translate the english restaurant description to chinese description
[
github.com
https://github.com/hungryhub-team/hh-server/pull/5765/files
](https://github.com/hungryhub-team/hh-server/pull/5765/files)
[
github.com
https://github.com/hungryhub-team/hh-server/pull/5966#pullrequestreview-2381035967
](https://github.com/hungryhub-team/hh-server/pull/5966#pullrequestreview-2381035967)
Frontend Implementation
- Add chinese translation value to src/components search and search filter
- Add chinese translation value to src/partial (group landing customer review, topbar, group landing blogger review, search bar, side filter view, side filter distance view, facilities group tags, dpt sheet page, select date time)
- Add chinese translate value on src/section search filter
[
github.com
https://github.com/hungryhub-team/hh-pegasus/pull/604
](https://github.com/hungryhub-team/hh-pegasus/pull/604)
PRD & Task
Private (https://app.clickup.com/9003122396/docs/8ca1fpw-7922/8ca1fpw-40576)
Private (https://app.clickup.com/t/86cvku8vg) Private (https://app.clickup.com/t/86cwhzmcq) Private (https://app.clickup.com/t/86cwx0ebw)
[
Missing Translation
https://docs.google.com/spreadsheets/d/1h8RbMnDRcDDeaHdTSq4NdAieYHcMX79N4qDDFE2UPDs/edit#gid=0
](https://docs.google.com/spreadsheets/d/1h8RbMnDRcDDeaHdTSq4NdAieYHcMX79N4qDDFE2UPDs/edit#gid=0)
Design
-
API Blueprint
| Method | Path | URL | Description | Params |
|---|---|---|---|---|
| get | translate_description_with_ai | run worker to translate the english description to chinese one | restaurant_id : 1 | |
| post | ai_help_all_tags | run worker to translate the all english restaurant tag to chinese one | tags : [1,2,3] (array of restaurant_tag_id) | |
| post | ai_help_tag | run worker to translate the specific english restaurant tag to chinese one | tag : 1 (specific restaurant_tag_id) |
New Query
-
DB Schema / Database Migration
- Add chinese translation field to restaurant_tag, restaurant_tag_group, voucher_intro, sugesstion_tag, review, search_icon, group_landing_page, blogger_review
- Add chinese translation to home section, and home screen writing (
config/locales/home.cn.yml) - Add chinese translation for locale text (
config/locales/cn.yml) - Add voucher detail translation (en, th, cn)
- Add voucher tnc translation (en, th, cn)
- Add restaurant package voucher detail translation (en, th, cn)
- Change package group id field from bigint to int
Improvement:
| NO | Date Time | What Changed | Description |
|---|---|---|---|