Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ To create a translation file.
```shell
./setup.py create_translation --locale=fr
```

## For Development discussion

You can join us at [#networkmgr](irc://irc.libera.chat:6697/networkmgr) on irc.libera.chat:6697
To update all translation files
```shell
./setup.py update_translations
```
4 changes: 0 additions & 4 deletions compile_translations.sh

This file was deleted.

2 changes: 2 additions & 0 deletions po/POTFILES.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
networkmgr
networkmgr_configuration
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion po/pt_Br.po
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ msgstr ""
"Language-Team: Portuguese <translation-team-pt@lists.sourceforge.net>\n"
"Language: pt_Br\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ASCII\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

Expand Down
File renamed without changes.
File renamed without changes.
24 changes: 12 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
import sys
from platform import system
from subprocess import run

from setuptools import setup, Command, glob
from DistUtilsExtra.command.build_extra import build_extra
from DistUtilsExtra.command.build_i18n import build_i18n
from DistUtilsExtra.command.clean_i18n import clean_i18n

__VERSION__ = '6.6'
__VERSION__ = '6.7'
PROGRAM_VERSION = __VERSION__

prefix = '/usr/local' if system() == 'FreeBSD' else sys.prefix


def datafilelist(installbase, sourcebase):
datafileList = []
for root, subFolders, files in os.walk(sourcebase):
Expand Down Expand Up @@ -77,7 +78,7 @@ def run(self):
if not os.path.exists(po_file):
print(f"Creating new {po_file} for locale '{self.locale}'...")
os.makedirs(po_dir, exist_ok=True)
os.system(f'msginit --locale={self.locale} --input={pot_file} --output-file={po_file}')
os.system(f'msginit --locale={self.locale}.UTF-8 --input={pot_file} --output-file={po_file}')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security (python.lang.security.audit.dangerous-system-call-audit): Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.

Source: opengrep

else:
print(f"PO file for locale '{self.locale}' already exists: {po_file}")

Expand All @@ -91,17 +92,13 @@ def run(self):
data_files = [
(f'{prefix}/etc/xdg/autostart', ['src/networkmgr.desktop']),
(f'{prefix}/share/networkmgr', networkmgr_share),
(f'{prefix}/share/locale/zh_CN/LC_MESSAGES', ['src/locale/zh_CN/networkmgr.mo']),
(f'{prefix}/share/locale/ru/LC_MESSAGES', ['src/locale/ru/networkmgr.mo']),
(f'{prefix}/etc/sudoers.d', ['src/sudoers.d/networkmgr'])
(f'{prefix}/etc/sudoers.d', ['src/sudoers.d/networkmgr']),
(f'{prefix}/etc/devd', ['src/networkmgr.conf'])
]

if os.path.exists('/etc/devd'):
data_files.append((f'{prefix}/etc/devd', ['src/networkmgr.conf']))
if os.path.exists('/etc/devd-openrc'):
data_files.append((f'{prefix}/etc/devd-openrc', ['src/networkmgr.conf']))

data_files.extend(datafilelist(f'{prefix}/share/icons/hicolor', 'src/icons'))
data_files.extend(datafilelist(f'{prefix}/share/locale', 'build/mo'))


setup(
name="NetworkMgr",
Expand All @@ -118,6 +115,9 @@ def run(self):
cmdclass={
'create_translation': CreateTranslationCommand,
'update_translations': UpdateTranslationsCommand,
"build": build_extra,
"build_i18n": build_i18n,
"clean": clean_i18n
}
)

Expand Down
113 changes: 0 additions & 113 deletions src/locale/networkmgr.pot

This file was deleted.

114 changes: 0 additions & 114 deletions src/locale/zh_CN/networkmgr.po

This file was deleted.

2 changes: 0 additions & 2 deletions src/setup-nic.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,5 @@ def file_content(paths):
if f'ifconfig_{nic}=' not in rc_conf_content:
with rc_conf.open('a') as rc:
rc.writelines(f'ifconfig_{nic}="DHCP"\n')
with open(f'/tmp/network-{nic}', 'w') as network:
network.writelines(f'attached')

Popen(f'/etc/pccard_ether {nic} startchildren', shell=True)
6 changes: 0 additions & 6 deletions update_translations.sh

This file was deleted.