tis-vscode-lp-fr
1.68.0-19
French Language Pack for Visual Studio Code
7933 downloads
See build result See VirusTotal scan

Description
- package : tis-vscode-lp-fr
- name : French Language Pack VSCode Extension
- version : 1.68.0-19
- categories : Development
- maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
- installed_size : 2107328
- editor : Microsoft
- licence :
- signature_date : 2022-05-23T05:00:11.678178
- size : 358.07 Ko
- locale :
- target_os : all
- impacted_process :
- architecture : all
- Depends :
control
package : tis-vscode-lp-fr
version : 1.68.0-19
architecture : all
section : base
priority : optional
name : French Language Pack VSCode Extension
categories : Development
maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
description : French Language Pack for Visual Studio Code
depends : tis-vscode
conflicts :
maturity : PROD
locale :
target_os : all
min_wapt_version : 2.0
sources : https://marketplace.visualstudio.com/items/MS-CEINTL.vscode-language-pack-fr
installed_size : 2107328
impacted_process :
description_fr : Module linguistique français pour Visual Studio Code
description_pl :
description_de :
description_es :
description_pt :
description_it :
description_nl :
description_ru :
audit_schedule :
editor : Microsoft
keywords :
licence :
homepage :
package_uuid : 5c5c1afe-8659-4e4e-9ca4-cd6d2e250ea5
valid_from :
valid_until :
forced_install_on :
changelog : https://marketplace.visualstudio.com/items/MS-CEINTL.vscode-language-pack-fr/changelog
min_os_version :
max_os_version :
icon_sha256sum : 00446b52fa5fe7550f8618f5fe8a8dbba6d1b241fecb01490dc9ac4c90da04ac
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature : UIQOd5IjdDqNhyaMESbhY4XPiQ42uaBsig4eyfiRtQf/XlTkwXcz0opQIqL0pgzEuBKPovb0zL1bwuL6gzWt6XdJWth4oLCGpsC8hN4YTL0KDWpQWqu8g6OsY7UK1D3Dshx1LpcNzvPIiyTKHg3vugW0PcKaealyEBSW0WZUVSjM/DAQfeMmlTta6r0cU0Oxh6BTcwCRt9dy/Q5ypWHFU3u93nYi4IRgHw1euWOU9n2dn8RH+2zjIWyl/HCW/nMAnF/gdGKN7KeqHBxqtfESx62peh+GV6I0/oNQVkadXzBbCbV3gq7pgWXjp+tvyftv8EfW+FywHxTn2r6OMeKkSQ==
signature_date : 2022-05-23T05:00:11.678178
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
Setup.py
# -*- coding: utf-8 -*-
from setuphelpers import *
import json
import requests
import time
r"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()
"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
ext_uid_name = "MS-CEINTL.vscode-language-pack-fr"
ext_file_name = "%s.vsix" % ext_uid_name
default_locale = "" # "" to avoid automatic change, force locale only if needed
def install():
# Initializing variables
package_version = control.get_software_version()
if get_os_name() == "Windows":
app_dir = makepath(programfiles, "Microsoft VS Code")
app_bin_path = makepath(app_dir, "bin", "code")
elif get_os_name() == "Linux":
app_dir = makepath("/", "usr", "share", "code")
app_bin_path = makepath(app_dir, "bin", "code")
elif get_os_name() == "Darwin":
app_dir = makepath("/", "Applications", "Visual Studio Code.app")
app_bin_path = makepath(app_dir, "Contents", "Resources", "app", "bin", "code")
ext_path = makepath(app_dir, ext_file_name)
# Copying extension to app_dir
print("Copying: %s (%s)" % (ext_path, package_version))
filecopyto(ext_file_name, app_dir)
def session_setup():
# Initializing variables
package_version = control.get_software_version()
if get_os_name() == "Windows":
app_dir = makepath(programfiles, "Microsoft VS Code")
app_bin_path = makepath(app_dir, "bin", "code")
elif get_os_name() == "Linux":
app_dir = makepath("/", "usr", "share", "code")
app_bin_path = makepath(app_dir, "bin", "code")
elif get_os_name() == "Darwin":
app_dir = makepath("/", "Applications", "Visual Studio Code.app")
app_bin_path = makepath(app_dir, "Contents", "Resources", "app", "bin", "code")
ext_path = makepath(app_dir, ext_file_name)
user_app_dir = makepath(user_home_directory, ".vscode")
user_argv_conf_file = makepath(user_app_dir, "argv.json")
# Installing extension in user env
print("Installing: %s (%s) extension in user env" % (ext_file_name, package_version))
try:
run('"%s" --install-extension "%s"' % (app_bin_path, ext_path))
except:
print("Unable to install extension with: %s" % ext_path)
try:
run('"%s" --install-extension "%s" --force' % (app_bin_path, ext_uid_name))
except:
print("Unable to force install %s extension" % ext_uid_name)
# Applying locale as default
if default_locale:
print("Applying: %s as default locale" % default_locale)
user_argv_conf_content = '{"locale": "%s"}' % default_locale
user_argv_conf_data = json.loads(user_argv_conf_content)
if not isdir(user_app_dir):
mkdirs(user_app_dir)
if not isfile(user_argv_conf_file):
print("Creating: %s" % user_argv_conf_file)
json_write_file(user_argv_conf_file, user_argv_conf_data)
else:
with open(user_argv_conf_file, "r+") as opened_file_lines:
file_changed = False
locale_found = False
new_data = []
for line in opened_file_lines.readlines():
if '"crash-reporter-id"' in line:
if not "," in line:
line = line.replace("\n", ",\n")
file_changed = True
if '"locale"' in line:
locale_found = True
if not '"locale": "%s"' % default_locale in line:
line = '\t"locale": "%s",\n' % default_locale
file_changed = True
new_data.append(line)
if file_changed:
print("Updating: %s" % user_argv_conf_file)
opened_file_lines.seek(0) # Return to the top of the file
opened_file_lines.truncate(0) # Erase next content of the file
opened_file_lines.writelines(new_data[0:]) # Writing new data to the file
if not locale_found:
print("Updating: %s" % user_argv_conf_file)
with open(user_argv_conf_file, "r+") as opened_file:
file_content = opened_file.read()
file_content = file_content.replace("}", '\t"locale": "%s",\n}' % default_locale)
opened_file.seek(0) # Return to the top of the file
opened_file.truncate(0) # Erase next content of the file
opened_file.write(file_content)
else:
print("Resetting default locale")
with open(user_argv_conf_file, "r") as opened_file:
file_content = opened_file.read()
if '"locale"' in file_content:
print("Updating: %s" % user_argv_conf_file)
with open(user_argv_conf_file, "r+") as opened_file_lines:
new_data = []
for line in opened_file_lines.readlines():
if "locale" in line:
line = ""
new_data.append(line)
opened_file_lines.seek(0) # Return to the top of the file
opened_file_lines.truncate(0) # Erase next content of the file
opened_file_lines.writelines(new_data[0:]) # Writing new data to the file
"""
# Dirty way to make sure that the LP is applied on first run
run("code")
time.sleep(15)
killalltasks("code") """
def audit():
# Initializing variables
package_version = control.get_software_version()
if get_os_name() == "Windows":
app_dir = makepath(programfiles, "Microsoft VS Code")
app_bin_path = makepath(app_dir, "bin", "code")
elif get_os_name() == "Linux":
app_dir = makepath("/", "usr", "share", "code")
app_bin_path = makepath(app_dir, "bin", "code")
elif get_os_name() == "Darwin":
app_dir = makepath("/", "Applications", "Visual Studio Code.app")
app_bin_path = makepath(app_dir, "Contents", "Resources", "app", "bin", "code")
ext_path = makepath(app_dir, ext_file_name)
if isfile(ext_path):
print("OK: %s (%s) extension present" % (ext_file_name, package_version))
return "OK"
else:
print("ERROR: %s (%s) extension absent" % (ext_file_name, package_version))
return "ERROR"
def uninstall():
# Initializing variables
package_version = control.get_software_version()
if get_os_name() == "Windows":
app_dir = makepath(programfiles, "Microsoft VS Code")
app_bin_path = makepath(app_dir, "bin", "code")
elif get_os_name() == "Linux":
app_dir = makepath("/", "usr", "share", "code")
app_bin_path = makepath(app_dir, "bin", "code")
elif get_os_name() == "Darwin":
app_dir = makepath("/", "Applications", "Visual Studio Code.app")
app_bin_path = makepath(app_dir, "Contents", "Resources", "app", "bin", "code")
ext_path = makepath(app_dir, ext_file_name)
# Removing extension from app_dir
print("Removing: %s" % ext_path)
remove_file(ext_path)
# removing extension from user profiles
print(remove_tree_for_all_users(makepath(".vscode", "extensions", "%s-*" % ext_uid_name)))
def update_package():
# Declaring local variables
result = False
proxies = get_proxies()
if not proxies:
proxies = get_proxies_from_wapt_console()
app_name = control.name
url = "https://marketplace.visualstudio.com/items/%s" % ext_uid_name
app_name = control.name
api_url = "https://api.github.com/repos/microsoft/vscode-loc/releases/latest"
# Getting latest version information from official sources
print("API used is: %s" % api_url)
json_load = json.loads(wgets(api_url, proxies=proxies))
for download in json_load["assets"]:
if "vscode-language-pack-fr-" in download["name"]:
download_url = download["browser_download_url"]
version = json_load["tag_name"].split("/")[-1]
latest_bin = ext_file_name
break
print("Latest %s version is: %s" % (app_name, version))
print("Download URL is: %s" % download_url)
# Downloading latest binaries
print("Downloading: %s" % latest_bin)
wget(download_url, latest_bin, proxies=proxies)
# Changing version of the package
if Version(version) > control.get_software_version():
print("Software version updated from: %s to: %s" % (control.get_software_version(), Version(version)))
result = True
control.version = "%s-%s" % (Version(version), control.version.split("-", 1)[-1])
# control.set_software_version(Version(version))
control.save_control_to_wapt()
# Validating update-package-sources
return result
def remove_tree_for_all_users(user_folder_relative_path, ignored_users=None, ignore_system_users=True):
r"""Remove a specific folder or folders for all user's profiles
Args:
user_folder_relative_path (str): relative path to user folder, glob patterns can be used
ignored_users (str or list of str): ignore specified users
ignore_system_users (bool): ignore default, public, all users, etc. True by default
Returns:
list: list of deleted folders
>>> print(remove_tree_for_all_users(makepath(".vscode", "extensions", "ms-toolsai.jupyter-*")))
['C:\\Users\\username\\.vscode\\extensions\\ms-toolsai.jupyter-2022.2.1001817079', 'C:\\Users\\username\\.vscode\\extensions\\ms-toolsai.jupyter-keymap-1.0.0', 'C:\\Users\\username\\.vscode\\extensions\\ms-toolsai.jupyter-renderers-1.0.6']
>>> print(remove_tree_for_all_users(makepath(".vscode", "extensions", "ms-toolsai.jupyter-")))
[]
>>> print(remove_tree_for_all_users(makepath(".vscode", "extensions", "ms-toolsai.jupyter-[a-z]*")))
['C:\\Users\\username\\.vscode\\extensions\\ms-toolsai.jupyter-keymap-1.0.0', 'C:\\Users\\username\\.vscode\\extensions\\ms-toolsai.jupyter-renderers-1.0.6']
>>> print(remove_tree_for_all_users(makepath(".vscode", "extensions", "ms-toolsai.jupyter-1.0.0")))
['/home/username/.vscode/extensions/ms-toolsai.jupyter-keymap-1.0.0']
.. versionadded:: 2.3
"""
system_users_list = ["All Users", "Default", "Default User", "Public", "Shared"]
if ignored_users is None:
ignored_users = []
if type(ignored_users) != list:
ignored_users = [ignored_users]
deleted_folders = []
skipped_users = []
if ignored_users:
skipped_users.extend(ignored_users)
if ignore_system_users:
skipped_users.extend(system_users_list)
if get_os_name() == "Windows":
users_dir = makepath(systemdrive, "Users")
elif get_os_name() == "Linux":
users_dir = "/home"
elif get_os_name() == "Darwin":
users_dir = "/Users"
for user_profile in glob.glob("%s/*/" % users_dir):
for ignored_user in ignored_users:
if user_profile.rstrip(os.path.sep).split(os.path.sep)[-1] == ignored_user:
continue
for user_folder_to_delete in glob.glob(r"%s" % makepath(user_profile, user_folder_relative_path)):
deleted_folders.append(user_folder_to_delete)
remove_tree(user_folder_to_delete)
return deleted_folders
6825e04cf452c38294963bf15dc3d09ee77a7711583f927296876a033f068d1e : setup.py
00446b52fa5fe7550f8618f5fe8a8dbba6d1b241fecb01490dc9ac4c90da04ac : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
9d9d567be8f761c3cf60a905015eba063c4ce9cbeeff901d578cc3eff6f894f2 : luti.json
925c761c89e1026223cf1fef4039eeb92a58038a5f55002874b5ed1fc0f60aec : MS-CEINTL.vscode-language-pack-fr.vsix
7a9ec297c3eaf17d7903aa8e9f0252924f5b151ae5e3e049a1b0f025865c062d : WAPT/control