Skip to content

Commit

Permalink
updated translations and fixed linux native messaging issue
Browse files Browse the repository at this point in the history
  • Loading branch information
subhra74 committed May 21, 2020
1 parent fe50900 commit 29153d1
Show file tree
Hide file tree
Showing 13 changed files with 983 additions and 325 deletions.
1 change: 0 additions & 1 deletion app/src/main/java/xdman/XDMApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -1402,5 +1402,4 @@ public ArrayList<VideoPopupItem> getVideoItemsList() {
public MainWindow getMainWindow() {
return mainWindow;
}

}
2 changes: 1 addition & 1 deletion app/src/main/java/xdman/ui/res/ImageResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static Icon getIcon(String icon, int width, int height) {
BufferedImage image = ImageIO.read(ImageResource.class.getResource("/icons/xxhdpi/" + icon));
BufferedImage scaledImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);

System.out.println("------*** " + image.getWidth() + " " + width);
//System.out.println("------*** " + image.getWidth() + " " + width);

Graphics2D g2 = scaledImage.createGraphics();
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
Expand Down
44 changes: 17 additions & 27 deletions app/src/main/java/xdman/util/NativeMessagingHostInstaller.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ public class NativeMessagingHostInstaller {

private static final String FIREFOX_EXTENSION_IDS = String.join(",", "\"browser-mon@xdman.sourceforge.net\"");

private static final String CHROME_LINUX_LOCATION = "~/.config/google-chrome/NativeMessagingHosts",
FIREFOX_LINUX_LOCATION = "~/.mozilla/native-messaging-hosts",
CHROME_MAC_LOCATION = "~/Library/Application Support/Google/Chrome/NativeMessagingHosts",
FIREFOX_MAC_LOCATION = "~/Library/Application Support/Mozilla/NativeMessagingHosts",
CHROMIUM_LINUX_LOCATION = "~/.config/chromium/NativeMessagingHosts",
CHROMIUM_MAC_LOCATION = "~/Library/Application Support/Chromium/NativeMessagingHosts";
private static final String CHROME_LINUX_LOCATION = ".config/google-chrome/NativeMessagingHosts",
FIREFOX_LINUX_LOCATION = ".mozilla/native-messaging-hosts",
CHROME_MAC_LOCATION = "Library/Application Support/Google/Chrome/NativeMessagingHosts",
FIREFOX_MAC_LOCATION = "Library/Application Support/Mozilla/NativeMessagingHosts",
CHROMIUM_LINUX_LOCATION = ".config/chromium/NativeMessagingHosts",
CHROMIUM_MAC_LOCATION = "Library/Application Support/Chromium/NativeMessagingHosts";

public static final synchronized void installNativeMessagingHostForChrome() {
installNativeMessagingHostForChrome(XDMUtils.detectOS(), false);
Expand All @@ -51,9 +51,7 @@ private static final void installNativeMessagingHostForChrome(int os, boolean ch
}
}
File manifestFile = new File(Config.getInstance().getDataFolder(), "xdm_chrome.native_host.json");
File nativeHostFile = new File(XDMUtils.getJarFile().getParentFile(),
System.getProperty("os.name").toLowerCase().contains("windows") ? "native_host.exe"
: "native_host");
File nativeHostFile = new File(XDMUtils.getJarFile().getParentFile(), "native_host.exe");
createNativeManifest(manifestFile, nativeHostFile, BrowserType.Chrome);
try {
Advapi32Util.registrySetStringValue(WinReg.HKEY_CURRENT_USER,
Expand All @@ -65,18 +63,14 @@ private static final void installNativeMessagingHostForChrome(int os, boolean ch
return;
}
} else {
File manifestFolder = new File(os == XDMUtils.MAC ? (chromium ? CHROMIUM_MAC_LOCATION : CHROME_MAC_LOCATION)
: (chromium ? CHROMIUM_LINUX_LOCATION : CHROME_LINUX_LOCATION));
File manifestFolder = new File(System.getProperty("user.home"),
os == XDMUtils.MAC ? (chromium ? CHROMIUM_MAC_LOCATION : CHROME_MAC_LOCATION)
: (chromium ? CHROMIUM_LINUX_LOCATION : CHROME_LINUX_LOCATION));
if (!manifestFolder.exists()) {
manifestFolder.mkdirs();
}
File manifestFile = new File(
os == XDMUtils.MAC ? (chromium ? CHROMIUM_MAC_LOCATION : CHROME_MAC_LOCATION)
: (chromium ? CHROMIUM_LINUX_LOCATION : CHROME_LINUX_LOCATION),
"xdm_chrome.native_host.json");
File nativeHostFile = new File(XDMUtils.getJarFile().getParentFile(),
System.getProperty("os.name").toLowerCase().contains("windows") ? "native_host.exe"
: "native_host");
File manifestFile = new File(manifestFolder, "xdm_chrome.native_host.json");
File nativeHostFile = new File(XDMUtils.getJarFile().getParentFile(), "native_host");
createNativeManifest(manifestFile, nativeHostFile, BrowserType.Chrome);
}

Expand All @@ -95,9 +89,7 @@ public static final void installNativeMessagingHostForFireFox(int os) {
}

File manifestFile = new File(Config.getInstance().getDataFolder(), "xdmff.native_host.json");
File nativeHostFile = new File(XDMUtils.getJarFile().getParentFile(),
System.getProperty("os.name").toLowerCase().contains("windows") ? "native_host.exe"
: "native_host");
File nativeHostFile = new File(XDMUtils.getJarFile().getParentFile(), "native_host.exe");
createNativeManifest(manifestFile, nativeHostFile, BrowserType.Firefox);
try {
Advapi32Util.registrySetStringValue(WinReg.HKEY_CURRENT_USER,
Expand All @@ -109,15 +101,13 @@ public static final void installNativeMessagingHostForFireFox(int os) {
return;
}
} else {
File manifestFolder = new File(os == XDMUtils.MAC ? FIREFOX_MAC_LOCATION : FIREFOX_LINUX_LOCATION);
File manifestFolder = new File(System.getProperty("user.home"),
os == XDMUtils.MAC ? FIREFOX_MAC_LOCATION : FIREFOX_LINUX_LOCATION);
if (!manifestFolder.exists()) {
manifestFolder.mkdirs();
}
File manifestFile = new File(os == XDMUtils.MAC ? FIREFOX_MAC_LOCATION : FIREFOX_LINUX_LOCATION,
"xdmff.native_host.json");
File nativeHostFile = new File(XDMUtils.getJarFile().getParentFile(),
System.getProperty("os.name").toLowerCase().contains("windows") ? "native_host.exe"
: "native_host");
File manifestFile = new File(manifestFolder, "xdmff.native_host.json");
File nativeHostFile = new File(XDMUtils.getJarFile().getParentFile(), "native_host");
createNativeManifest(manifestFile, nativeHostFile, BrowserType.Firefox);
}
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/resources/lang/ar.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ REF_DESC1=الرجاء فتح صفحة الويب في المتصفح، حيث
REF_DESC2=يرجى النقر على الزر أدناه وتحديد تنسيق الفيديو نفسه مرة أخرى
REF_OPEN_PAGE=فتح محتوى على صفحة ويب
REF_WAITING_FOR_LINK=...في انتظار رابط التحميل
MB_OK=اوك
MB_OK=موافق
MB_YES=نعم
MB_NO=ﻻ
DEL_TITLE=حذف التاكيد
Expand Down Expand Up @@ -265,7 +265,7 @@ MENU_LANG=لغة
MSG_LANG1=اختار اللغة
MSG_LANG2=XDM يرجى ملاحظة أن التغييرات ستدخل حيز التنفيذ في المرة القادمة التي تبدأ فيها
CTX_COPY=نسخ
CTX_CUT=قطع
CTX_CUT=قص
CTX_PASTE=لصق
CTX_SELECT_ALL=اختر الكل
MSG_COMPONENT_TITLE=تثبيت العناصر
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/resources/lang/en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -331,5 +331,4 @@ LBL_BATCH_FILEN=Last file
LBL_SHOW_PROGRESS=Show progress
LBL_FILE_TYPE=File type
LBL_ALL_QUEUE=All queues
LBL_SHOW_VIDEO_ONLY_IN_BROWSER=Disable floating 'DOWNLOAD VIDEO' popup
LBL_ZOOM_LEVEL=Zoom screen (needs restart)
LBL_SHOW_VIDEO_ONLY_IN_BROWSER=Disable floating 'DOWNLOAD VIDEO' popup
86 changes: 43 additions & 43 deletions app/src/main/resources/lang/id.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LANGUAGE_TEXT=Indonesia (Bahasa Indonesia)
LANGUAGE_TEXT=Bahasa Indonesia
WINDOW_TITLE=XDM 2018
ALL_DOWNLOADS=Semua
ALL_UNFINISHED=Belum Selesai
Expand All @@ -9,14 +9,14 @@ CAT_COMPRESSED=Kompresi
CAT_MUSIC=Musik
CAT_VIDEOS=Video
CAT_PROGRAMS=Program
BROWSER_MONITORING=Monitor Browser
BROWSER_MONITORING=Pemantau Browser
MENU_FILE=Berkas
MENU_DOWNLOAD=Unduhan
MENU_TOOLS=Alat
MENU_HELP=Bantuan
MENU_ADD_URL=Tambah URL
MENU_BATCH_DOWNLOAD=Unduh rangkap
MENU_CLIP_ADD=Monitor clipboard
MENU_CLIP_ADD=Monitor papan klip
MENU_VIDEO_DWN=Unduh video
MENU_DELETE_DWN=Hapus unduhan
MENU_DELETE_COMPLETED=Hapus unduhan selesai
Expand All @@ -33,7 +33,7 @@ MENU_REFRESH_LINK=Segarkan link
MENU_PROPERTIES=Properti
MENU_FORCE_ASSEMBLE=Paksa gabungkan
MENU_SPEED_LIMITER=Batasi Kecepatan
MENU_MEDIA_CONVERTER=Konverter media
MENU_MEDIA_CONVERTER=Konversi media
MENU_BROWSER_INT=Monitor Browser
MENU_CONTENTS=Konten...
MENU_HOME_PAGE=Beranda
Expand Down Expand Up @@ -75,14 +75,14 @@ DWN_HIDE=Sembunyikan
DWN_DOWNLOAD=Telah diunduh
MSG_OK=OK
MSG_FAILED=Unduhan gagal
ERR_SESSION_FAILED=Sesi unduhan telah kadaluarsa, silahkan segarkan alamat unduhan.
ERR_SESSION_FAILED=Sesi unduhan telah kedaluarsa, silahkan segarkan alamat unduhan.
ERR_CONN_FAILED=Tidak dapat menghubungkan ke server, silahkan periksa koneksi internet, pengaturan proxy atau konfigurasi firewall.
ERR_INVALID_RESP=XDM tidak dapat mengunduh data dari server, respon tidak valid.
ERR_NO_RESUME=Server tidak mendukung proses melanjutkan, silahkan ulangi unduhan.
RESUME_FAILED=Unduhan tidak dapat dilanjutkan/dimulai.
ERR_INTERNAL=Internal bermasalah.
ERR_ASM_FAILED=Gagal untuk menambah/mengkonversi bagian-bagian berkas, silahkan periksa apakah penyimpanan penuh atau diproteksi
ERR_DISK_FAILED=Kegagalan disk.
ERR_DISK_FAILED=Kegagalan penyimpanan.
LBL_MENU=Menu
TITLE_SETTINGS=Pengaturan
SETTINGS_GENERAL=Pengaturan Dasar
Expand All @@ -93,7 +93,7 @@ DUT_ACT_RENAME=Otomatis ganti nama
DUP_ACT_PROMPT=Ingatkan
DUP_ACT_OPEN=Lanjutkan/Buka
DUP_ACT_OVERWRITE=Timpa
SETTINGS_FOLDER=Folder unduhan default
SETTINGS_FOLDER=Folder unduhan baku
SETTINGS_FOLDER_CHANGE=Ubah
SETTINGS_MONITORING=Monitor browser
SETTINGS_NETWORK=Pengaturan jaringan
Expand Down Expand Up @@ -156,7 +156,7 @@ MSG_Q_START=Mulai antrian pada
MSG_Q_STOP=Hentikan antrian pada
MSQ_Q_ONETIME=Sekali pada
MSG_Q_DAILY=Harian
MSG_Q_D1=Ahad
MSG_Q_D1=Minggu
MSG_Q_D2=Senin
MSG_Q_D3=Selasa
MSG_Q_D4=Rabu
Expand All @@ -167,16 +167,16 @@ MSG_Q_D7=Sabtu
MSG_MAX_DOWNLOAD=Unduhan simultan maksimal

DESC_ADV_TITLE=Pengaturan lanjutan
MSG_HALT=Shutdown komputer setelah semua unduhan selesai
MSG_AWAKE=Cegah hibernate atau sleep ketika mengunduh
MSG_HALT=Matikan komputer setelah semua unduhan selesai
MSG_AWAKE=Cegah hibernasi atau mode siaga ketika mengunduh
EXEC_CMD=Jalankan program setelah semua unduhan selesai
EXE_ANTI_VIR=Scan berkas dengan antivirus setelah diunduh
ANTIVIR_CMD=Antivirus executable
EXE_ANTI_VIR=Pindai berkas dengan antivirus setelah diunduh
ANTIVIR_CMD=Letak Program antivirus
ANTIVIR_ARGS=Parameter baris perintah
AUTO_START=Jalankan XDM ketika sistem dimulai
MSG_SPEED_LIMIT=Batas kecepatan unduh [KB/Sec ](0 unlimited)
MSG_SPEED_LIMIT=Batas kecepatan unduh [KB/dtk ](0 tanpa batas)
SPEED_LIMIT_TITLE=Batas kecepatan
DEF_QUEUE=Antrian default
DEF_QUEUE=Antrian standar
Q_LIST_DESC=Antrian
Q_LIST_FILES=Berkas di antrian
Q_SCHEDULE_TXT=Jadwal
Expand Down Expand Up @@ -210,7 +210,7 @@ PROP_DATE=Tanggal
PROP_TYPE=Tipe
PROP_REFERER=Rujukan
PROP_COOKIE=Kuki
REF_TITLE=SEGARKAN LINK
REF_TITLE=SEGARKAN TAUTAN
REF_DESC1=Silahkan buka halaman web di browser, dimana link unduhan ditemukan. Jika video streaming, silahkan putar video dan pilih format yang sama.
REF_DESC2=Silahkan tekan tombol dibawah dan pilih format video yang sama kembali.
REF_OPEN_PAGE=Buka halaman web
Expand All @@ -228,7 +228,7 @@ OPT_UPDATE_FFMPEG=Perbarui komponen
LBL_COMPONENT_MISSING=XDM memerlukan komponen tambahan agar berfungsi dengan maksimal
LBL_COMPONENT_DESC=Diperlukan unduhan sekitar 14MB
LBL_COMPONENT_OUTDATED=Perbarui komponen XDM
LBL_APP_OUTDATED=Tersedia versi terbaru XDM
LBL_APP_OUTDATED=Versi terbaru XDM tersedia
LBL_UPDATE_DESC=Silahkan perbarui XDM untuk meningkatkan fungsionalitas
LBL_INSTALL_NOW=Pasang Sekarang
LBL_CONV_FAILED=Konversi Gagal
Expand All @@ -239,15 +239,15 @@ PROMPT_PROXY=Proxy memerlukan nama pengguna dan kata sandi
BTN_BROWSE=Jelajah
TITLE_ABOUT=TENTANG XDM
FULL_NAME=Xtreme Download Manager
ABOUT_DETAILS=Versi aplikasi %s dengan runtime %s pada %s\n\nDibuat oleh: Subhra Das Gupta\n\n%s\nCopyright (C) 2018, All rights reserved.
ABOUT_DETAILS=Versi aplikasi %s dengan runtime %s pada %s\n\nDibuat oleh: Subhra Das Gupta\n\n%s\nHak cipta (C) 2018, Hak cipta dilindungi.
BTN_SEARCH_VIDEO=Temukan
BTN_DOWNLOAD_NOW=Unduh sekarang
BTN_DOWNLOAD_LATER=Unduh nanti
BTN_STOP_PROCESSING=Hentikan
BTN_BACK=Kembali
MSG_REF_LINK_CONFIRM=KONFIRMASI
MSG_REF_LINK_MSG=Link unduhan baru telah diterima
MSG_REF_LINK_QUESTION=Link unduhan baru ditemukan, gunakan link ini?
MSG_REF_LINK_QUESTION=Link unduhan baru ditemukan, gunakan alamat ini?
TITLE_DOWN_VID=UNDUH VIDEO
THEME_EDITOR=Editor Tema
MSG_ADDON_TITLE=PASANG ADDON
Expand Down Expand Up @@ -277,7 +277,7 @@ LBL_QUEUE_OPT1=Buat antrian baru
LBL_QUEUE_OPT2=Tambahkan ke antrian yang ada
LBL_QUEUE_OPT3=Jangan gunakan antrian
LBL_NEW_QUEUE=Nama
LBL_CONVERT_TO=Konvert ke
LBL_CONVERT_TO=Konversi ke
LBL_OUTPUT_FOLDER=Folder keluaran
LBL_LOADING=Memuat %s
LBL_FILE_CONVERT_PRG=Sedang mengkonversi %s
Expand All @@ -299,35 +299,35 @@ LBL_SELECT_ALL=Pilih semua
LBL_NOT_A_VIDEO=Unduhan bukan video atau tidak dapat dipratinjau. Apakah anda ingin melihat bagian-bagian berkas yang diunduh?
LBL_TRANSLATED_BY=Subhra Das Gupta
LBL_BATCH_EMPTY_CLIPBOARD=Clipboard kosong
LBL_REPORT_PROBLEM=Laporkan bug
LBL_LIKE_ON_FB=Like on Facebook
LBL_REPORT_PROBLEM=Laporkan kutu
LBL_LIKE_ON_FB=Sukai di Facebook
LBL_SUPPORT_PAGE=Halaman dukungan
LBL_OPTIMIZE_NETWORK=Optimalisasi jaringan
LBL_NET_OPT_MSG=Pilih tipe jaringan anda
LBL_NET_OPT_DEF=Default sistem
LBL_NET_OPT_64=Kecepatan rendah: Dial Up modem / ISDN / Bluetooth / Mobile Edge / IrDA
LBL_NET_OPT_128=Kecepatan sedang: ADSL / DSL / Mobile 3G / Wi-Fi / Bluetooth 3.0 / lainnya
LBL_NET_OPT_256=kecepatan tinggi: Koneksi langsung (Ethernet/Cable) / Wi-Fi / Mobile 4G / lainnya
LBL_NET_OPT_64=Kecepatan rendah: modem Dial Up / ISDN / Bluetooth / Jaringan Edge / Inframerah
LBL_NET_OPT_128=Kecepatan sedang: ADSL / DSL / Jaringan 3G / Wi-Fi / Bluetooth 3.0 / lainnya
LBL_NET_OPT_256=kecepatan tinggi: Koneksi langsung (Ethernet/Kabel) / Wi-Fi / Jaringan 4G / lainnya
LBL_TRANSLATE=Terjemahkan XDM
LBL_TWITTER_PAGE=XDM on Twitter
LBL_GET_TIMESTAMP=Dapatkan timestamp dari server
LBL_GET_TIMESTAMP=Dapatkan waktu dari server
LBL_TRANSPARENCY=Jangan gunakan transparansi
LBL_FORCE_FOLDER=Download all files to a single folder
LBL_SHOW_TRAY=Show tray icon (needs restart)
MENU_CLIP_ADD_MENU=Add from clipboard
LBL_BATCH_DESC=Download a group of sequential files using asterisk wild card (example http://xdman.sourceforge.net/images/edge*.png)
LBL_BATCH_ASTERISK=Replace asterisk with
LBL_BATCH_LETTER=Letters
LBL_BATCH_NUM=Numbers
LBL_BATCH_FROM=From
LBL_BATCH_TO=To
LBL_FORCE_FOLDER=Unduh semua berkas kedalam satu folder
LBL_SHOW_TRAY=Tampilkan di ikon baki (needs restart)
MENU_CLIP_ADD_MENU=Tambah dari papan klip
LBL_BATCH_DESC=Unduh berkas secara spesifik menggunakan tanda asterisk (contoh http://xdman.sourceforge.net/images/edge*.png)
LBL_BATCH_ASTERISK=Ganti simbol asterisk dengan
LBL_BATCH_LETTER=Huruf
LBL_BATCH_NUM=Angka
LBL_BATCH_FROM=Dari
LBL_BATCH_TO=Ke
LBL_BATCH_WILDCARD_SIZE=Wildcard size
LBL_BATCH_CHK_AUTH=Use authorization
LBL_BATCH_LOGIN_DET=Login
LBL_BATCH_FILE1=First file
LBL_BATCH_FILE2=Second file
LBL_BATCH_FILEN=Last file
LBL_SHOW_PROGRESS=Show progress
LBL_FILE_TYPE=File type
LBL_ALL_QUEUE=All queues
LBL_SHOW_VIDEO_ONLY_IN_BROWSER=Disable floating 'DOWNLOAD VIDEO' popup
LBL_BATCH_CHK_AUTH=Menggunakan otorisasi
LBL_BATCH_LOGIN_DET=Log masuk
LBL_BATCH_FILE1=Berkas pertama
LBL_BATCH_FILE2=Berkas kedua
LBL_BATCH_FILEN=Berkas terakhir
LBL_SHOW_PROGRESS=Lihat proses
LBL_FILE_TYPE=Tipe berkas
LBL_ALL_QUEUE=Semua antrian
LBL_SHOW_VIDEO_ONLY_IN_BROWSER=Nonaktifkan pesan 'UNDUH VIDEO'
3 changes: 2 additions & 1 deletion app/src/main/resources/lang/map
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ zh-tw=Chinese Traditional (繁體中文)
ml=Malayalam
tw=Traditional Chinese - Taiwan (繁體中文(台灣))
np=Nepali
hu=Hungarian
hu=Hungarian
uk_UA=Ukrainian(Українська)
Loading

0 comments on commit 29153d1

Please sign in to comment.