Skip to content

Commit bb8acae

Browse files
authored
fix(cli): correct doc link keys (lockFileNotFound, androidResourceError); keep legacy aliases for compat (#1454)
1 parent 8f1f414 commit bb8acae

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

packages/cli/src/cli/loaders/android.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export default function createAndroidLoader(): ILoader<
137137
console.error("Error parsing Android resource file:", error);
138138
throw new CLIError({
139139
message: "Failed to parse Android resource file",
140-
docUrl: "androidResouceError",
140+
docUrl: "androidResourceError",
141141
});
142142
}
143143
},
@@ -174,7 +174,7 @@ export default function createAndroidLoader(): ILoader<
174174
console.error("Error generating Android resource file:", error);
175175
throw new CLIError({
176176
message: "Failed to generate Android resource file",
177-
docUrl: "androidResouceError",
177+
docUrl: "androidResourceError",
178178
});
179179
}
180180
},
@@ -768,7 +768,7 @@ function asString(value: any, name: string): string {
768768
}
769769
throw new CLIError({
770770
message: `Expected string value for resource "${name}"`,
771-
docUrl: "androidResouceError",
771+
docUrl: "androidResourceError",
772772
});
773773
}
774774

@@ -778,7 +778,7 @@ function asStringArray(value: any, name: string): string[] {
778778
}
779779
throw new CLIError({
780780
message: `Expected array of strings for resource "${name}"`,
781-
docUrl: "androidResouceError",
781+
docUrl: "androidResourceError",
782782
});
783783
}
784784

@@ -789,7 +789,7 @@ function asPluralMap(value: any, name: string): Record<string, string> {
789789
if (typeof pluralValue !== "string") {
790790
throw new CLIError({
791791
message: `Expected plural item "${quantity}" of "${name}" to be a string`,
792-
docUrl: "androidResouceError",
792+
docUrl: "androidResourceError",
793793
});
794794
}
795795
result[quantity] = pluralValue;
@@ -798,7 +798,7 @@ function asPluralMap(value: any, name: string): Record<string, string> {
798798
}
799799
throw new CLIError({
800800
message: `Expected object value for plurals resource "${name}"`,
801-
docUrl: "androidResouceError",
801+
docUrl: "androidResourceError",
802802
});
803803
}
804804

@@ -813,7 +813,7 @@ function asBoolean(value: any, name: string): boolean {
813813
}
814814
throw new CLIError({
815815
message: `Expected boolean value for resource "${name}"`,
816-
docUrl: "androidResouceError",
816+
docUrl: "androidResourceError",
817817
});
818818
}
819819

@@ -823,7 +823,7 @@ function asInteger(value: any, name: string): number {
823823
}
824824
throw new CLIError({
825825
message: `Expected number value for resource "${name}"`,
826-
docUrl: "androidResouceError",
826+
docUrl: "androidResourceError",
827827
});
828828
}
829829

@@ -1218,7 +1218,7 @@ function inferTypeFromValue(value: any): AndroidResourceType {
12181218
}
12191219
throw new CLIError({
12201220
message: "Unable to infer Android resource type from payload",
1221-
docUrl: "androidResouceError",
1221+
docUrl: "androidResourceError",
12221222
});
12231223
}
12241224

packages/cli/src/cli/utils/errors.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,19 @@ export const docLinks = {
33
bucketNotFound: "https://lingo.dev/cli",
44
authError: "https://lingo.dev/cli",
55
localeTargetNotFound: "https://lingo.dev/cli",
6+
// corrected key (previously misspelled as "lockFiletNotFound")
7+
lockFileNotFound: "https://lingo.dev/cli",
8+
// legacy alias for backward compatibility
69
lockFiletNotFound: "https://lingo.dev/cli",
710
failedReplexicaEngine: "https://lingo.dev/cli",
811
placeHolderFailed: "https://lingo.dev/cli",
912
translationFailed: "https://lingo.dev/cli",
1013
connectionFailed: "https://lingo.dev/cli",
1114
invalidType: "https://lingo.dev/cli",
1215
invalidPathPattern: "https://lingo.dev/cli",
16+
// corrected key (previously misspelled as "androidResouceError")
17+
androidResourceError: "https://lingo.dev/cli",
18+
// legacy alias for backward compatibility
1319
androidResouceError: "https://lingo.dev/cli",
1420
invalidBucketType: "https://lingo.dev/cli",
1521
invalidStringDict: "https://lingo.dev/cli",

0 commit comments

Comments
 (0)