Closed jruales closed 1 year ago
Yeah good point. A simple check like:
Object.keys(values).length
would be a minor optimization. Any interest in submitting a PR? This is a pretty quick fix.
@TylerLeonhardt I've created the PR. Do you know if this would need to be done in vscode.l10n.t()
as well? Where's the code for that?
I've created another PR for that too. See: https://github.com/microsoft/vscode/pull/194854
Looking at the file l10n/src/main.ts it seems like it's always running a regex replace, even if the call to
t()
didn't receive any replacement args. I'm thinking that there could be an optimization where the program just returns the unchanged string in such cases, instead of running a no-op regex replacement.