Skip to content

ResEdit / Localize: CheckIfText rejects any string that repeats \1/\2, preventing translations with multiple placeholders. #1064

@HubertHuckevoll

Description

@HubertHuckevoll

CheckIfText still enforces the old 1.0-era rule that each text chunk may contain at most a single \1 and \2 placeholder. CheckIfText increments dh/dl when it finds a placeholder but immediately compares the byte against 1 and falls into clrDXThenFail if the placeholder appears twice, so the chunk is never stored as text. The TextStringArgs structure was widened to hold counts. The rest of ResEdit (e.g., CheckItemForStringArgs) already interprets RAD_stringArgs as real counters, decrementing them until every @1/@2 in the translation is accounted for, so it expects the parser to preserve the actual counts instead of rejecting repeated placeholders.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions