@@ -304,13 +242,13 @@ function EleventyPlugin(eleventyConfig, opts = {}) {
// this is not a localized file (independent of a language code)
if(options.errorMode==="strict"){
thrownewError(
`Localized file for URL ${prependedLangCodeUrl} was not found in your project. A non-localized version does exist—are you sure you meant to use the \`${options.filters.url}\` filter for this? You can bypass this error using the \`errorMode\` option in the I18N plugin (currently: ${options.errorMode}).`
`Localized file for URL ${prependedLangCodeUrl} was not found in your project. A non-localized version does exist—are you sure you meant to use the \`${options.filters.url}\` filter for this? You can bypass this error using the \`errorMode\` option in the I18N plugin (current value: "${options.errorMode}").`
);
}
}elseif(options.errorMode==="allow-fallback"){
// You’re linking to a localized file that doesn’t exist!
thrownewError(
`Localized file for URL ${prependedLangCodeUrl} was not found in your project! You will need to add it if you want to link to it using the \`${options.filters.url}\` filter. You can bypass this error using the \`errorMode\` option in the I18N plugin (currently: ${options.errorMode}).`
`Localized file for URL ${prependedLangCodeUrl} was not found in your project! You will need to add it if you want to link to it using the \`${options.filters.url}\` filter. You can bypass this error using the \`errorMode\` option in the I18N plugin (current value: "${options.errorMode}").`
);
}
...
...
@@ -318,10 +256,11 @@ function EleventyPlugin(eleventyConfig, opts = {}) {
}
);
// Refactor to use url
// Find the links that are localized alternates to the inputPath argument