mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-12 13:32:56 +00:00
The i18n module becomes a thin Lang wrapper over craft_i18n::I18n and the catalogs embedded from craft-i18n. Plurals use trn_plain and PhotoCraft keeps its own fmt; @id rows come only from PhotoCraft's own rows that keep the label's shape. Detection, PHOTOCRAFT_LOCALE, tag bounds and the 35 offered languages are unchanged. Serbian: sr, sr-RS, sr-Cyrl-RS and sr-ME reach sr-latn, the only Serbian catalog, and a saved interface.language "sr" migrates to "sr-latn". The menu completeness test becomes a report that never fails, and `cargo xtask i18n-coverage` is replaced by `cargo xtask i18n-report`, which reads CRAFT_I18N_DIR through the crate. Docs describe the new system. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2.3 KiB
2.3 KiB
Contributors in the About window
About ▸ Contributors credits everyone who contributed to PhotoCraft, and About ▸ Models credits
the AI models named in Co-Authored-By trailers.
Decision
- Two files, both compiled into the binary by the UI crate's
build.rs(nothing is read from disk or the network at run time; the web build has them too):contributors/contributors.json: commit stats per GitHub username. Release builds regenerate it for the release commit (.github/workflows/release.yml,creditsjob); the copy in the repository is not updated.contributors/people.toml: the names people chose for themselves. Each contributor adds only their own entry, in their own PR.
- Each contributor gets one line: GitHub username (always), display name (opt-in, or their synced GitHub profile name), real name (only if they told us), merged PRs, commits, lines added, lines deleted, binary assets added, binary assets removed, first and last commit date.
- The list is shown as a grab bag (names flowing as text) or a table, in the same order. It
sorts by name, PRs, commits, lines added, lines deleted, line delta, binary assets added/removed,
first or last commit date. The name toggle cycles Username → Display name → Real name; a
missing name falls back to
@username. Alphabetical sorting is case-insensitive and ignores the@.
In PhotoCraft
- The About window is
DialogKind::Aboutincrates/ui-egui/src/dialogs.rs(Help ▸ About PhotoCraft). Its tab is the dialog fieldtab(about,contributors,models), so agents can switch it withui.dialog.set. Labels are translated like the rest of the shell (tl!+ craft-i18n'slocales/<code>/photocraft.tsv).
Credit yourself
Add your entry to contributors/people.toml in a PR you commit yourself (every field optional):
[people.your-github-username]
real_name = "Your Name"
display_name = "Nickname"
sync_github_name = true # use the name on your public GitHub profile as display name
Names show for entries committed by their own user (or by a maintainer with a consent_source).
Delete your entry to remove your names. Git author names and emails are never recorded.