Skip to content

Commit f6450c7

Browse files
Merge pull request #9682 from elsamaryv/disk-resize-fr-conv-fix
Ensure disk resize request works in French UI
2 parents 3150287 + 184c6c5 commit f6450c7

File tree

1 file changed

+5
-1
lines changed
  • app/javascript/components/reconfigure-vm-form/helpers

1 file changed

+5
-1
lines changed

app/javascript/components/reconfigure-vm-form/helpers/general.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,8 @@ export const formsData = {
5050
/** Function to get the value in MB
5151
* converts the value to GB to MB based on the passed unit
5252
*/
53-
export const sizeInMB = (value, unit) => (unit === __('GB') ? value * 1024 : value);
53+
export const sizeInMB = (value, unit) => {
54+
// Check if unit is GB or a localized version of GB (like "Go" in French)
55+
const isGigabyte = unit === 'GB' || unit === __('GB');
56+
return isGigabyte ? value * 1024 : value;
57+
};

0 commit comments

Comments
 (0)