Skip to content

Commit

Permalink
add secrets namespaces in i18n constants
Browse files Browse the repository at this point in the history
  • Loading branch information
jathushan-r committed Mar 25, 2024
1 parent e99a887 commit f5d60bf
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion apps/console/src/features/core/configs/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export class Config {
I18nConstants.COMMON_NAMESPACE,
I18nConstants.CONSOLE_PORTAL_NAMESPACE,
I18nConstants.EXTENSIONS_NAMESPACE,
"secrets"
I18nConstants.SECRETS_NAMESPACE
],
preload: []
};
Expand Down
7 changes: 6 additions & 1 deletion apps/console/src/features/core/constants/i18n-constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,19 @@ export class I18nConstants {
*/
public static readonly EXTENSIONS_NAMESPACE: string = I18nModuleConstants.EXTENSIONS_NAMESPACE;

/**
* Secrets namespace.
*/
public static readonly SECRETS_NAMESPACE: string = I18nModuleConstants.SECRETS_NAMESPACE;

/**
* Locations of the I18n namespaces.
*/
public static readonly BUNDLE_NAMESPACE_DIRECTORIES: Map<string, string> = new Map<string, string>([
[ I18nConstants.COMMON_NAMESPACE, "portals" ],
[ I18nConstants.CONSOLE_PORTAL_NAMESPACE, "portals" ],
[ I18nConstants.EXTENSIONS_NAMESPACE, "portals" ],
[ "secrets", "portals" ]
[ I18nConstants.SECRETS_NAMESPACE, "portals" ]
]);

/**
Expand Down
10 changes: 9 additions & 1 deletion modules/i18n/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2020, WSO2 LLC. (https://www.wso2.com). All Rights Reserved.
* Copyright (c) 2020-2024, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
Expand Down Expand Up @@ -85,4 +85,12 @@ export class I18nModuleConstants {
* @default
*/
public static readonly META_FILENAME: string = "meta.json";

/**
* Secrets namespace.
* @constant
* @type {string}
* @default
*/
public static readonly SECRETS_NAMESPACE: string = "secrets";
}
2 changes: 1 addition & 1 deletion modules/i18n/src/models/namespaces/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2020, WSO2 LLC. (https://www.wso2.com).
* Copyright (c) 2020-2024, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
Expand Down
4 changes: 2 additions & 2 deletions modules/i18n/src/translations/en-US/meta.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2020, WSO2 LLC. (https://www.wso2.com).
* Copyright (c) 2020-2024, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
Expand Down Expand Up @@ -28,6 +28,6 @@ export const meta: LocaleMeta = {
I18nModuleConstants.CONSOLE_PORTAL_NAMESPACE,
I18nModuleConstants.MY_ACCOUNT_NAMESPACE,
I18nModuleConstants.EXTENSIONS_NAMESPACE,
"secrets"
I18nModuleConstants.SECRETS_NAMESPACE
]
};
2 changes: 1 addition & 1 deletion modules/i18n/src/translations/en-US/portals/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2020, WSO2 LLC. (https://www.wso2.com).
* Copyright (c) 2020-2024, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
Expand Down

0 comments on commit f5d60bf

Please sign in to comment.