Commit Graph

28 Commits

Author SHA1 Message Date
Alexander Brown
b1dfbfaa09 chore: Replace prettier with oxfmt (#8177)
Configure oxfmt ignorePatterns to exclude non-JS/TS files (md, json,
css, yaml, etc.) to match previous Prettier behavior.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8177-chore-configure-oxfmt-to-format-only-JS-TS-Vue-files-2ee6d73d3650815080f3cc8a4a932109)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-01-20 16:44:08 -08:00
danialshirali16
6883241e50 Add Persian (Farsi) language support (#7876)
## Description

This PR adds Persian (Farsi) language support to ComfyUI. 

## Changes

- Added `fa` to output locales in `.i18nrc.cjs` with Persian-specific
translation guidelines
- Added Persian loaders for all translation files (main, nodeDefs,
commands, settings) in `src/i18n.ts`
- Added Persian (فارسی) option to language settings dropdown in
`src/platform/settings/constants/coreSettings.ts`
- Created empty Persian locale files in `src/locales/fa/` directory
(will be populated by the CI translation system)

## Translation Guidelines

The Persian translation will follow these guidelines:
- Use formal Persian (فارسی رسمی) for professional tone throughout the
UI
- Keep commonly used technical terms in English when they are standard
in Persian software (e.g., node, workflow)
- Use Arabic-Indic numerals (۰-۹) for numbers where appropriate
- Maintain consistency with terminology used in Persian software and
design applications

## Testing

The configuration has been tested to ensure:
- TypeScript compilation succeeds
- All four translation files are properly referenced
- Language option appears correctly in settings

## Notes

Following the contribution guidelines in `src/locales/CONTRIBUTING.md`,
the empty translation files will be automatically populated by the CI
system using OpenAI. Persian-speaking contributors can review and refine
these translations after the automated generation.

---

Special names to keep untranslated: flux, photomaker, clip, vae, cfg,
stable audio, stable cascade, stable zero, controlnet, lora, HiDream,
Civitai, Hugging Face

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7876-Add-Persian-Farsi-language-support-2e16d73d365081f69df0e50048ce87ba)
by [Unito](https://www.unito.io)

Co-authored-by: danialshirali16 <danialshirali16@users.noreply.github.com>
2026-01-10 23:02:16 -07:00
sno
3bd74dcf39 fix: enable immediate file saving for i18n translations (#7785)
## Summary

Fixes the pt-BR locale generation issue by enabling immediate file
persistence in the lobe-i18n configuration.

## Problem

The pt-BR locale was added in PR #6943 with proper infrastructure, but
translation files have remained empty (`{}`) despite the i18n workflow
running successfully on version-bump PRs.

### Root Cause

The `lobe-i18n` tool has a `saveImmediately` configuration option
(defaults to `false`) that controls whether translations are persisted
to disk immediately during generation. When bootstrapping from
completely empty `{}` JSON files, without `saveImmediately: true`, the
tool generates translations in memory but doesn't write them to disk,
resulting in empty files.

**Evidence:**
- All other locales: ~1,931 lines each (previously bootstrapped)
- pt-BR before fix: 1 line (`{}` in all 4 files)
- CI workflow runs successfully but pt-BR files remain empty
- After adding `saveImmediately: true`: 18,787 lines generated across
all 4 pt-BR files

## Solution

Add `saveImmediately: true` to `.i18nrc.cjs` configuration:

```javascript
module.exports = defineConfig({
  modelName: 'gpt-4.1',
  splitToken: 1024,
  saveImmediately: true,  // ← Enables immediate file persistence
  entry: 'src/locales/en',
  entryLocale: 'en',
  output: 'src/locales',
  outputLocales: ['zh', 'zh-TW', 'ru', 'ja', 'ko', 'fr', 'es', 'ar', 'tr', 'pt-BR'],
  // ...
});
```

This ensures that when lobe-i18n generates translations from empty
files, they are immediately written to disk rather than kept only in
memory.

## Validation

This PR's commit history demonstrates the fix works:

1. **Commit `22e6e28f5`**: Applied the `saveImmediately: true` fix
2. **Commit `cd7e93786`**: Temporarily enabled i18n workflow for this
branch (for testing)
3. **Commit `84545c218`**: CI successfully generated complete pt-BR
translations:
   - `commands.json`: 327 lines
   - `main.json`: 2,458 lines
   - `nodeDefs.json`: 15,539 lines
   - `settings.json`: 463 lines
   - **Total: 18,787 lines of Portuguese translations**
4. **Commits `85f282f98` & `05d097f7b`**: Reverted test commits to keep
PR minimal

## Changes

- `.i18nrc.cjs`: Added `saveImmediately: true` configuration option (+1
line)

## Impact

After this fix is merged, future `version-bump-*` PRs will automatically
generate and persist pt-BR translations alongside all other locales,
keeping Portuguese (Brazil) translations up-to-date with the codebase.

## References

- Original issue:
https://github.com/Comfy-Org/ComfyUI_frontend/pull/6943#issuecomment-3679664466
- Related PR: #6943 (Portuguese (Brazil) locale addition)
- lobe-i18n documentation:
https://github.com/lobehub/lobe-cli-toolbox/tree/master/packages/lobe-i18n

Fixes #6943 (comment)

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alexander Brown <drjkl@comfy.org>
2026-01-08 15:46:12 -07:00
Luke Mino-Altherr
47884c623e [feat] Add HuggingFace model import support (#7540)
## Summary
Adds HuggingFace as a model import source alongside CivitAI, with
improved UX for model type selection and UTF-8 filename support.

## Changes
- **Import Sources**: Implemented extensible import source handler
pattern supporting both CivitAI and HuggingFace
- **UTF-8 Support**: Decode URL-encoded filenames to properly display
international characters (e.g., Chinese)
- **UX**: Sort model types alphabetically for easier selection
- **Feature Flag**: Added `huggingfaceModelImportEnabled` flag for
gradual rollout
- **i18n**: Use proper template parameters for localized error messages

## Technical Details
- Created `ImportSourceHandler` interface for extensibility
- Refactored existing CivitAI logic into handler pattern
- Added URL validation per source
- Filename decoding handles malformed URLs gracefully

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7540-feat-Add-HuggingFace-model-import-support-2cb6d73d3650818f966cca89244e8c36)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: GitHub Action <action@github.com>
2025-12-22 11:34:49 -08:00
JonatanAtila
e248ecfa4e feat(i18n): add Portuguese (Brazil) locale (pt-BR) (#6943)
Finalmente o idioma em Portugues do Brasil verá a luz do dia (se tudo
correr bem).

What has been done:

- Added pt-BR to .i18nrc.cjs and settings
- Included loaders in src/i18n.ts and apps/desktop-ui/src/i18n.ts
- Now Portuguese (BR) is displayed in the language selector
- Created empty main.json, commands.json, settings.json and
nodeDefs.json files to be populated by CI

- Checklist: the language appears in the dropdown list, selection occurs
without errors, the fallback to English, in case technical terms have no
translation, is working correctly.

- I will maintain the pt-br translation and review for as long as
necessary.

---------

Co-authored-by: Comfy Contributor <dev@example.com>
2025-11-27 15:46:27 -07:00
snomiao
553b5aa02b feat: Add Turkish language support (#5438)
## Summary
- Added complete Turkish language translation for ComfyUI Frontend
- Integrated Turkish locale into the i18n system
- Added Turkish as a selectable language option in settings

## Implementation Details
- Added Turkish translation files provided by @naxci1:
  - `src/locales/tr/main.json` - Main UI translations
  - `src/locales/tr/commands.json` - Command translations
  - `src/locales/tr/nodeDefs.json` - Node definitions translations
  - `src/locales/tr/settings.json` - Settings translations
- Updated `src/i18n.ts` to import and register Turkish locale
- Added Turkish option to language selector in
`src/constants/coreSettings.ts`

## Test Plan
- [ ] Verify Turkish translations load correctly
- [ ] Test language switching to/from Turkish
- [ ] Check all UI elements display properly in Turkish
- [ ] Verify node descriptions and tooltips in Turkish
- [ ] Test command palette in Turkish

Fixes #5437

🤖 Generated with [Claude Code](https://claude.ai/code)

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-5438-feat-Add-Turkish-language-support-2686d73d36508184bbf2dc1e0cd15350)
by [Unito](https://www.unito.io)
2025-09-18 19:43:53 -07:00
Christian Byrne
c303a3f037 [fix] Complete traditional to simplified Chinese character conversion (#5013)
* [fix] Complete traditional to simplified Chinese character conversion

Fixes issue where the automated translation system was incorrectly
mixing traditional Chinese characters into simplified Chinese (zh)
locale files after PR #4410 added zh-TW support.

Changes:
- Updated .i18nrc.cjs with explicit guidelines for AI model to
  distinguish between simplified and traditional Chinese
- Fixed 50+ traditional characters in zh locale files:
  - commands.json: 畫→画, 減→减, 筆→笔
  - main.json: 關→关, 刪→删, 複→复, 製→制, 輸→输, etc.
  - settings.json: 舊→旧, 標→标, 選→选, etc.

Completed the systematic conversion work started in PRs #5005 and #4865
without overwriting any human translator decisions.

Fixes #5010

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update locales [skip ci]

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: github-actions <github-actions@github.com>
2025-08-15 13:01:05 -07:00
arab-future-academy
dc444faa75 Feature/arabic translation (#4916) 2025-08-11 23:29:01 -07:00
Christian Byrne
eb63b5c536 [feat] Add Traditional Chinese language support (#4410)
Co-authored-by: github-actions <github-actions@github.com>
2025-07-10 01:52:47 -07:00
Chenlei Hu
ebf3c0c049 [API Nodes] Add credit management panel UI (#3535)
Co-authored-by: github-actions <github-actions@github.com>
2025-04-20 22:11:43 -04:00
Chenlei Hu
2aef0a9af8 [Bug] Fix model name (#3530) 2025-04-20 13:16:13 -04:00
Chenlei Hu
b74887d543 [i18n] Use gpt-o4-mini for translation (#3529) 2025-04-20 13:13:00 -04:00
Christian Byrne
6bc03a624e Add HiDream templates translations (#3485)
Co-authored-by: github-actions <github-actions@github.com>
2025-04-17 13:46:11 -04:00
Christian Byrne
fa132e4106 Don't translate 'Stable Zero' (#3352) 2025-04-08 19:51:11 -04:00
Chenlei Hu
0518b170d3 [i18n] Add spanish translation (#3233)
Co-authored-by: github-actions <github-actions@github.com>
2025-03-25 14:34:44 -04:00
Christian Byrne
72994621a6 Translate template categories (#2937)
Co-authored-by: github-actions <github-actions@github.com>
2025-03-09 13:47:49 -04:00
Chenlei Hu
b9edd05623 [i18n] Add French translation (#2064)
Co-authored-by: github-actions <github-actions@github.com>
2024-12-26 20:31:31 -05:00
Chenlei Hu
0906d7873a Update locales (Sync core node defs)(#1984) 2024-12-18 13:24:11 -08:00
Chenlei Hu
c5135afd29 [i18n] Fix some unintuitive Chinese translations (#1889) 2024-12-12 08:32:53 -08:00
Chenlei Hu
f23530afcf [i18n] Translate widget label (#1883)
* [i18n] Translate widget label

* Update locales [skip ci]

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-12-11 18:03:56 -08:00
Chenlei Hu
c60645d9f4 [i18n] Translate node input label (#1880) 2024-12-11 14:57:49 -08:00
Chenlei Hu
ebbff358a0 [i18n] Fix untranslated dataTypes in ru (#1879) 2024-12-11 12:13:39 -08:00
Chenlei Hu
0c511d08e6 [i18n] Use folder mode for locale (#1876)
* [i18n] Use folder mode for locale

* try pipe
2024-12-11 11:29:52 -08:00
Chenlei Hu
86797d2492 [i18n] Collect node data types (#1859)
* [i18n] Collect node data types

* nit

* Update locales [skip ci]

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-12-10 11:29:54 -08:00
Chenlei Hu
9d49cb0e4b Add support for korea translation (#1830)
* Add support for korea translation

* Update locales [skip ci]

* Update ko.json

* Update locales [skip ci]

* Update ko.json

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Dr.Lt.Data <128333288+ltdrdata@users.noreply.github.com>
2024-12-08 11:44:36 -05:00
Chenlei Hu
a76159e9a0 [i18n] Translate node categories (#1842)
* [i18n] Translate node categories

* nit

* Update locales [skip ci]

* Fix some translations

* Do translate

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-12-07 21:25:40 -05:00
Chenlei Hu
a56462fc7c Translate core setting name & tooltip (#1765)
* lazy eval default value

* Add setting translation

* Adjust hooks

* Add all translations

* nit

* Normalized setting id

* Update locales

* Fallback

* Locale => Language

* Locale => Language

* Update translations
2024-12-02 17:34:21 -05:00
Yuki Shindo
9ef40189f9 Add lobe-i18n setup and translation scripts and update translation files for consistency (#1751)
* refactor: convert translation files from TS to JSON format

* feat: add lobe-i18n setup and translation scripts

* chore: update translation files for consistency

* chore: refine translations in ja_JP.json for natural phrasing

* refactor: revert locale file names to original simpler format (e.g., en_US → en)
2024-12-01 20:03:17 -05:00