Skip to content

chore(Scheduling): add i18n [YTFRONT-5069]#1557

Draft
ma-efremoff wants to merge 1 commit intomainfrom
ma-efremoff/schedutlin-i18n
Draft

chore(Scheduling): add i18n [YTFRONT-5069]#1557
ma-efremoff wants to merge 1 commit intomainfrom
ma-efremoff/schedutlin-i18n

Conversation

@ma-efremoff
Copy link
Copy Markdown
Collaborator

@ma-efremoff ma-efremoff commented Apr 30, 2026

https://nda.ya.ru/t/33XIdLxL7axQQx

## Summary by Sourcery

Internationalize scheduling UI and related actions by replacing hardcoded text with i18n keys and centralizing column titles and labels.

New Features:

  • Add i18n keysets and dictionaries for scheduling pages, dialogs, toolbars, and actions, enabling localization of scheduling-related UI text.

Enhancements:

  • Refine scheduling table column header logic to derive titles and short titles from shared metadata and i18n definitions.
  • Unify pool and operation dialogs, tooltips, warnings, and toasts to use localized strings instead of hardcoded English text.
  • Adjust pool quota and static configuration components, ACL and attributes views, and pool suggest controls to use localized labels, placeholders, and messages.
  • Standardize integral guarantee and mode labels for pools, with explicit mappings for display values.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 30, 2026

Reviewer's Guide

Introduces internationalization for the Scheduling UI by replacing hard-coded strings with i18n keys, centralizing column header logic, and wiring localized messaging into dialogs, toolbars, toasters, and helpers across scheduling-related components and actions.

Class diagram for scheduling table headers and i18n-based captions

classDiagram
    class SchedulingTable {
        +useSchedulingTableColumns()
        +makeNumberColumn(id, options)
        +makeReadableFieldColumn(id, options)
    }

    class SchedulingColumnHeader {
        +column: SchedulingColumn
        +title: string
        +shortTitle: string
        +allowUnordered: boolean
        +options: ColumnHeaderOption[]
        +loading: boolean
        +onSort(column, order, meta)
    }

    class ColumnHeader {
        +column: string
        +title: string
        +shortTitle: string
        +order: string
        +onSort(column, order, meta)
    }

    class childTableItems {
        <<object>>
        +user.caption: string
        +owner.caption: string
        +mode.caption: string
        +view_mode.caption: string
        +guaranteed.caption: string
        +FI.caption: string
        +weight.caption: string
        +min_share.caption: string
        +max_share.caption: string
        +fair_share.caption: string
        +usage.caption: string
        +demand.caption: string
        +operation_count.caption: string
        +max_operation_count.caption: string
        +running_operation_count.caption: string
        +max_running_operation_count.caption: string
        +duration.caption: string
        +burst_cpu.caption: string
        +flow_cpu.caption: string
        +sort(item)
    }

    class format {
        +ReadableField(column): string
    }

    class i18n_scheduling_overview {
        <<i18n>>
        +i18n(key): string
    }

    SchedulingTable --> SchedulingColumnHeader : uses
    SchedulingColumnHeader --> ColumnHeader : wraps
    SchedulingColumnHeader --> childTableItems : reads_caption_and_title
    SchedulingColumnHeader --> format : fallback_title_from_column
    SchedulingTable --> childTableItems : per_column_config
    childTableItems --> i18n_scheduling_overview : caption_via_i18n
Loading

File-Level Changes

Change Details Files
Refactor scheduling table column headers and metadata to use centralized i18n-backed captions and improved title/shortTitle resolution.
  • Update SchedulingColumnHeader to derive title/shortTitle from childTableItems with i18n-backed caption/title fields and fall back to format.ReadableField
  • Remove per-column caption plumbing in helper column factories and pass only column ids where possible
  • Localize specific column headers such as weight, mode, owner, usage, demand, guarantee, operations, duration, and FI using i18n keys
  • Extend childTableItems definitions with i18n-based caption getters for many columns and tweak some caption implementations for burst/flow CPU fields
