Context
Depends on Screenplay's string resource construct (pending reconciliation
with the existing Internationalization language feature — see that
Screenplay issue). Studio needs a way to manage owned strings per
module/feature and let users promote literals to resources.
Proposal
- "Extract to resource" action on any literal
label "text" (or other
text-bearing property) — prompts for a resource name, creates the entry
in the owning module/feature's strings, rewrites the reference in
place. Mirrors IDE "extract to constant" UX.
- Per-locale editing surface once the locale model is settled — a table
view per strings block, one column per active locale.
- Missing-translation indicators, consistent with how other gaps
(unresolved names, incompatible themes) are surfaced elsewhere in
Studio.
Open questions
- Blocked on the Screenplay-side reconciliation with the existing
Internationalization construct — don't build the per-locale table UI
until that's settled, to avoid building against a shape that changes.
Dependencies
Depends on
Blocked: don't build the per-locale table UI until the Internationalization reconciliation in Cratis/Screenplay#93 settles, to avoid building against a shape that changes. The "extract to resource" action can proceed ahead of it.
Part of the screen work — build order and full dependency map: Cratis/Scene#7
Scope update — Cratis/Screenplay#93 is decided, this is unblocked
The language side resolved to extending the existing $strings. mechanism, not adding an inline strings block. That settles the shape this UI edits against, so the "blocked" note above no longer applies. Concretely:
- "Extract to resource" takes a literal
label "text", writes a <key.path> = "text" entry into the .play file's companion .strings file for the default locale, and rewrites the reference in place to the unquoted token $strings.<key.path>.
- Per-locale editing is a table over the companion
.strings files (MySystem.en.strings, MySystem.nb.strings, …) — one column per discovered locale, rows keyed by dotted key. StringsFiles already discovers every .strings file under a root and exposes base name + locale, so Studio does not need its own discovery.
- Missing-translation indicators are keys present in one locale's file and absent from another — computable directly from the same discovery.
- Keys are dotted paths (
invoices.actions.newInvoice); ownership is expressed by key naming, not by a language construct. The "extract" flow should propose a key prefix from the declaring module/feature.
Format details and the round-trip guarantee are in Documentation/screenplay/internationalization.md in the Screenplay repo.
Context
Depends on Screenplay's string resource construct (pending reconciliation
with the existing Internationalization language feature — see that
Screenplay issue). Studio needs a way to manage owned
stringspermodule/feature and let users promote literals to resources.
Proposal
label "text"(or othertext-bearing property) — prompts for a resource name, creates the entry
in the owning module/feature's
strings, rewrites the reference inplace. Mirrors IDE "extract to constant" UX.
view per
stringsblock, one column per active locale.(unresolved names, incompatible themes) are surfaced elsewhere in
Studio.
Open questions
Internationalization construct — don't build the per-locale table UI
until that's settled, to avoid building against a shape that changes.
Dependencies
Depends on
stringsconstruct, itself blocked on Internationalization for strings Screenplay#7Blocked: don't build the per-locale table UI until the Internationalization reconciliation in Cratis/Screenplay#93 settles, to avoid building against a shape that changes. The "extract to resource" action can proceed ahead of it.
Part of the screen work — build order and full dependency map: Cratis/Scene#7
Scope update — Cratis/Screenplay#93 is decided, this is unblocked
The language side resolved to extending the existing
$strings.mechanism, not adding an inlinestringsblock. That settles the shape this UI edits against, so the "blocked" note above no longer applies. Concretely:label "text", writes a<key.path> = "text"entry into the.playfile's companion.stringsfile for the default locale, and rewrites the reference in place to the unquoted token$strings.<key.path>..stringsfiles (MySystem.en.strings,MySystem.nb.strings, …) — one column per discovered locale, rows keyed by dotted key.StringsFilesalready discovers every.stringsfile under a root and exposes base name + locale, so Studio does not need its own discovery.invoices.actions.newInvoice); ownership is expressed by key naming, not by a language construct. The "extract" flow should propose a key prefix from the declaring module/feature.Format details and the round-trip guarantee are in
Documentation/screenplay/internationalization.mdin the Screenplay repo.