Closed danilort closed 8 months ago
"qalc.output.digitGroupingSymbol": {
"title": "Character that groups the digits",
"type": "string",
"default": ".",
"description": "Character that groups the digits"
},
"qalc.output.decimalSymbol": {
"title": "Character separating the decimals",
"type": "string",
"default": ",",
"description": "Character separating the decimals"
}
exports.temperatureShortcut = exports.localCurrencyCode = exports.localCurrencySymbol = exports.convertLocalCurrency = exports.upperExponentBound = exports.lowerExponentBound = exports.notation = exports.precision = exports.trimTrailingZeros = exports.displayCommas = exports.enabledLanguages = exports.maxAlignmentColumn = exports.alignResults = exports.resultsColor = exports.getComputedResultsDelimiter = exports.resultsDelimiter = exports.showResultsDelimiter = exports.digitGroupingSymbol = exports.decimalSymbol = void 0;
const SEPARA_GRUPPI_CIFRE = "qalc.output.digitGroupingSymbol"; //DG
const SEPARA_DECIMALI = "qalc.output.decimalSymbol"; //DG
……………………..
function digitGroupingSymbol() {
return getConfiguration(SEPARA_GRUPPI_CIFRE);
}
exports.digitGroupingSymbol = digitGroupingSymbol;
function decimalSymbol() {
return getConfiguration(SEPARA_DECIMALI);
}
exports.decimalSymbol = decimalSymbol;
digitGroupingSymbol: settings_1.digitGroupingSymbol(),
decimalSymbol: settings_1.decimalSymbol()
digitGroupingSymbol: settings_1.digitGroupingSymbol(),
decimalSymbol: settings_1.decimalSymbol()
if (formatterSettings.trimTrailingZeros)
{
.................
}
//replace the decimal separator with temporary characters
output = output.replace(/\./, '#');
//add the digit group separator
output = output.replace(/\B(?<!\#\d*)(?=(\d{3})+(?!\d))/g, formatterSettings.digitGroupingSymbol);
//replace the decimal separator
output = output.replace(/\#/, formatterSettings.decimalSymbol);
return output;
@nortakales I'm really missing this feature. Would this be merged if it was made into a pull request or are there any parts that needs to be rewritten?
I'll look into it this week. I think it should be fairly straightforward, I just want to make sure I honor existing settings or somehow migrate them to the new settings so I don't change things unexpectedly for existing users.
Added these settings in version 0.3.0. Let me know if there are any issues.
Commit: https://github.com/nortakales/vs-code-qalc/commit/92ad4e6b9df17d4d8911e7b621fa7143726cdc7f
Qalc 0.1.8.
I suggest some changes to the settings.
Remove this:
and add these two:
Like Windows 10:
Now
Now I am much more free to choose the I prefer format.
English format (like qalc.output.displayCommas": true)
English format (like qalc.output.displayCommas": false)
Italian format
Other format
Thank's for your job!