Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

baseFile in multi-project / folder workspaces #34

Closed
fvet opened this issue Dec 12, 2019 · 3 comments
Closed

baseFile in multi-project / folder workspaces #34

fvet opened this issue Dec 12, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@fvet
Copy link

fvet commented Dec 12, 2019

Our current workspace setup is composed of various folders/projects (one per dependend extension). Each project/folder has its own .vscode folder with a separate settings.json file. Where possible, we like to use a general settings.json file that does not contain differences with the other projects / folders.

Currently, each settings.json files contains one variable setting "xliffSync.baseFile": "extension name.g.xlf". Would be nice if we could replace this with "xliffSync.baseFile": "*.g.xlf" instead, so we could reuse the settings.json it across different extensions. (Given the condition that there's normally one only g.xlf file per project / folder)

@rvanbekkum rvanbekkum added the enhancement New feature or request label Dec 12, 2019
@rvanbekkum
Copy link
Owner

Dear @fvet,
Thank you for reporting your issue. This is indeed a good idea. Currently we are also updating this setting for each project, but it would indeed be better if we can have it the same for each project.

After looking into this, I noticed you can already do this, but then you will need to add the following setting:

"xliffSync.baseFile": ".g.xlf"

This is because the function getXliffSourceFile uses uri.fsPath.indexOf(baseFile) >= 0 to retrieve the URI of the base file (i.e., checks if the file path contains the xliffSync.baseFile setting value).

I think I will leave it this way, but maybe I can change the default value of this setting to become "xliffSync.baseFile": ".g.xlf".
That way, you won't even have to include the setting in your settings.json anymore and it will just search for a file with .g.xlf in the filename.
What do you think about this?

@fvet
Copy link
Author

fvet commented Dec 15, 2019

Hey Rob,

Hadn't tried with that setting yet. I've updated all settings to the .g.xlf value, would be nice though if it could be the default value ;)

@rvanbekkum
Copy link
Owner

This change is now included in version 0.3.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants