Extension version: 26.2.1
VS Code version: 1.135
Settings applied (settings.json):
"sqldeveloper.database.nls.language": "SPANISH",
"sqldeveloper.database.nls.territory": "SPAIN",
"sqldeveloper.database.nls.decimalSeparator": ",",
"sqldeveloper.database.nls.groupSeparator": "."
Problem
Numeric values (NUMBER) shown in the "Query Result" grid are always rendered with the en-US format (period as decimal separator), regardless of the configured nls.decimalSeparator/nls.groupSeparator settings.
Steps to reproduce
- Set
sqldeveloper.database.nls.decimalSeparator to "," and sqldeveloper.database.nls.groupSeparator to ".".
- Run
SELECT 1234.56 AS amount FROM dual;
- Observe the "Query Result" grid.
Expected: 1.234,56
Actual: 1234.56
Root cause (found by inspecting the installed extension bundle)
In dist/extension.js and dist/connection-dialog.js, the configuration keys DatabaseNlsDecimalSeparator (sqldeveloper.database.nls.decimalSeparator) and DatabaseNlsGroupSeparator (sqldeveloper.database.nls.groupSeparator) each appear only twice in the whole bundle:
- Declaring the setting's key name.
- Declaring its
{type:"string"} entry in the configuration schema (for the Settings UI).
Neither value is read anywhere else in the bundle — i.e. the setting is exposed to the user but never actually consumed (not passed to the DB session's NLS parameters, and not passed to the grid renderer).
Separately, in dist/9551.896b79c44f7bed322513.js (the bundle containing ag-Grid), there is a locale-aware number formatter used by the grid's pagination footer:
formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");
return t?t({value:e}):function(e,t){if("number"!=typeof e)return"";
const n=t(),o=n("thousandSeparator",","),i=n("decimalSeparator",".");
return e.toString().replace(".",i).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${o}`)}(e,this.getLocaleTextFunc.bind(this))}
This formatter does support custom locale separators via getLocaleTextFunc, but it's only wired up for the pagination row count/page numbers — not for numeric cell values in the grid body. And since the extension never forwards the configured NLS separators into that locale function either, even the paginator wouldn't honor the setting.
Suggested fix
Wire sqldeveloper.database.nls.decimalSeparator/groupSeparator into the grid's cell value formatter/renderer for numeric columns (and, if intended, into getLocaleTextFunc for the pagination formatter too).
Extension version: 26.2.1
VS Code version: 1.135
Settings applied (
settings.json):Problem
Numeric values (
NUMBER) shown in the "Query Result" grid are always rendered with the en-US format (period as decimal separator), regardless of the configurednls.decimalSeparator/nls.groupSeparatorsettings.Steps to reproduce
sqldeveloper.database.nls.decimalSeparatorto","andsqldeveloper.database.nls.groupSeparatorto".".SELECT 1234.56 AS amount FROM dual;Expected:
1.234,56Actual:
1234.56Root cause (found by inspecting the installed extension bundle)
In
dist/extension.jsanddist/connection-dialog.js, the configuration keysDatabaseNlsDecimalSeparator(sqldeveloper.database.nls.decimalSeparator) andDatabaseNlsGroupSeparator(sqldeveloper.database.nls.groupSeparator) each appear only twice in the whole bundle:{type:"string"}entry in the configuration schema (for the Settings UI).Neither value is read anywhere else in the bundle — i.e. the setting is exposed to the user but never actually consumed (not passed to the DB session's NLS parameters, and not passed to the grid renderer).
Separately, in
dist/9551.896b79c44f7bed322513.js(the bundle containing ag-Grid), there is a locale-aware number formatter used by the grid's pagination footer:This formatter does support custom locale separators via
getLocaleTextFunc, but it's only wired up for the pagination row count/page numbers — not for numeric cell values in the grid body. And since the extension never forwards the configured NLS separators into that locale function either, even the paginator wouldn't honor the setting.Suggested fix
Wire
sqldeveloper.database.nls.decimalSeparator/groupSeparatorinto the grid's cell value formatter/renderer for numeric columns (and, if intended, intogetLocaleTextFuncfor the pagination formatter too).