cross-store text: other platforms named in App Store text (2.3.10: Android, Google Play, ...) or Play text (Metadata: iOS, App Store, Game Center, ...) are refused by every text write (apple / play listing, play release / upload notes, listing set, whats-new, storebound edit, desktop editor), blockers in check / validate, scan other-platforms / play-other-platforms; listing.allowPlatformMentions for the owner's functional mentions; whats-new splits [apple] / [play] lines per store; storebound api --yes without a TTY is refused (exit 1, stderr) instead of a silent dry run; pitfalls 77, 78
This commit is contained in:
parent
3e4015b686
commit
edabbec874
32 changed files with 613 additions and 53 deletions
|
|
@ -10,6 +10,7 @@ import { compactDiff } from './diff';
|
|||
import { setByPath } from './config-path';
|
||||
import type { AppleField } from './copy';
|
||||
import { appleSection, isAppleField, isPlayField, playSection, setAppleField, setPlayField } from './listing-edit';
|
||||
import type { PlatformAllow } from './cross-store';
|
||||
import { appleLocaleIssues, emailIssue, type FieldIssue, playLangIssues, urlIssue } from './listing-rules';
|
||||
|
||||
export type EditOp =
|
||||
|
|
@ -35,6 +36,8 @@ export interface EditSources {
|
|||
shotsCopy?: { file: string; rel: string; text: string | null } | null;
|
||||
appName: string;
|
||||
appleName: string;
|
||||
/** listing.allowPlatformMentions of the config (pitfall 77) */
|
||||
allowPlatformMentions?: readonly PlatformAllow[];
|
||||
}
|
||||
|
||||
/** Checks one edit's shape (it comes from the window or a terminal). Throws with the reason. */
|
||||
|
|
@ -171,12 +174,12 @@ export function planEdits(ops: EditOp[], src: EditSources, getPath: (path: strin
|
|||
// the touched languages as they would be saved, with the checks of `check` / `check --aso` / `scan`
|
||||
if (src.play) for (const lang of touched.play) {
|
||||
const s = playSection(texts.get(src.play.file) ?? '', lang);
|
||||
if (s) for (const x of playLangIssues(lang, s.values, src.appName)) issues.push({ ...x, where: `Google Play ${lang}` });
|
||||
if (s) for (const x of playLangIssues(lang, s.values, src.appName, src.allowPlatformMentions)) issues.push({ ...x, where: `Google Play ${lang}` });
|
||||
}
|
||||
if (src.apple) for (const loc of touched.apple) {
|
||||
const s = appleSection(texts.get(src.apple.file) ?? '', loc);
|
||||
if (s && onlyWhatToTest.get(loc)) { const n = [...(s.values.whatToTest ?? '')].length; if (n > 4000) issues.push({ level: 'error', field: 'whatToTest', where: `TestFlight ${loc}`, msg: `What to Test is ${n} characters; TestFlight takes 4000` }); continue; }
|
||||
if (s) for (const x of appleLocaleIssues(loc, s.values, src.appleName)) issues.push({ ...x, where: `App Store ${loc}` });
|
||||
if (s) for (const x of appleLocaleIssues(loc, s.values, src.appleName, src.allowPlatformMentions)) issues.push({ ...x, where: `App Store ${loc}` });
|
||||
}
|
||||
const files: EditFile[] = [];
|
||||
for (const [file, after] of texts) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue