Skip to content

Commit

Permalink
[cascading] from release/11.4.0-rc to main (#2383)
Browse files Browse the repository at this point in the history
<!--
{"currentBranch":"release/11.4.0-rc","targetBranch":"main","bypassReviewers":true,"isConflicting":false}
-->

## Cascading from release/11.4.0-rc to main

The configuration requests the cascading to bypass reviewer in case of
CI success.
To not bypass the reviewing process, please check the following
checkbox:

- [ ] <!-- !cancel bypass! --> 🚫 stop reviewing process
bypass for this Pull Request

---

<small>This Pull Request has been generated with ❤️ by the
[Otter](https://github.com/AmadeusITGroup/otter) cascading tool.</small>
  • Loading branch information
matthieu-crouzet authored Oct 31, 2024
2 parents f0a1ebe + 54dcca7 commit f886a72
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export type TokenDefinitionRenderer = (tokenStructure: DesignTokenVariableStruct
/**
* Options of the Design Token list transform function
*/
export interface DesignTTokenListTransformOptions {
export interface DesignTokenListTransformOptions {
/**
* Renderer the name of generated variable (without the prefix required by the target language)
*/
Expand All @@ -30,7 +30,7 @@ export interface DesignTTokenListTransformOptions {
/**
* Function defining the way the variable should be sorted before being generated
*/
export type DesignTokenListTransform = (variableSet: DesignTokenVariableSet, options?: DesignTTokenListTransformOptions) => (tokens: DesignTokenVariableStructure[]) => DesignTokenVariableStructure[];
export type DesignTokenListTransform = (variableSet: DesignTokenVariableSet, options?: DesignTokenListTransformOptions) => (tokens: DesignTokenVariableStructure[]) => DesignTokenVariableStructure[];

/**
* Options of the Design Token Renderer value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('Localization Builder', () => {
cleanVirtualFileSystem();
});

it('should genere the localizations', async () => {
it('should generate the localizations', async () => {
const options: LocalizationBuilderSchema = {
browserTarget: 'showcase:compile',
localizationExtracterTarget: 'showcase:extract-translations',
Expand Down
10 changes: 6 additions & 4 deletions packages/@o3r/localization/schematics/localization-base/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ export function updateLocalization(options: { projectName?: string | null | unde
workspaceProject.architect = {};
}

const projectBasePath = workspaceProject.root.replace(/[/\\]$/, '');

workspaceProject.architect['generate-translations'] ||= {
builder: '@o3r/localization:localization',
options: {
Expand All @@ -98,12 +100,12 @@ export function updateLocalization(options: { projectName?: string | null | unde
locales: [
'en-GB'
],
assets: [`${mainAssetsFolder}/locales`],
outputPath: `${devResourcesFolder}/localizations`
assets: [`${projectBasePath}/${mainAssetsFolder}/locales`],
outputPath: `${projectBasePath}/${devResourcesFolder}/localizations`
},
configurations: {
production: {
outputPath: `${distFolder}/localizations`
outputPath: `${projectBasePath}/${distFolder}/localizations`
}
}
};
Expand All @@ -118,7 +120,7 @@ export function updateLocalization(options: { projectName?: string | null | unde
};
const localizationAssetsConfig = {
glob: '**/*.json',
input: `${devResourcesFolder}/localizations`,
input: `${projectBasePath}/${devResourcesFolder}/localizations`,
output: '/localizations'
};
const projectType = workspaceProject?.projectType || 'application';
Expand Down

0 comments on commit f886a72

Please sign in to comment.