packages/ui/src/ui/pages/scheduling/Content/tabs/Overview/SchedulingTable/SchedulingTable.tsx
packages/ui/src/ui/utils/scheduling/detailsTable.tsx
Localize texts, labels, placeholders, tooltips, and validation messages in pool creation, editing, and related dialogs and actions.
  • Replace hard-coded strings in PoolEditorDialog form configuration (captions, titles, placeholders, option labels, validation messages) with i18n calls
  • Localize integral guarantee type options and warning/notice texts, including support-team/ticket hints
  • Update CreatePoolDialog button, dialog header, field captions/placeholders, validation error, and documentation tooltip to use i18n
  • Adjust scheduling actions (create/edit/delete pool, filter attributes loading) to use i18n-based toaster messages including dynamic pool name interpolation and timeout error rendering
packages/ui/src/ui/pages/scheduling/Scheduling/PoolEditorDialog/PoolEditorDialog.tsx
packages/ui/src/ui/pages/scheduling/Instruments/CreatePoolDialog/CreatePoolDialog.tsx
packages/ui/src/ui/store/actions/scheduling/create-pool-dialog.tsx
packages/ui/src/ui/store/actions/scheduling/scheduling-ts.ts
packages/ui/src/ui/store/actions/scheduling/scheduling.tsx
Internationalize scheduling overview UI controls, dialogs, and meta-information.
  • Localize content mode selector labels instead of using format.ReadableField
  • Localize the Expand All confirmation dialog header, body text, and buttons
  • Localize the "Show abs. resources" switch label
  • Localize delete pool dialog header, confirmation text, error block message, and footer buttons
  • Adjust SchedulingMeta labels for burst/flow units to fixed English strings while keeping other meta titles localized
  • Use i18n for FIFO index tooltip and for FairShareUsage bar labels, name header title, start-time meta key, and row actions menu items
packages/ui/src/ui/pages/scheduling/Content/tabs/Overview/SchedulingToolbar.tsx
packages/ui/src/ui/pages/scheduling/Scheduling/Scheduling.tsx
packages/ui/src/ui/pages/scheduling/Content/tabs/Overview/SchedulingMeta.tsx
packages/ui/src/ui/pages/scheduling/Content/tabs/Overview/SchedulingTable/NameCell.tsx
packages/ui/src/ui/pages/scheduling/Content/tabs/Overview/SchedulingTable/SchedulingTable.tsx
Add i18n wiring and usage for static configuration, pool suggestion, ACL, attributes, quota editor, and top-row components.
  • Localize static configuration section title, table column headers, and last day max operations widget title
  • Localize PoolsSuggest and PoolSourceSuggest placeholders and configure PoolsSuggest to import its own i18n namespace
  • Update PoolAttributes error titles and PoolAcl NoContent messages to use i18n
  • Localize PoolQuotaEditor limit/source titles and source suggest placeholder
  • Localize top-row content pieces such as the copy-to-clipboard hover hint and physical tree selector placeholder
  • Initialize tab titles for Overview/Attributes via a scheduling content i18n keyset
packages/ui/src/ui/pages/scheduling/PoolStaticConfiguration/SchedulingStaticConfiguration.tsx
packages/ui/src/ui/pages/scheduling/PoolsSuggest/PoolsSuggest.tsx
packages/ui/src/ui/pages/scheduling/Content/tabs/PoolAcl/PoolAcl.tsx
packages/ui/src/ui/pages/scheduling/Content/tabs/PoolAttributes/PoolAttributes.tsx
packages/ui/src/ui/pages/scheduling/PoolQoutaEditor/PoolQuotaEditor.tsx
packages/ui/src/ui/pages/scheduling/Scheduling/SchedulingTopRowContent.tsx
packages/ui/src/ui/pages/scheduling/Content/Content.tsx
Introduce and wire new i18n keysets for scheduling-related UI modules and actions, along with English dictionaries.
  • Add i18n keyset initializers (index.ts) and dict loaders (dicts.ts) for scheduling content, pool ACL, pool attributes, create pool dialog, pool quota editor, pool static configuration, pools suggest, pool editor dialog, scheduling top-row content, and scheduling actions
  • Add corresponding en.json dictionary files for each new keyset (contents not shown in diff) and hook them into the main i18n system via addI18Keysets
  • Adjust PoolTags to use a fixed integral type label map instead of generic capitalization and leave labels in English for now
packages/ui/src/ui/pages/scheduling/Content/i18n/index.ts
packages/ui/src/ui/pages/scheduling/Content/i18n/dicts.ts
packages/ui/src/ui/pages/scheduling/Content/i18n/en.json
packages/ui/src/ui/pages/scheduling/Content/tabs/PoolAcl/i18n/index.ts
packages/ui/src/ui/pages/scheduling/Content/tabs/PoolAcl/i18n/dicts.ts
packages/ui/src/ui/pages/scheduling/Content/tabs/PoolAcl/i18n/en.json
packages/ui/src/ui/pages/scheduling/Content/tabs/PoolAttributes/i18n/index.ts
packages/ui/src/ui/pages/scheduling/Content/tabs/PoolAttributes/i18n/dicts.ts
packages/ui/src/ui/pages/scheduling/Content/tabs/PoolAttributes/i18n/en.json
packages/ui/src/ui/pages/scheduling/Instruments/CreatePoolDialog/i18n/index.ts
packages/ui/src/ui/pages/scheduling/Instruments/CreatePoolDialog/i18n/dicts.ts
packages/ui/src/ui/pages/scheduling/Instruments/CreatePoolDialog/i18n/en.json
packages/ui/src/ui/pages/scheduling/PoolQoutaEditor/i18n/index.ts
packages/ui/src/ui/pages/scheduling/PoolQoutaEditor/i18n/dicts.ts
packages/ui/src/ui/pages/scheduling/PoolQoutaEditor/i18n/en.json
packages/ui/src/ui/pages/scheduling/PoolStaticConfiguration/i18n/index.ts
packages/ui/src/ui/pages/scheduling/PoolStaticConfiguration/i18n/dicts.ts
packages/ui/src/ui/pages/scheduling/PoolStaticConfiguration/i18n/en.json
packages/ui/src/ui/pages/scheduling/PoolsSuggest/i18n/index.ts
packages/ui/src/ui/pages/scheduling/PoolsSuggest/i18n/dicts.ts
packages/ui/src/ui/pages/scheduling/PoolsSuggest/i18n/en.json
packages/ui/src/ui/pages/scheduling/Scheduling/PoolEditorDialog/i18n/index.ts
packages/ui/src/ui/pages/scheduling/Scheduling/PoolEditorDialog/i18n/dicts.ts
packages/ui/src/ui/pages/scheduling/Scheduling/PoolEditorDialog/i18n/en.json
packages/ui/src/ui/pages/scheduling/Scheduling/i18n/index.ts
packages/ui/src/ui/pages/scheduling/Scheduling/i18n/dicts.ts
packages/ui/src/ui/pages/scheduling/Scheduling/i18n/en.json
packages/ui/src/ui/store/actions/scheduling/i18n/index.ts
packages/ui/src/ui/store/actions/scheduling/i18n/dicts.ts
packages/ui/src/ui/store/actions/scheduling/i18n/en.json
packages/ui/src/ui/pages/scheduling/Content/tabs/Overview/SchedulingTable/i18n/en.json
packages/ui/src/ui/pages/scheduling/Content/tabs/Overview/i18n/en.json
packages/ui/src/ui/utils/scheduling/i18n/en.json
packages/ui/src/ui/pages/scheduling/Content/tabs/Overview/SchedulingTable/PoolTags.tsx

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions
Copy link
Copy Markdown
Contributor

Storybook is ready.

@github-actions
Copy link
Copy Markdown
Contributor

Playwright components report is ready.

@github-actions
Copy link
Copy Markdown
Contributor

Statoscope report is ready.

@github-actions
Copy link
Copy Markdown
Contributor

E2E-local report is ready.
E2E-remote report is ready.
E2E-screenshots report is ready.

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.

1 participant