mirror of
https://github.com/haiwen/seafile.git
synced 2025-01-05 10:26:43 +08:00
add i18n support in applet
This commit is contained in:
parent
7a2805a412
commit
265286fc83
4
.gitignore
vendored
4
.gitignore
vendored
@ -21,6 +21,9 @@ configure
|
||||
*/.deps
|
||||
autom4te*
|
||||
po/POTFILES
|
||||
po/Makefile*
|
||||
po/stamp-it
|
||||
po/*.gmo
|
||||
missing
|
||||
mkinstalldirs
|
||||
stamp-h1
|
||||
@ -109,3 +112,4 @@ web/dist/
|
||||
tests/basic/conf2/misc/
|
||||
tests/basic/conf2/seafile-data/
|
||||
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
if COMPILE_GUI
|
||||
MAKE_GUI = gui
|
||||
MAKE_PO = po
|
||||
endif
|
||||
|
||||
if COMPILE_HTTPSERVER
|
||||
@ -22,7 +23,7 @@ else
|
||||
endif
|
||||
|
||||
SUBDIRS = include data lib common daemon $(MAKE_GUI) $(MAKE_CLINET) $(MAKE_SERVER) \
|
||||
app python tests web
|
||||
app python tests web $(MAKE_PO)
|
||||
DIST_SUBDIRS = include data lib common daemon gui daemon server tools monitor \
|
||||
httpserver controller app python tests web
|
||||
|
||||
|
25
configure.ac
25
configure.ac
@ -377,17 +377,21 @@ if test "$blinux" = true -a x${compile_client} = xyes; then
|
||||
#PKG_CHECK_MODULES(LIBNAUTILUS_EXTENSION, [libnautilus-extension >= $LIBNAUTILUS_EXTENSION_REQUIRED])
|
||||
#AC_SUBST(LIBNAUTILUS_EXTENSION_CFLAGS)
|
||||
#AC_SUBST(LIBNAUTILUS_EXTENSION_LIBS)
|
||||
fi
|
||||
|
||||
# For translation
|
||||
#GETTEXT_PACKAGE=ccnet
|
||||
#AC_SUBST(GETTEXT_PACKAGE)
|
||||
#AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
|
||||
#AC_PROG_INTLTOOL([0.35])
|
||||
#ALL_LINGUAS="en zh_cn"
|
||||
#AM_GLIB_GNU_GETTEXT
|
||||
#GLIB_DEFINE_LOCALEDIR(PACKAGE_LOCALE_DIR)
|
||||
#PO=po
|
||||
#AC_SUBST(PO)
|
||||
if test x${compile_client} = xyes; then
|
||||
|
||||
m4_ifdef([IT_PROG_INTLTOOL],
|
||||
[IT_PROG_INTLTOOL([0.35.0],[no-xml])],
|
||||
[AC_MSG_ERROR("--enable-nls requires intltool to be installed.")])
|
||||
AC_CHECK_HEADERS([libintl.h])
|
||||
GETTEXT_PACKAGE=seafile
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
seafilelocaledir='${prefix}/${DATADIRNAME}/locale'
|
||||
AC_SUBST(seafilelocaledir)
|
||||
AC_SUBST(INTLLIBS)
|
||||
fi
|
||||
|
||||
if test x${compile_python} = xyes; then
|
||||
@ -469,6 +473,7 @@ AC_CONFIG_FILES(
|
||||
tools/Makefile
|
||||
tests/Makefile
|
||||
tests/common-conf.sh
|
||||
po/Makefile.in
|
||||
)
|
||||
# desktop/Makefile
|
||||
# desktop/nautilus/Makefile
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <glib/gi18n.h>
|
||||
#include <glib.h>
|
||||
#include <glib/gstdio.h>
|
||||
#include <getopt.h>
|
||||
@ -17,12 +18,6 @@
|
||||
#include "seafile-applet.h"
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
#include "applet-po-gbk.h"
|
||||
#else
|
||||
#include "applet-po.h"
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include "../mac/seafile/seafile/platform.h"
|
||||
#endif
|
||||
@ -162,9 +157,9 @@ collect_transfer_info (GString *msg, const char *info, char *repo_name)
|
||||
|
||||
gboolean is_upload = (strcmp(info, "upload") == 0);
|
||||
char buf[4096];
|
||||
snprintf (buf, sizeof(buf) , "%s %s, " S_SPEED " %d KB/s\n",
|
||||
is_upload ? S_UPLOADING : S_DOWNLOADING,
|
||||
repo_name, rate);
|
||||
snprintf (buf, sizeof(buf) , "%s %s, %s %d KB/s\n",
|
||||
is_upload ? _("Uploading") : _("Downloading"),
|
||||
repo_name, _("Speed"), rate);
|
||||
g_string_append (msg, buf);
|
||||
}
|
||||
|
||||
@ -190,7 +185,7 @@ handle_seafile_notification (char *type, char *content)
|
||||
return;
|
||||
|
||||
} else if (strcmp(type, "repo.deleted_on_relay") == 0) {
|
||||
snprintf (buf, sizeof(buf), "\"%s\" " S_REPO_DELETED_ON_RELAY, content);
|
||||
snprintf (buf, sizeof(buf), "\"%s\" %s", content, _("is unsynced. \nReason: Deleted on server"));
|
||||
trayicon_notify ("Seafile", buf);
|
||||
|
||||
} else if (strcmp(type, "sync.done") == 0) {
|
||||
@ -204,7 +199,7 @@ handle_seafile_notification (char *type, char *content)
|
||||
char *repo_id = p + 1;
|
||||
|
||||
memcpy (applet->last_synced_repo, repo_id, strlen(repo_id) + 1);
|
||||
snprintf (buf, sizeof(buf), "\"%s\" " S_REPO_SYNC_DONE, repo_name);
|
||||
snprintf (buf, sizeof(buf), "\"%s\" %s", repo_name, _("is in sync"));
|
||||
trayicon_notify ("Seafile", buf);
|
||||
|
||||
} else if (strcmp(type, "sync.access_denied") == 0) {
|
||||
@ -218,7 +213,7 @@ handle_seafile_notification (char *type, char *content)
|
||||
char *repo_id = p + 1;
|
||||
|
||||
memcpy (applet->last_synced_repo, repo_id, strlen(repo_id) + 1);
|
||||
snprintf (buf, sizeof(buf), "\"%s\" " S_REPO_ACCESS_DENIED, repo_name);
|
||||
snprintf (buf, sizeof(buf), "\"%s\" %s", repo_name, _("failed to sync. \nAccess denied to service"));
|
||||
trayicon_notify ("Seafile", buf);
|
||||
} else if (strcmp(type, "sync.quota_full") == 0) {
|
||||
/* format: <repo_name\trepo_id> */
|
||||
@ -231,7 +226,7 @@ handle_seafile_notification (char *type, char *content)
|
||||
char *repo_id = p + 1;
|
||||
|
||||
memcpy (applet->last_synced_repo, repo_id, strlen(repo_id) + 1);
|
||||
snprintf (buf, sizeof(buf), "\"%s\" " S_REPO_QUOTA_FULL, repo_name);
|
||||
snprintf (buf, sizeof(buf), "\"%s\" %s", repo_name, _("failed to sync. Quota outage."));
|
||||
trayicon_notify ("Seafile", buf);
|
||||
}
|
||||
#ifdef __APPLE__
|
||||
|
@ -3,17 +3,6 @@
|
||||
|
||||
#define S_WINDOW_NAME "seafile-applet"
|
||||
#define S_WINDOW_TITLE "Seafile 初始化"
|
||||
#define S_USERNAME_TOO_SHORT "用户名太短"
|
||||
#define S_USERNAME_TOO_LONG "用户名太长"
|
||||
#define S_USERNAME_INVALID "用户名只能由字母、数字和 ‘-’ 、 ‘_’ 组成"
|
||||
#define S_CHOOSE_EXISTEDDIR "请选择配置文件所在的目录"
|
||||
#define S_USERID_INVALID "错误的用户id"
|
||||
#define S_PASSWD_NULL "密码不能为空"
|
||||
#define S_PASSWD_TOO_SHORT "密码太短"
|
||||
#define S_PASSWD_TOO_LONG "密码太长"
|
||||
#define S_PASSWD_INVALID "密码不能包含空格"
|
||||
#define S_PASSWD_DIFFERENT "两次输入的密码不一致"
|
||||
#define S_CHOOSE_PROFILE "请选择一个配置文件"
|
||||
|
||||
#define S_UNKNOWN_ERR "未知错误"
|
||||
#define S_WRONG_PASSWD "密码错误"
|
||||
@ -21,62 +10,17 @@
|
||||
#define S_PERMISSION_ERROR "权限不够"
|
||||
#define S_CREATE_CONF_FAILED "创建配置文件错误"
|
||||
#define S_CREATE_SEAFILE_CONF_FAILED "创建配置文件错误"
|
||||
#define S_SELECT_CONFDIR "请选择一个目录用于放置配置目录"
|
||||
#define S_DEFAULT_CONFDIR "由于未选择目录,使用默认配置文件目录"
|
||||
#define S_SELECT_SEAFILEDIR "请选择一个磁盘用于放置Seafile元数据"
|
||||
#define S_SEAFILE_STARTUP "Seafile 已启动"
|
||||
#define S_SEAFILE_CLICK_HINT "点击图标即可打开管理页面"
|
||||
#define S_LOGIN_FAILED "登录失败: "
|
||||
#define S_CONN_SERVER_TIEMOUT "连接服务器超时"
|
||||
#define S_CONNECTING_TO_SERVER "正在连接服务器"
|
||||
#define S_VALIDATING_USER "正在验证用户名/密码"
|
||||
#define S_INVALID_USER "错误的用户名/密码"
|
||||
#define S_ENSURE_QUIT_INIT "Seafile 初始化仍未完成。确认要退出吗?"
|
||||
#define S_LOGIN_SUCCESS "登录成功"
|
||||
#define S_CREATING_CONF "正在生成配置文件,请稍候"
|
||||
#define S_ENSURE_SKIP_LOGIN "确认跳过登录?"
|
||||
|
||||
#define S_PASSWD_EMPTY "密码不能为空"
|
||||
#define S_PASSWD_TOO_SHORT "密码太短"
|
||||
#define S_PASSWD_TOO_LONG "密码太长"
|
||||
#define S_PASSWD_MISMATCH "两次输入的密码不一致"
|
||||
|
||||
#define S_DESC_EMPTY "描述不能为空"
|
||||
#define S_DESC_TOO_SHORT "描述太短"
|
||||
#define S_DESC_TOO_LONG "描述太长"
|
||||
#define S_ENSURE_QUIT "确认退出?"
|
||||
|
||||
#define S_CREATING_REPO "正在创建资料库"
|
||||
#define S_ERROR_NO_DAEMON "Seafile 未启动"
|
||||
#define S_CREATE_REPO_SUCCESS "操作成功"
|
||||
#define S_CREATE_REPO_FAILED "操作失败"
|
||||
|
||||
#define S_INTERNAL_ERROR "内部错误"
|
||||
#define S_ENSURE_QUIT_CREATE "确认取消?"
|
||||
|
||||
#define S_BASE_SIZE_TOO_LARGE \
|
||||
"原始目录 \"%s\" 过大(%d MB),最大允许的原始目录大小为 %d MB.\n\n 是否继续创建?"
|
||||
|
||||
#define S_FAILED_TO_CALC_DIR_SIZE "统计原始目录 [%s] 大小失败"
|
||||
|
||||
#define S_INIT_REPO_DLG_ALREADY_OPENED "请先关闭上一个创建 Seafile 资料库的对话框!"
|
||||
|
||||
#define S_REPO_CREATED "已变为资料库"
|
||||
#define S_REPO_REMOVED "已解除同步"
|
||||
#define S_REPO_SYNC_DONE "已同步"
|
||||
|
||||
#define S_SEAFILE_IN_TRANSFER "Seafile 正在传输数据"
|
||||
|
||||
#define S_NO_RELAY "您目前没有设置任何服务器,请到 Seafile 管理页面添加"
|
||||
|
||||
#define S_BOLD_FONT "宋体"
|
||||
|
||||
#define S_AVAILABLE "空闲"
|
||||
#define S_AVAILABLE_UNKNOWN "空闲空间大小未知"
|
||||
|
||||
#define S_INIT_NICKNAME "设置昵称"
|
||||
#define S_INIT_DISK "选择磁盘"
|
||||
#define S_INIT_LOGIN "登录服务器"
|
||||
|
||||
#define S_REPO_SYNC_ERROR "同步时出错"
|
||||
#define S_REPO_DELETED_ON_RELAY "已经被解除同步。\n原因:该目录已经在服务器上被删除"
|
||||
@ -88,9 +32,6 @@
|
||||
|
||||
#define S_SPEED "速度"
|
||||
|
||||
#define S_YOU_HAVE_NOT_LOGGED_IN "您尚未登录服务器"
|
||||
#define S_NOT_ALLOWED_PATH "\"%s\" 是 Seafile 的工作目录,因此不能把 \"%s\" 变为资料库。\n你可以在该目录下创建一个子目录,再将这个子目录变为资料库"
|
||||
|
||||
#define S_SEAFILE_APPLET_ALREAD_RUNNING "Seafile 已经在运行中"
|
||||
|
||||
#define S_USER_MANUAL_FILENAME "Seafile使用帮助.txt"
|
||||
|
@ -1,6 +1,8 @@
|
||||
|
||||
AM_CFLAGS = -DPKGDATADIR=\"$(pkgdatadir)\" \
|
||||
-DPACKAGE_DATA_DIR=\""$(pkgdatadir)"\" \
|
||||
-DSEAFILE_LOCALE_DIR=\""$(seafilelocaledir)"\" \
|
||||
-DGETTEXT_PACKAGE=\""$(GETTEXT_PACKAGE)"\" \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/lib \
|
||||
-I$(top_builddir)/lib \
|
||||
@ -13,7 +15,7 @@ noinst_HEADERS = trayicon.h misc.h \
|
||||
../common/ccnet-init.h \
|
||||
../common/opendir-proc.h ../common/applet-rpc-service.h \
|
||||
../common/applet-log.h ../common/rpc-wrapper.h \
|
||||
../common/applet-po.h ../common/applet-common.h ../common/seafile-applet.h
|
||||
../common/applet-common.h ../common/seafile-applet.h
|
||||
|
||||
bin_PROGRAMS = seafile-applet
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -39,23 +40,6 @@ static GtkLabel *error_name_label;
|
||||
static GtkLabel *name_label;
|
||||
static GtkBuilder *builder;
|
||||
|
||||
static const char *error_str[] = {
|
||||
"Unknown error",
|
||||
"Permission error",
|
||||
"Create config file failed",
|
||||
"Create seafile config failed",
|
||||
};
|
||||
|
||||
static const char *
|
||||
error_code_to_str (const int code)
|
||||
{
|
||||
if (code <= 0 || code >= G_N_ELEMENTS(error_str))
|
||||
return "Unknown error";
|
||||
|
||||
return error_str[code];
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
show_warning (GtkWindow *window, const char *title, const char *warning_msg)
|
||||
{
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <signal.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include <ccnet.h>
|
||||
@ -17,7 +18,6 @@
|
||||
#include "applet-common.h"
|
||||
#include "trayicon.h"
|
||||
#include "applet-log.h"
|
||||
#include "applet-po.h"
|
||||
|
||||
#include "misc.h"
|
||||
|
||||
@ -78,7 +78,10 @@ int ccnet_open_dir(const char *path)
|
||||
{
|
||||
char buf[4096];
|
||||
snprintf (buf, 4096, "xdg-open '%s' &", path);
|
||||
system (buf);
|
||||
if (system (buf) < 0) {
|
||||
applet_warning ("failed to exec: %s\n", buf);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -146,19 +149,17 @@ seafile_applet_init (SeafileApplet *applet)
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
/* init i18n */
|
||||
setlocale (LC_ALL, "");
|
||||
bindtextdomain(GETTEXT_PACKAGE, SEAFILE_LOCALE_DIR);
|
||||
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
|
||||
textdomain(GETTEXT_PACKAGE);
|
||||
|
||||
if (count_process("seafile-applet") > 1) {
|
||||
fprintf(stderr, "Seafile applet already running. I will quit.\n");
|
||||
fprintf(stderr, _("Seafile is already running\n"));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
bind_textdomain_codeset(PACKAGE, "UTF-8");
|
||||
textdomain(PACKAGE);
|
||||
#endif
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_icon_theme_append_search_path (gtk_icon_theme_get_default(),
|
||||
PKGDATADIR);
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <libnotify/notify.h>
|
||||
|
||||
@ -17,7 +18,6 @@
|
||||
#include "applet-common.h"
|
||||
#include "rpc-wrapper.h"
|
||||
#include "applet-log.h"
|
||||
#include "applet-po.h"
|
||||
|
||||
#ifdef HAVE_APP_INDICATOR
|
||||
#include <libappindicator/app-indicator.h>
|
||||
@ -156,7 +156,7 @@ void reset_trayicon_and_tip(SeafileTrayIcon *icon)
|
||||
} else {
|
||||
if (applet->auto_sync_disabled) {
|
||||
name = ICON_AUTO_SYNC_DISABLED;
|
||||
tip = S_TIP_AUTO_SYNC_DISABLED;
|
||||
tip = _("Auto sync is disabled");
|
||||
} else {
|
||||
name = ICON_STATUS_UP;
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ APPNAME = seafile-applet
|
||||
TARGET = $(APPNAME).exe
|
||||
|
||||
all: $(TARGET)
|
||||
en: $(TARGET)
|
||||
|
||||
top_srcdir=../..
|
||||
|
||||
@ -24,13 +25,22 @@ LDFLAGS += -L${top_srcdir}/lib/.libs/ \
|
||||
|
||||
CC = gcc
|
||||
RC = windres
|
||||
RCFILE = trayicon.rc
|
||||
ICONS = serverup.ico serverdown.ico ccnet.ico \
|
||||
window-head.bmp win7-trayicon-tip.bmp sync-paused.ico
|
||||
|
||||
CFLAGS += -DWINVER=0x500 -D_WIN32_IE=0x500
|
||||
LDFLAGS += -lcomctl32 -lcomdlg32
|
||||
|
||||
ifeq (${MAKECMDGOALS}, en)
|
||||
CFLAGS += -DSEAF_LANG_ENGLISH
|
||||
RCFILE = trayicon.en.rc
|
||||
RC_HEADER = resource.en.h
|
||||
else
|
||||
CFLAGS += -DSEAF_LANG_CHINESE
|
||||
RCFILE = trayicon.rc
|
||||
RC_HEADER = resource.h
|
||||
endif
|
||||
|
||||
ifeq (${MAKECMDGOALS}, debug)
|
||||
CFLAGS += -g -O0 -D _DEBUG
|
||||
LDFLAGS += -Wl,--subsystem,console
|
||||
@ -71,16 +81,13 @@ applet-log.o : ../common/applet-log.c
|
||||
rpc-wrapper.o : ../common/rpc-wrapper.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
applet-po-gbk.h : ../common/applet-po.h
|
||||
iconv -t GBK -f UTF-8 $< > $@
|
||||
|
||||
%.o : %.c
|
||||
${CC} ${CFLAGS} -c $< -o $@
|
||||
|
||||
resource.o : ${RCFILE} resource.h ${ICONS} Application.manifest
|
||||
resource.o : ${RCFILE} ${RC_HEADER} ${ICONS} Application.manifest
|
||||
${RC} -i $< -o $@
|
||||
|
||||
$(TARGET) : applet-po-gbk.h $(OBJECTS) resource.o .deps
|
||||
$(TARGET) : $(OBJECTS) resource.o .deps
|
||||
${CC} -o "$@" ${OBJECTS} resource.o ${LDFLAGS}
|
||||
|
||||
debug:all
|
||||
@ -93,4 +100,4 @@ uninstall:
|
||||
clean :
|
||||
rm -f *.o *.exe .deps
|
||||
|
||||
.PHONY: all debug clean dist distclean install uninstall
|
||||
.PHONY: all en debug clean dist distclean install uninstall
|
||||
|
@ -1,5 +1,6 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
@ -8,8 +9,12 @@
|
||||
#include <ccnet.h>
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "resource.h"
|
||||
#include "applet-po-gbk.h"
|
||||
#ifdef SEAF_LANG_CHINESE
|
||||
#include "resource.h"
|
||||
#else
|
||||
#include "resource.en.h"
|
||||
#endif
|
||||
|
||||
#include "trayicon.h"
|
||||
#include <commdlg.h>
|
||||
#include <ShlObj.h>
|
||||
@ -27,23 +32,6 @@
|
||||
|
||||
#define IS_DLG_CONTROL(ID) ((HWND)(lParam) == GetDlgItem(hDlg, (ID)))
|
||||
|
||||
static const char *error_str[] =
|
||||
{
|
||||
S_UNKNOWN_ERR,
|
||||
S_PERMISSION_ERROR,
|
||||
S_CREATE_CONF_FAILED,
|
||||
S_CREATE_SEAFILE_CONF_FAILED,
|
||||
};
|
||||
|
||||
static const char *
|
||||
error_code_to_str (const int code)
|
||||
{
|
||||
if (code <= 0 || code >= ERR_MAX_NUM)
|
||||
return S_UNKNOWN_ERR;
|
||||
|
||||
return error_str[code];
|
||||
}
|
||||
|
||||
BOOL
|
||||
msgbox_yes_or_no (HWND hWnd, char *format, ...)
|
||||
{
|
||||
@ -177,10 +165,10 @@ InitComboxList(HWND hDlg)
|
||||
|
||||
if (free_space.QuadPart) {
|
||||
double d = ((double)(free_space.QuadPart)) / (1024 * 1024 * 1024);
|
||||
snprintf (buf, sizeof(buf), "%s\t (%.1f GB " S_AVAILABLE ")",
|
||||
p, d);
|
||||
snprintf (buf, sizeof(buf), "%s\t (%.1f GB %s)",
|
||||
p, d, _("free"));
|
||||
} else
|
||||
snprintf (buf, sizeof(buf), "%s\t (" S_AVAILABLE_UNKNOWN ")", p);
|
||||
snprintf (buf, sizeof(buf), "%s\t (%s)", p, _("free space unknown"));
|
||||
|
||||
i++;
|
||||
|
||||
@ -270,10 +258,10 @@ copy_user_manual()
|
||||
PathRemoveBackslash(seafdir);
|
||||
|
||||
snprintf (src_path, sizeof(src_path),
|
||||
"%s\\%s", installdir, S_USER_MANUAL_FILENAME);
|
||||
"%s\\%s", installdir, _("Seafile help.txt"));
|
||||
|
||||
snprintf (dst_path, sizeof(dst_path),
|
||||
"%s\\%s", seafdir, S_USER_MANUAL_FILENAME);
|
||||
"%s\\%s", seafdir, _("Seafile help.txt"));
|
||||
|
||||
/* Skip if already exist */
|
||||
/* Ver1.1: Manual Changed. We need to overwrite it. */
|
||||
@ -298,8 +286,8 @@ InitSeafileProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
case WM_INITDIALOG:
|
||||
InitComboxList(hDlg);
|
||||
set_dlg_icon (hDlg, IDI_STATUS_UP);
|
||||
SetWindowText (GetDlgItem(hDlg, IDC_STATIC_TITLE), S_INIT_DISK);
|
||||
set_control_font (GetDlgItem(hDlg, IDC_STATIC_TITLE), S_BOLD_FONT);
|
||||
SetWindowText (GetDlgItem(hDlg, IDC_STATIC_TITLE), _("Choose a disk"));
|
||||
set_control_font (GetDlgItem(hDlg, IDC_STATIC_TITLE), _("Courier"));
|
||||
make_wnd_foreground(hDlg);
|
||||
return TRUE;
|
||||
break;
|
||||
@ -342,7 +330,7 @@ InitSeafileProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
|
||||
case IDCANCEL:
|
||||
if (msgbox_yes_or_no (hDlg, S_ENSURE_QUIT_INIT)) {
|
||||
if (msgbox_yes_or_no (hDlg, _("Initialzation is not finished. Really quit?"))) {
|
||||
EndDialog (hDlg, INIT_CCNET_FAILED);
|
||||
}
|
||||
return TRUE;
|
||||
@ -352,7 +340,7 @@ InitSeafileProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
break;
|
||||
|
||||
case WM_CLOSE:
|
||||
if (msgbox_yes_or_no (hDlg, S_ENSURE_QUIT_INIT)) {
|
||||
if (msgbox_yes_or_no (hDlg, _("Initialzation is not finished. Really quit?"))) {
|
||||
EndDialog (hDlg, INIT_CCNET_FAILED);
|
||||
}
|
||||
return TRUE;
|
||||
|
52
gui/win/resource.en.h
Normal file
52
gui/win/resource.en.h
Normal file
@ -0,0 +1,52 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by trayicon.en.rc
|
||||
//
|
||||
#define IDI_STARTINTRAY 102
|
||||
#define IDS_APP_TITLE 103
|
||||
#define IDM_EXIT 105
|
||||
#define IDI_CCNET_ICON 107
|
||||
#define IDC_STARTINTRAY 108
|
||||
#define IDI_STATUS_UP 110
|
||||
#define IDI_STATUS_DOWN 111
|
||||
#define IDI_STATUS_TRANSFER_1 113
|
||||
#define IDI_STATUS_TRANSFER_2 114
|
||||
#define IDI_STATUS_TRANSFER_3 115
|
||||
#define IDI_STATUS_TRANSFER_4 116
|
||||
#define IDD_CREATE_REPO1 138
|
||||
#define IDD_WIN7_TIP 140
|
||||
#define IDD_INIT_SEAFILE 141
|
||||
#define IDB_TRAYICON_TIP 142
|
||||
#define IDB_TOP_BANNER 144
|
||||
#define IDI_ICON1 145
|
||||
#define IDI_STATUS_AUTO_SYNC_DISABLED 145
|
||||
#define IDC_STATIC_CREATE_PATH2 1003
|
||||
#define IDC_STATIC_SEAFILRDIR 1017
|
||||
#define IDC_STATIC_SEAFILE 1018
|
||||
#define IDC_COMBOX_DISK 1021
|
||||
#define IDC_COMBO1 1029
|
||||
#define IDC_CHECK_NO_TIP 1032
|
||||
#define ID_FINISH 1033
|
||||
#define IDC_STATIC_TITLE 1037
|
||||
#define IDM_OPEN 32773
|
||||
#define IDM_RESTART 32776
|
||||
#define ID_Menu 32778
|
||||
#define ID_Menu32779 32779
|
||||
#define ID_32780 32780
|
||||
#define IDM_SYNC_PAUSE 32781
|
||||
#define IDM_SYNC_RESTORE 32782
|
||||
#define IDM_DISABLE_AUTO_SYNC 32783
|
||||
#define IDM_ENABLE_AUTO_SYNC 32784
|
||||
#define IDC_STATIC -1
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 146
|
||||
#define _APS_NEXT_COMMAND_VALUE 32785
|
||||
#define _APS_NEXT_CONTROL_VALUE 1038
|
||||
#define _APS_NEXT_SYMED_VALUE 110
|
||||
#endif
|
||||
#endif
|
@ -2,8 +2,6 @@
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by trayicon.rc
|
||||
//
|
||||
#define ID_REGISTER 3
|
||||
#define ID_SKIP_LOGIN 4
|
||||
#define IDI_STARTINTRAY 102
|
||||
#define IDS_APP_TITLE 103
|
||||
#define IDM_EXIT 105
|
||||
@ -15,37 +13,18 @@
|
||||
#define IDI_STATUS_TRANSFER_2 114
|
||||
#define IDI_STATUS_TRANSFER_3 115
|
||||
#define IDI_STATUS_TRANSFER_4 116
|
||||
#define IDD_INIT_CCNET 135
|
||||
#define IDD_CREATE_REPO1 138
|
||||
#define IDD_CREATE_REPO 138
|
||||
#define IDD_WIN7_TIP 140
|
||||
#define IDD_INIT_SEAFILE 141
|
||||
#define IDB_TRAYICON_TIP 142
|
||||
#define IDD_LOGIN 142
|
||||
#define IDD_WAIT_CALC_DIR 143
|
||||
#define IDB_TOP_BANNER 144
|
||||
#define IDI_ICON1 145
|
||||
#define IDI_STATUS_AUTO_SYNC_DISABLED 145
|
||||
#define IDC_STATIC_CREATE_PATH 1002
|
||||
#define IDC_EDIT_NICKNAME 1003
|
||||
#define IDC_STATIC_CREATE_PATH2 1003
|
||||
#define IDC_EDIT_CREATE_DESC 1006
|
||||
#define IDC_EDIT_CREATE_PASSWD 1007
|
||||
#define IDC_CHECK_ENCRYPT 1008
|
||||
#define IDC_EDIT_CREATE_PASSWD2 1009
|
||||
#define IDC_STATIC_NAME 1016
|
||||
#define IDC_STATIC_SEAFILRDIR 1017
|
||||
#define IDC_STATIC_SEAFILE 1018
|
||||
#define IDC_EDIT_SEAHUB_USERNAME 1020
|
||||
#define IDC_COMBOX_DISK 1021
|
||||
#define IDC_EDIT_SEAHUB_PASSWD 1022
|
||||
#define ID_LOGIN 1023
|
||||
#define IDC_STATIC_LOGIN_INFO 1025
|
||||
#define IDC_STATIC_CREATE_INFO 1026
|
||||
#define IDC_STATIC_CONF_INFO 1027
|
||||
#define IDC_COMBO1 1029
|
||||
#define IDC_COMBO_RELAY 1029
|
||||
#define IDC_STATIC_CREATE_REPO 1031
|
||||
#define IDC_CHECK_NO_TIP 1032
|
||||
#define ID_FINISH 1033
|
||||
#define IDC_STATIC_TITLE 1037
|
||||
|
@ -1,5 +1,6 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <getopt.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -12,16 +13,20 @@
|
||||
#include <ccnet.h>
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "resource.h"
|
||||
#ifdef SEAF_LANG_CHINESE
|
||||
#include "resource.h"
|
||||
#else
|
||||
#include "resource.en.h"
|
||||
#endif
|
||||
|
||||
#include "utils.h"
|
||||
#include "applet-common.h"
|
||||
#include "trayicon.h"
|
||||
#include "applet-log.h"
|
||||
#include "applet-po-gbk.h"
|
||||
#include "rpc-wrapper.h"
|
||||
#include "seafile-applet.h"
|
||||
|
||||
#define GETTEXT_PACKAGE "seafile"
|
||||
#define STARTWEBSERVER "seafile-web.exe 127.0.0.1:13420"
|
||||
#define WEB_PROCESS_NAME "seafile-web.exe"
|
||||
|
||||
@ -48,7 +53,7 @@ TestWebServer (HWND hwnd, UINT message, UINT iTimerID, DWORD dwTime)
|
||||
applet_message ("Web server is up.\n");
|
||||
|
||||
applet->web_status = WEB_READY;
|
||||
trayicon_notify (S_SEAFILE_STARTUP, S_SEAFILE_CLICK_HINT);
|
||||
trayicon_notify (_("Seafile is started"), _("Click the icon to open admin console"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,7 +68,7 @@ reset_trayicon_and_tip()
|
||||
} else {
|
||||
if (applet->auto_sync_disabled) {
|
||||
id = IDI_STATUS_AUTO_SYNC_DISABLED;
|
||||
tip = S_TIP_AUTO_SYNC_DISABLED;
|
||||
tip = _("Auto sync is disabled");
|
||||
} else {
|
||||
id = IDI_STATUS_UP;
|
||||
}
|
||||
@ -365,7 +370,7 @@ set_auto_sync_cb (void *result, void *data, GError *error)
|
||||
error->message);
|
||||
|
||||
MessageBox(NULL,
|
||||
disable ? S_FAILED_DISABLE_AUTO_SYNC : S_FAILED_ENABLE_AUTO_SYNC,
|
||||
disable ? _("Failed to disable auto sync") : _("Failed to enable auto sync"),
|
||||
"Seafile", MB_OK);
|
||||
|
||||
} else {
|
||||
@ -499,8 +504,21 @@ seafile_applet_init (HINSTANCE hInstance)
|
||||
int
|
||||
WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
|
||||
{
|
||||
if (set_applet_wd() < 0)
|
||||
return -1;
|
||||
|
||||
#ifdef SEAF_LANG_CHINESE
|
||||
char *seafile_locale_dir = g_build_filename (seafile_bin_dir,
|
||||
"i18n", NULL);
|
||||
/* init i18n */
|
||||
setlocale (LC_ALL, "zh_CN");
|
||||
bindtextdomain(GETTEXT_PACKAGE, seafile_locale_dir);
|
||||
bind_textdomain_codeset(GETTEXT_PACKAGE, "GBK");
|
||||
textdomain(GETTEXT_PACKAGE);
|
||||
#endif
|
||||
|
||||
if (count_process("seafile-applet") > 1) {
|
||||
MessageBox(NULL, S_SEAFILE_APPLET_ALREAD_RUNNING, "Seafile", MB_OK);
|
||||
MessageBox(NULL, _("Seafile is already running"), "Seafile", MB_OK);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -516,6 +534,11 @@ WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, in
|
||||
|
||||
snprintf(cmdbuf, sizeof(cmdbuf), "seafile-applet.exe %s", lpCmdLine);
|
||||
|
||||
char *xxx = _("Seafile Initialization");
|
||||
char tmp[128];
|
||||
|
||||
snprintf(tmp, sizeof(tmp), "%s", xxx);
|
||||
|
||||
if (!g_shell_parse_argv (cmdbuf, &argc, &argv, &err)) {
|
||||
if (err)
|
||||
applet_warning ("parse arguments failed %s\n", err->message);
|
||||
@ -524,9 +547,6 @@ WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, in
|
||||
|
||||
g_type_init();
|
||||
|
||||
if (set_applet_wd() < 0)
|
||||
return -1;
|
||||
|
||||
applet = g_new0 (SeafileApplet, 1);
|
||||
|
||||
seafile_applet_init (hInstance);
|
||||
|
@ -1,11 +1,15 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <ccnet.h>
|
||||
|
||||
#include "resource.h"
|
||||
#ifdef SEAF_LANG_CHINESE
|
||||
#include "resource.h"
|
||||
#else
|
||||
#include "resource.en.h"
|
||||
#endif
|
||||
#include "trayicon.h"
|
||||
#include "seafile-applet.h"
|
||||
#include "applet-po-gbk.h"
|
||||
#include "applet-common.h"
|
||||
#include "applet-log.h"
|
||||
|
||||
@ -95,14 +99,17 @@ create_applet_window ()
|
||||
wcex.cbSize = sizeof(WNDCLASSEX);
|
||||
wcex.lpfnWndProc = (WNDPROC)WndProc;
|
||||
wcex.hInstance = applet->hInstance;
|
||||
wcex.lpszClassName = S_WINDOW_NAME;
|
||||
wcex.lpszClassName = "seafile-applet";
|
||||
wcex.hIcon = LoadIcon(applet->hInstance, MAKEINTRESOURCE(IDI_CCNET_ICON));
|
||||
|
||||
RegisterClassEx(&wcex);
|
||||
applet->hWnd = CreateWindow(S_WINDOW_NAME, S_WINDOW_NAME,
|
||||
applet->hWnd = CreateWindow("seafile-applet", "seafile-applet",
|
||||
WS_OVERLAPPED, 0, 0, 0, 0,
|
||||
NULL, NULL, applet->hInstance, NULL);
|
||||
|
||||
if (!applet->hWnd) {
|
||||
DWORD e = GetLastError();
|
||||
g_warning("create window error: %lu", e);
|
||||
applet_exit(1);
|
||||
}
|
||||
}
|
||||
|
195
gui/win/trayicon.en.rc
Normal file
195
gui/win/trayicon.en.rc
Normal file
@ -0,0 +1,195 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.en.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#define APSTUDIO_HIDDEN_SYMBOLS
|
||||
#include "windows.h"
|
||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 中文(中华人民共和国) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
|
||||
#pragma code_page(936)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_CCNET_ICON ICON "ccnet.ico"
|
||||
IDI_STATUS_UP ICON "serverup.ico"
|
||||
IDI_STATUS_DOWN ICON "serverdown.ico"
|
||||
IDI_STATUS_TRANSFER_1 ICON "100823_network-1.ico"
|
||||
IDI_STATUS_TRANSFER_2 ICON "100823_network-2.ico"
|
||||
IDI_STATUS_TRANSFER_3 ICON "100823_network-3.ico"
|
||||
IDI_STATUS_TRANSFER_4 ICON "100823_network-4.ico"
|
||||
IDI_STATUS_AUTO_SYNC_DISABLED ICON "sync-paused.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Menu
|
||||
//
|
||||
|
||||
IDC_STARTINTRAY MENU
|
||||
BEGIN
|
||||
POPUP "文件(&F)"
|
||||
BEGIN
|
||||
MENUITEM "Open admin page(&O)", IDM_OPEN
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Disable auto sync", IDM_DISABLE_AUTO_SYNC
|
||||
MENUITEM "Enable auto sync", IDM_ENABLE_AUTO_SYNC
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Restart Seafile(&R)", IDM_RESTART
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Quit(&X)", IDM_EXIT
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// RT_MANIFEST
|
||||
//
|
||||
|
||||
1 RT_MANIFEST "Application.manifest"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Accelerator
|
||||
//
|
||||
|
||||
IDC_STARTINTRAY ACCELERATORS
|
||||
BEGIN
|
||||
"?", IDM_EXIT, ASCII, ALT
|
||||
"/", IDM_EXIT, ASCII, ALT
|
||||
END
|
||||
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.en.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
|
||||
"#include ""windows.h""\r\n"
|
||||
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_WIN7_TIP DIALOGEX 0, 0, 329, 236
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "Seafile"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Finish",ID_FINISH,260,214,50,14
|
||||
CONTROL 142,IDC_STATIC,"Static",SS_BITMAP,0,46,333,151
|
||||
LTEXT "You are using Windows 7. Tray icons are hidden by system on Windows 7, which makes it inconvinient to use Seafile. We Sugguest you set the icon of Seafile to 'Show icon and notification'.",IDC_STATIC,15,10,273,27
|
||||
END
|
||||
|
||||
IDD_INIT_SEAFILE DIALOGEX 200, 80, 327, 207
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_TOOLWINDOW | WS_EX_APPWINDOW
|
||||
CAPTION "Seafile Configuration"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Next",IDOK,206,184,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,261,184,50,14
|
||||
CONTROL 144,-1,"Static",SS_BITMAP,0,0,329,36
|
||||
CONTROL "",-1,"Static",SS_BLACKFRAME | SS_SUNKEN,0,175,327,1
|
||||
CONTROL "",-1,"Static",SS_BLACKFRAME | SS_SUNKEN,0,36,327,1
|
||||
LTEXT "Choose a disk:",IDC_STATIC_SEAFILRDIR,49,122,50,9
|
||||
COMBOBOX IDC_COMBOX_DISK,99,119,121,16,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||
LTEXT "Please choose a disk.\n\nWe will create a Seafile folder in this disk. When you download a library, it will be saved in this folder by default.",IDC_STATIC_SEAFILE,53,66,227,41
|
||||
LTEXT "此处显示当前设置",IDC_STATIC_TITLE,23,13,65,14,0,WS_EX_TRANSPARENT
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_WIN7_TIP, DIALOG
|
||||
BEGIN
|
||||
HORZGUIDE, 96
|
||||
HORZGUIDE, 121
|
||||
HORZGUIDE, 228
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Bitmap
|
||||
//
|
||||
|
||||
IDB_TRAYICON_TIP BITMAP "win7-trayicon-tip.bmp"
|
||||
IDB_TOP_BANNER BITMAP "window-head.bmp"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_APP_TITLE "Start"
|
||||
IDC_STARTINTRAY "Start"
|
||||
END
|
||||
|
||||
#endif // 中文(中华人民共和国) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
@ -37,7 +37,7 @@ IDI_STATUS_TRANSFER_1 ICON "100823_network-1.ico"
|
||||
IDI_STATUS_TRANSFER_2 ICON "100823_network-2.ico"
|
||||
IDI_STATUS_TRANSFER_3 ICON "100823_network-3.ico"
|
||||
IDI_STATUS_TRANSFER_4 ICON "100823_network-4.ico"
|
||||
IDI_STATUS_AUTO_SYNC_DISABLED ICON "sync-paused.ico"
|
||||
IDI_STATUS_AUTO_SYNC_DISABLED ICON "sync-paused.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -112,25 +112,6 @@ END
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_INIT_CCNET DIALOGEX 200, 80, 327, 206
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "Seafile 初始化(1/3)"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
LTEXT "请输入你的昵称,它用在文件的历史记录中。",IDC_STATIC,76,66,166,16
|
||||
LTEXT "昵称:",IDC_STATIC_NAME,78,86,26,14,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT_NICKNAME,115,86,82,14,ES_AUTOHSCROLL
|
||||
LTEXT "长度3~15,英文字母,数字或短横",IDC_STATIC,116,104,134,12,SS_CENTERIMAGE
|
||||
DEFPUSHBUTTON "下一步",IDOK,209,184,50,14
|
||||
PUSHBUTTON "取消",IDCANCEL,265,184,50,14
|
||||
LTEXT "消息显示在此处",IDC_STATIC_CONF_INFO,76,123,181,14,SS_CENTERIMAGE
|
||||
CONTROL 144,IDC_STATIC,"Static",SS_BITMAP,0,0,329,36
|
||||
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,0,175,327,1
|
||||
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,0,36,327,1
|
||||
LTEXT "此处显示当前设置",IDC_STATIC_TITLE,23,13,65,14,0,WS_EX_TRANSPARENT
|
||||
END
|
||||
|
||||
IDD_WIN7_TIP DIALOGEX 0, 0, 329, 236
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
@ -159,66 +140,6 @@ BEGIN
|
||||
LTEXT "´Ë´¦ÏÔʾµ±Ç°ÉèÖÃ",IDC_STATIC_TITLE,23,13,65,14,0,WS_EX_TRANSPARENT
|
||||
END
|
||||
|
||||
IDD_LOGIN DIALOGEX 200, 80, 327, 206
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "Seafile 初始化(3/3)"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
CONTROL 144,IDC_STATIC,"Static",SS_BITMAP,0,0,329,36
|
||||
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,0,175,327,1
|
||||
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,0,36,327,1
|
||||
DEFPUSHBUTTON "登录",ID_LOGIN,157,183,35,14
|
||||
LTEXT "用户名",IDC_STATIC,75,96,34,13
|
||||
EDITTEXT IDC_EDIT_SEAHUB_USERNAME,109,94,114,15,ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT_SEAHUB_PASSWD,109,113,114,14,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
LTEXT "密码",IDC_STATIC,75,114,26,13,SS_CENTERIMAGE
|
||||
PUSHBUTTON "到网站注册",ID_REGISTER,197,183,60,14
|
||||
LTEXT "登录状态",IDC_STATIC_LOGIN_INFO,107,136,116,11
|
||||
LTEXT "你尚未登录 Seafile 官方服务器。请注册后登录。\n\n你也可以稍后通过管理界面添加其他服务器。",IDC_STATIC,75,60,188,24
|
||||
PUSHBUTTON "跳过",ID_SKIP_LOGIN,271,183,43,14
|
||||
LTEXT "此处显示当前设置",IDC_STATIC_TITLE,23,13,65,14,0,WS_EX_TRANSPARENT
|
||||
END
|
||||
|
||||
IDD_WAIT_CALC_DIR DIALOGEX 200, 80, 328, 206
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "Seafile 统计目录大小"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
CONTROL 144,IDC_STATIC,"Static",SS_BITMAP,0,0,329,36
|
||||
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,0,175,327,1
|
||||
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,0,36,327,1
|
||||
LTEXT "正在统计目录大小,请稍候 ...",IDC_STATIC,99,93,141,19
|
||||
END
|
||||
|
||||
IDD_CREATE_REPO DIALOGEX 200, 80, 327, 214
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "Seafile 变为资料库"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
CONTROL 144,IDC_STATIC,"Static",SS_BITMAP,0,0,329,36
|
||||
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,0,185,327,1
|
||||
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,0,36,327,1
|
||||
DEFPUSHBUTTON "确定",IDOK,212,193,43,15
|
||||
PUSHBUTTON "取消",IDCANCEL,263,193,43,15
|
||||
LTEXT "描述 :",IDC_STATIC,47,56,21,11
|
||||
LTEXT "此处显示路径",IDC_STATIC_CREATE_PATH,21,23,206,11,0,WS_EX_TRANSPARENT
|
||||
EDITTEXT IDC_EDIT_CREATE_DESC,104,56,181,40,ES_AUTOHSCROLL
|
||||
CONTROL "",IDC_CHECK_ENCRYPT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,104,127,17,10
|
||||
EDITTEXT IDC_EDIT_CREATE_PASSWD,104,142,73,13,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
LTEXT "加密 :",IDC_STATIC,47,127,20,11,SS_CENTERIMAGE
|
||||
LTEXT "密码 :",IDC_STATIC,47,142,20,11,SS_CENTERIMAGE
|
||||
LTEXT "密码确认 :",IDC_STATIC,47,161,44,11,SS_CENTERIMAGE
|
||||
EDITTEXT IDC_EDIT_CREATE_PASSWD2,104,161,73,13,ES_PASSWORD | ES_AUTOHSCROLL
|
||||
LTEXT "3~10 位",IDC_STATIC,185,142,35,8,SS_CENTERIMAGE
|
||||
LTEXT "此处显示消息",IDC_STATIC_CREATE_INFO,60,190,115,13,SS_CENTERIMAGE
|
||||
LTEXT "服务器 :",IDC_STATIC,47,105,39,11,SS_CENTERIMAGE
|
||||
COMBOBOX IDC_COMBO_RELAY,104,105,73,12,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "变为资料库",IDC_STATIC_CREATE_REPO,"Static",SS_LEFTNOWORDWRAP | SS_CENTERIMAGE | WS_GROUP,21,6,135,12,WS_EX_TRANSPARENT
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@ -228,27 +149,12 @@ END
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_INIT_CCNET, DIALOG
|
||||
BEGIN
|
||||
VERTGUIDE, 76
|
||||
END
|
||||
|
||||
IDD_WIN7_TIP, DIALOG
|
||||
BEGIN
|
||||
HORZGUIDE, 96
|
||||
HORZGUIDE, 121
|
||||
HORZGUIDE, 228
|
||||
END
|
||||
|
||||
IDD_WAIT_CALC_DIR, DIALOG
|
||||
BEGIN
|
||||
RIGHTMARGIN, 327
|
||||
END
|
||||
|
||||
IDD_CREATE_REPO, DIALOG
|
||||
BEGIN
|
||||
BOTTOMMARGIN, 153
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
398
m4/glib-gettext.m4
Normal file
398
m4/glib-gettext.m4
Normal file
@ -0,0 +1,398 @@
|
||||
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
|
||||
#
|
||||
# This file is free software, distributed under the terms of the GNU
|
||||
# General Public License. As a special exception to the GNU General
|
||||
# Public License, this file may be distributed as part of a program
|
||||
# that contains a configuration script generated by Autoconf, under
|
||||
# the same distribution terms as the rest of that program.
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU Public License
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
#
|
||||
# Macro to add for using GNU gettext.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
|
||||
#
|
||||
# Modified to never use included libintl.
|
||||
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
|
||||
#
|
||||
# Major rework to remove unused code
|
||||
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
|
||||
#
|
||||
# Added better handling of ALL_LINGUAS from GNU gettext version
|
||||
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
|
||||
#
|
||||
# Modified to require ngettext
|
||||
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
|
||||
#
|
||||
# We need this here as well, since someone might use autoconf-2.5x
|
||||
# to configure GLib then an older version to configure a package
|
||||
# using AM_GLIB_GNU_GETTEXT
|
||||
AC_PREREQ(2.53)
|
||||
|
||||
dnl
|
||||
dnl We go to great lengths to make sure that aclocal won't
|
||||
dnl try to pull in the installed version of these macros
|
||||
dnl when running aclocal in the glib directory.
|
||||
dnl
|
||||
m4_copy([AC_DEFUN],[glib_DEFUN])
|
||||
m4_copy([AC_REQUIRE],[glib_REQUIRE])
|
||||
dnl
|
||||
dnl At the end, if we're not within glib, we'll define the public
|
||||
dnl definitions in terms of our private definitions.
|
||||
dnl
|
||||
|
||||
# GLIB_LC_MESSAGES
|
||||
#--------------------
|
||||
glib_DEFUN([GLIB_LC_MESSAGES],
|
||||
[AC_CHECK_HEADERS([locale.h])
|
||||
if test $ac_cv_header_locale_h = yes; then
|
||||
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
|
||||
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
||||
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
|
||||
if test $am_cv_val_LC_MESSAGES = yes; then
|
||||
AC_DEFINE(HAVE_LC_MESSAGES, 1,
|
||||
[Define if your <locale.h> file defines LC_MESSAGES.])
|
||||
fi
|
||||
fi])
|
||||
|
||||
# GLIB_PATH_PROG_WITH_TEST
|
||||
#----------------------------
|
||||
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
||||
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
|
||||
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
|
||||
[# Extract the first word of "$2", so it can be a program name with args.
|
||||
set dummy $2; ac_word=[$]2
|
||||
AC_MSG_CHECKING([for $ac_word])
|
||||
AC_CACHE_VAL(ac_cv_path_$1,
|
||||
[case "[$]$1" in
|
||||
/*)
|
||||
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in ifelse([$5], , $PATH, [$5]); do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
if [$3]; then
|
||||
ac_cv_path_$1="$ac_dir/$ac_word"
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
dnl If no 4th arg is given, leave the cache variable unset,
|
||||
dnl so AC_PATH_PROGS will keep looking.
|
||||
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
|
||||
])dnl
|
||||
;;
|
||||
esac])dnl
|
||||
$1="$ac_cv_path_$1"
|
||||
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
|
||||
AC_MSG_RESULT([$]$1)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AC_SUBST($1)dnl
|
||||
])
|
||||
|
||||
# GLIB_WITH_NLS
|
||||
#-----------------
|
||||
glib_DEFUN([GLIB_WITH_NLS],
|
||||
dnl NLS is obligatory
|
||||
[USE_NLS=yes
|
||||
AC_SUBST(USE_NLS)
|
||||
|
||||
gt_cv_have_gettext=no
|
||||
|
||||
CATOBJEXT=NONE
|
||||
XGETTEXT=:
|
||||
INTLLIBS=
|
||||
|
||||
AC_CHECK_HEADER(libintl.h,
|
||||
[gt_cv_func_dgettext_libintl="no"
|
||||
libintl_extra_libs=""
|
||||
|
||||
#
|
||||
# First check in libc
|
||||
#
|
||||
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
|
||||
[AC_TRY_LINK([
|
||||
#include <libintl.h>
|
||||
],
|
||||
[return !ngettext ("","", 1)],
|
||||
gt_cv_func_ngettext_libc=yes,
|
||||
gt_cv_func_ngettext_libc=no)
|
||||
])
|
||||
|
||||
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
|
||||
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
|
||||
[AC_TRY_LINK([
|
||||
#include <libintl.h>
|
||||
],
|
||||
[return !dgettext ("","")],
|
||||
gt_cv_func_dgettext_libc=yes,
|
||||
gt_cv_func_dgettext_libc=no)
|
||||
])
|
||||
fi
|
||||
|
||||
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
|
||||
AC_CHECK_FUNCS(bind_textdomain_codeset)
|
||||
fi
|
||||
|
||||
#
|
||||
# If we don't have everything we want, check in libintl
|
||||
#
|
||||
if test "$gt_cv_func_dgettext_libc" != "yes" \
|
||||
|| test "$gt_cv_func_ngettext_libc" != "yes" \
|
||||
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
|
||||
|
||||
AC_CHECK_LIB(intl, bindtextdomain,
|
||||
[AC_CHECK_LIB(intl, ngettext,
|
||||
[AC_CHECK_LIB(intl, dgettext,
|
||||
gt_cv_func_dgettext_libintl=yes)])])
|
||||
|
||||
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
|
||||
AC_MSG_CHECKING([if -liconv is needed to use gettext])
|
||||
AC_MSG_RESULT([])
|
||||
AC_CHECK_LIB(intl, ngettext,
|
||||
[AC_CHECK_LIB(intl, dcgettext,
|
||||
[gt_cv_func_dgettext_libintl=yes
|
||||
libintl_extra_libs=-liconv],
|
||||
:,-liconv)],
|
||||
:,-liconv)
|
||||
fi
|
||||
|
||||
#
|
||||
# If we found libintl, then check in it for bind_textdomain_codeset();
|
||||
# we'll prefer libc if neither have bind_textdomain_codeset(),
|
||||
# and both have dgettext and ngettext
|
||||
#
|
||||
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
|
||||
glib_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS -lintl $libintl_extra_libs"
|
||||
unset ac_cv_func_bind_textdomain_codeset
|
||||
AC_CHECK_FUNCS(bind_textdomain_codeset)
|
||||
LIBS="$glib_save_LIBS"
|
||||
|
||||
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
|
||||
gt_cv_func_dgettext_libc=no
|
||||
else
|
||||
if test "$gt_cv_func_dgettext_libc" = "yes" \
|
||||
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
|
||||
gt_cv_func_dgettext_libintl=no
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$gt_cv_func_dgettext_libc" = "yes" \
|
||||
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
||||
gt_cv_have_gettext=yes
|
||||
fi
|
||||
|
||||
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
||||
INTLLIBS="-lintl $libintl_extra_libs"
|
||||
fi
|
||||
|
||||
if test "$gt_cv_have_gettext" = "yes"; then
|
||||
AC_DEFINE(HAVE_GETTEXT,1,
|
||||
[Define if the GNU gettext() function is already present or preinstalled.])
|
||||
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
|
||||
if test "$MSGFMT" != "no"; then
|
||||
glib_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $INTLLIBS"
|
||||
AC_CHECK_FUNCS(dcgettext)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
|
||||
return _nl_msg_cat_cntr],
|
||||
[CATOBJEXT=.gmo
|
||||
DATADIRNAME=share],
|
||||
[case $host in
|
||||
*-*-solaris*)
|
||||
dnl On Solaris, if bind_textdomain_codeset is in libc,
|
||||
dnl GNU format message catalog is always supported,
|
||||
dnl since both are added to the libc all together.
|
||||
dnl Hence, we'd like to go with DATADIRNAME=share and
|
||||
dnl and CATOBJEXT=.gmo in this case.
|
||||
AC_CHECK_FUNC(bind_textdomain_codeset,
|
||||
[CATOBJEXT=.gmo
|
||||
DATADIRNAME=share],
|
||||
[CATOBJEXT=.mo
|
||||
DATADIRNAME=lib])
|
||||
;;
|
||||
*)
|
||||
CATOBJEXT=.mo
|
||||
DATADIRNAME=lib
|
||||
;;
|
||||
esac])
|
||||
LIBS="$glib_save_LIBS"
|
||||
INSTOBJEXT=.mo
|
||||
else
|
||||
gt_cv_have_gettext=no
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
if test "$gt_cv_have_gettext" = "yes" ; then
|
||||
AC_DEFINE(ENABLE_NLS, 1,
|
||||
[always defined to indicate that i18n is enabled])
|
||||
fi
|
||||
|
||||
dnl Test whether we really found GNU xgettext.
|
||||
if test "$XGETTEXT" != ":"; then
|
||||
dnl If it is not GNU xgettext we define it as : so that the
|
||||
dnl Makefiles still can work.
|
||||
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
|
||||
: ;
|
||||
else
|
||||
AC_MSG_RESULT(
|
||||
[found xgettext program is not GNU xgettext; ignore it])
|
||||
XGETTEXT=":"
|
||||
fi
|
||||
fi
|
||||
|
||||
# We need to process the po/ directory.
|
||||
POSUB=po
|
||||
|
||||
AC_OUTPUT_COMMANDS(
|
||||
[case "$CONFIG_FILES" in *po/Makefile.in*)
|
||||
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
|
||||
esac])
|
||||
|
||||
dnl These rules are solely for the distribution goal. While doing this
|
||||
dnl we only have to keep exactly one list of the available catalogs
|
||||
dnl in configure.in.
|
||||
for lang in $ALL_LINGUAS; do
|
||||
GMOFILES="$GMOFILES $lang.gmo"
|
||||
POFILES="$POFILES $lang.po"
|
||||
done
|
||||
|
||||
dnl Make all variables we use known to autoconf.
|
||||
AC_SUBST(CATALOGS)
|
||||
AC_SUBST(CATOBJEXT)
|
||||
AC_SUBST(DATADIRNAME)
|
||||
AC_SUBST(GMOFILES)
|
||||
AC_SUBST(INSTOBJEXT)
|
||||
AC_SUBST(INTLLIBS)
|
||||
AC_SUBST(PO_IN_DATADIR_TRUE)
|
||||
AC_SUBST(PO_IN_DATADIR_FALSE)
|
||||
AC_SUBST(POFILES)
|
||||
AC_SUBST(POSUB)
|
||||
])
|
||||
|
||||
# AM_GLIB_GNU_GETTEXT
|
||||
# -------------------
|
||||
# Do checks necessary for use of gettext. If a suitable implementation
|
||||
# of gettext is found in either in libintl or in the C library,
|
||||
# it will set INTLLIBS to the libraries needed for use of gettext
|
||||
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
|
||||
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
|
||||
# on various variables needed by the Makefile.in.in installed by
|
||||
# glib-gettextize.
|
||||
dnl
|
||||
glib_DEFUN([GLIB_GNU_GETTEXT],
|
||||
[AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||
|
||||
GLIB_LC_MESSAGES
|
||||
GLIB_WITH_NLS
|
||||
|
||||
if test "$gt_cv_have_gettext" = "yes"; then
|
||||
if test "x$ALL_LINGUAS" = "x"; then
|
||||
LINGUAS=
|
||||
else
|
||||
AC_MSG_CHECKING(for catalogs to be installed)
|
||||
NEW_LINGUAS=
|
||||
for presentlang in $ALL_LINGUAS; do
|
||||
useit=no
|
||||
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
|
||||
desiredlanguages="$LINGUAS"
|
||||
else
|
||||
desiredlanguages="$ALL_LINGUAS"
|
||||
fi
|
||||
for desiredlang in $desiredlanguages; do
|
||||
# Use the presentlang catalog if desiredlang is
|
||||
# a. equal to presentlang, or
|
||||
# b. a variant of presentlang (because in this case,
|
||||
# presentlang can be used as a fallback for messages
|
||||
# which are not translated in the desiredlang catalog).
|
||||
case "$desiredlang" in
|
||||
"$presentlang"*) useit=yes;;
|
||||
esac
|
||||
done
|
||||
if test $useit = yes; then
|
||||
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
|
||||
fi
|
||||
done
|
||||
LINGUAS=$NEW_LINGUAS
|
||||
AC_MSG_RESULT($LINGUAS)
|
||||
fi
|
||||
|
||||
dnl Construct list of names of catalog files to be constructed.
|
||||
if test -n "$LINGUAS"; then
|
||||
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
||||
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
|
||||
dnl Try to locate is.
|
||||
MKINSTALLDIRS=
|
||||
if test -n "$ac_aux_dir"; then
|
||||
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
||||
fi
|
||||
if test -z "$MKINSTALLDIRS"; then
|
||||
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
||||
fi
|
||||
AC_SUBST(MKINSTALLDIRS)
|
||||
|
||||
dnl Generate list of files to be processed by xgettext which will
|
||||
dnl be included in po/Makefile.
|
||||
test -d po || mkdir po
|
||||
if test "x$srcdir" != "x."; then
|
||||
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
|
||||
posrcprefix="$srcdir/"
|
||||
else
|
||||
posrcprefix="../$srcdir/"
|
||||
fi
|
||||
else
|
||||
posrcprefix="../"
|
||||
fi
|
||||
rm -f po/POTFILES
|
||||
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
|
||||
< $srcdir/po/POTFILES.in > po/POTFILES
|
||||
])
|
||||
|
||||
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
|
||||
# -------------------------------
|
||||
# Define VARIABLE to the location where catalog files will
|
||||
# be installed by po/Makefile.
|
||||
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
|
||||
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
|
||||
glib_save_prefix="$prefix"
|
||||
glib_save_exec_prefix="$exec_prefix"
|
||||
test "x$prefix" = xNONE && prefix=$ac_default_prefix
|
||||
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
|
||||
if test "x$CATOBJEXT" = "x.mo" ; then
|
||||
localedir=`eval echo "${libdir}/locale"`
|
||||
else
|
||||
localedir=`eval echo "${datadir}/locale"`
|
||||
fi
|
||||
prefix="$glib_save_prefix"
|
||||
exec_prefix="$glib_save_exec_prefix"
|
||||
AC_DEFINE_UNQUOTED($1, "$localedir",
|
||||
[Define the location where the catalogs will be installed])
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl Now the definitions that aclocal will find
|
||||
dnl
|
||||
ifdef(glib_configure_in,[],[
|
||||
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
|
||||
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
|
||||
])dnl
|
@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Include Id="SeafileInclude">
|
||||
<?define CurrentSeafileVersion="1.1.0" ?>
|
||||
<?define Manufacturer="海文互知" ?>
|
||||
|
||||
<!-- Update Guid 不能变 -->
|
||||
<?define CurrentUpdateGuid="65DED1C8-A5F1-4C49-8E7E-B0A8A5A6535C" ?>
|
||||
|
41
msi/Makefile
Normal file
41
msi/Makefile
Normal file
@ -0,0 +1,41 @@
|
||||
CULTURE = zh-cn
|
||||
LANG_FILE = zh_CN.wxl
|
||||
TARGET = seafile.msi
|
||||
ifeq (${MAKECMDGOALS}, en)
|
||||
CULTURE = en-us
|
||||
LANG_FILE = en_US.wxl
|
||||
TARGET = seafile-en.msi
|
||||
endif
|
||||
|
||||
all : $(TARGET)
|
||||
en: all
|
||||
|
||||
CC=candle.exe
|
||||
LD=light.exe
|
||||
|
||||
CFLAGS = -nologo -ext WixUIExtension -ext WixUtilExtension
|
||||
LDFLAGS = -nologo -spdb -ext \
|
||||
WixUIExtension -ext WixUtilExtension \
|
||||
-loc ${LANG_FILE} -cultures:${CULTURE}
|
||||
|
||||
sources = WixUI_InstallDir_NoLicense.wxs MyInstallDirDlg.wxs \
|
||||
seafile.wxs fragment.wxs
|
||||
|
||||
OBJECTS = ${sources:%.wxs=%.wixobj}
|
||||
|
||||
fragment.wxs:
|
||||
Paraffin.exe -dir bin -g -alias bin -custom bin fragment.wxs
|
||||
|
||||
%.wixobj : %.wxs
|
||||
$(CC) $(CFLAGS) $< -o $@
|
||||
|
||||
seafile.wixobj : seafile.wxs Includes.wxi
|
||||
$(CC) $(CFLAGS) $< -o $@
|
||||
|
||||
$(TARGET) : $(OBJECTS) $(LANG_FILE)
|
||||
$(LD) $(LDFLAGS) $(OBJECTS) -o $@
|
||||
|
||||
clean :
|
||||
rm -f $(OBJECTS) *.msi fragment.*
|
||||
|
||||
.PHONY: all en clean
|
@ -29,7 +29,7 @@
|
||||
<Control Id="FolderLabel" Type="Text" X="20" Y="60" Width="290" Height="30" NoPrefix="yes" Text="!(loc.InstallDirDlgFolderLabel)" />
|
||||
<Control Id="Folder" Type="PathEdit" X="20" Y="100" Width="320" Height="18" Property="WIXUI_INSTALLDIR" Indirect="yes" />
|
||||
<Control Id="ChangeFolder" Type="PushButton" X="20" Y="120" Width="56" Height="17" Text="!(loc.InstallDirDlgChange)" />
|
||||
<Control Id="AutomaticStartup" Type="CheckBox" X="20" Y="205" Height="18" Width="295" Text="开机自动启动 Seafile" Property="SEAFILE_AUTO_START" CheckBoxValue="1" />
|
||||
<Control Id="AutomaticStartup" Type="CheckBox" X="20" Y="205" Height="18" Width="295" Text="!(loc.AutoStartText)" Property="SEAFILE_AUTO_START" CheckBoxValue="1" />
|
||||
</Dialog>
|
||||
</UI>
|
||||
</Fragment>
|
||||
|
14
msi/en_US.wxl
Normal file
14
msi/en_US.wxl
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
|
||||
|
||||
<String Id="PackageDescription">Seafile Installer</String>
|
||||
<String Id="PackageComments">Seafile Installer</String>
|
||||
<String Id="Manufacturer">HaiWenHuZhi ltd.</String>
|
||||
<String Id="DowngradeErrorMessage">A more up-to-date version of Seafile is detected on your machine. The installer will now quit</String>
|
||||
<String Id="UserManualName">Seafile help.txt</String>
|
||||
<String Id="UserManualSource">manual.en.txt</String>
|
||||
<String Id="UninstallSeafile">Uninstall Seafile</String>
|
||||
<String Id="StartSeafile">Start Seafile</String>
|
||||
<String Id="AutoStartText">Start Seafile on startup</String>
|
||||
|
||||
</WixLocalization>
|
12
msi/manual.en.txt
Normal file
12
msi/manual.en.txt
Normal file
@ -0,0 +1,12 @@
|
||||
Welcome to use Seafile client.
|
||||
|
||||
Seafile client is used to download a "library" from a Seafile website, which is
|
||||
different from other file sync service like dropbox.
|
||||
|
||||
1. Create a library on Seafile website;
|
||||
|
||||
2. Download the library from Seafile website;
|
||||
|
||||
3. Files added to this donwloaded library will automatically appear on Seafile website.
|
||||
|
||||
Don't add files to the "Seafile" folder. That would not make it appear on the website.
|
@ -5,19 +5,18 @@
|
||||
Name='Seafile 1.1.0'
|
||||
Language='1033'
|
||||
Version='$(var.CurrentSeafileVersion)'
|
||||
Manufacturer='$(var.Manufacturer)'
|
||||
Manufacturer='!(loc.Manufacturer)'
|
||||
UpgradeCode="$(var.CurrentUpdateGuid)" >
|
||||
|
||||
<!-- We set InstallScope to perMachine to install for all users -->
|
||||
<Package Description='Seafile 安装包' Comments='Seafile 安装包'
|
||||
Manufacturer='$(var.Manufacturer)'
|
||||
<Package Description='!(loc.PackageDescription)' Comments='!(loc.PackageComments)'
|
||||
Manufacturer='!(loc.Manufacturer)'
|
||||
InstallerVersion='200'
|
||||
InstallPrivileges='elevated' InstallScope='perMachine'
|
||||
Compressed='yes' />
|
||||
|
||||
<!-- Don't allow downgrade. -->
|
||||
<MajorUpgrade
|
||||
DowngradeErrorMessage="检测到您已经安装了更新版本的 Seafile 。安装程序将自动退出。" />
|
||||
<MajorUpgrade DowngradeErrorMessage='!(loc.DowngradeErrorMessage)' />
|
||||
|
||||
<Media Id='1' Cabinet='seafile.cab' EmbedCab='yes' />
|
||||
|
||||
@ -30,7 +29,7 @@
|
||||
<Directory Id='ProgramFilesFolder' Name='PFiles'>
|
||||
<Directory Id='INSTALLDIR' Name='Seafile'>
|
||||
<Component Id="comp_manual" KeyPath="yes" Guid="F0CC8900-F8B9-11E1-83FD-000C295059FB">
|
||||
<File Id="manual.txt" Name="Seafile使用帮助.txt" Source="manual.txt" />
|
||||
<File Id="manual.txt" Name="!(loc.UserManualName)" Source="!(loc.UserManualSource)" />
|
||||
</Component>
|
||||
|
||||
<Directory Id='bin_Dir' Name='bin'>
|
||||
@ -77,14 +76,14 @@
|
||||
|
||||
<!-- shortcut to 'start seafile' -->
|
||||
<Shortcut Id="ApplicationStartMenuShortCut" Directory="SeafileStartMenuFolder"
|
||||
Name="启动 Seafile" Target="[#seafileapplet.exe]"
|
||||
Name="!(loc.StartSeafile)" Target="[#seafileapplet.exe]"
|
||||
Hotkey="0" IconIndex="0" Show="normal"
|
||||
WorkingDirectory="bin_Dir" />
|
||||
|
||||
<!-- shortcut to 'Uninstall' -->
|
||||
<Shortcut Id="UninstallProduct" Name="删除 Seafile"
|
||||
<Shortcut Id="UninstallProduct" Name="!(loc.UninstallSeafile)"
|
||||
Target="[SystemFolder]msiexec.exe" IconIndex="0"
|
||||
Arguments="/x [ProductCode]" Description="删除 Seafile" />
|
||||
Arguments="/x [ProductCode]" Description="!(loc.UninstallSeafile)" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
|
14
msi/zh_CN.wxl
Normal file
14
msi/zh_CN.wxl
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<WixLocalization Culture="zh-cn" xmlns="http://schemas.microsoft.com/wix/2006/localization">
|
||||
|
||||
<String Id="PackageDescription">Seafile 安装包</String>
|
||||
<String Id="PackageComments">Seafile 安装包</String>
|
||||
<String Id="Manufacturer">北京海文互知网络技术有限公司</String>
|
||||
<String Id="DowngradeErrorMessage">检测到您已经安装了更新版本的 Seafile 。安装程序将自动退出</String>
|
||||
<String Id="UserManualName">Seafile使用帮助.txt</String>
|
||||
<String Id="UserManualSource">manual.txt</String>
|
||||
<String Id="UninstallSeafile">删除 Seafile</String>
|
||||
<String Id="StartSeafile">启动 Seafile</String>
|
||||
<String Id="AutoStartText">开机自动启动 Seafile</String>
|
||||
|
||||
</WixLocalization>
|
2
po/LINGUAS
Normal file
2
po/LINGUAS
Normal file
@ -0,0 +1,2 @@
|
||||
# please keep this list sorted alphabetically
|
||||
zh_CN
|
7
po/POTFILES.in
Normal file
7
po/POTFILES.in
Normal file
@ -0,0 +1,7 @@
|
||||
[encoding: UTF-8]
|
||||
gui/common/applet-common.c
|
||||
gui/gtk/init-ccnet.c
|
||||
gui/gtk/seafile-applet.c
|
||||
gui/gtk/trayicon.c
|
||||
gui/win/init-ccnet.c
|
||||
gui/win/trayicon.c
|
107
po/seafile.pot
Normal file
107
po/seafile.pot
Normal file
@ -0,0 +1,107 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2012-10-25 20:07+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../gui/common/applet-common.c:161
|
||||
msgid "Uploading"
|
||||
msgstr ""
|
||||
|
||||
#: ../gui/common/applet-common.c:161
|
||||
msgid "Downloading"
|
||||
msgstr ""
|
||||
|
||||
#: ../gui/common/applet-common.c:162
|
||||
msgid "Speed"
|
||||
msgstr ""
|
||||
|
||||
#: ../gui/common/applet-common.c:188
|
||||
msgid ""
|
||||
"is unsynced. \n"
|
||||
"Reason: Deleted on server"
|
||||
msgstr ""
|
||||
|
||||
#: ../gui/common/applet-common.c:202
|
||||
msgid "is in sync"
|
||||
msgstr ""
|
||||
|
||||
#: ../gui/common/applet-common.c:216
|
||||
msgid ""
|
||||
"failed to sync. \n"
|
||||
"Access denied to service"
|
||||
msgstr ""
|
||||
|
||||
#: ../gui/common/applet-common.c:229
|
||||
msgid "failed to sync. Quota outage."
|
||||
msgstr ""
|
||||
|
||||
#: ../gui/gtk/seafile-applet.c:159
|
||||
#, c-format
|
||||
msgid "Seafile is already running\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../gui/gtk/trayicon.c:159 ../gui/win/seafile-applet.c:71
|
||||
msgid "Auto sync is disabled"
|
||||
msgstr ""
|
||||
|
||||
#: ../gui/win/seafile-applet.c:56
|
||||
msgid "Seafile is started"
|
||||
msgstr ""
|
||||
|
||||
#: ../gui/win/seafile-applet.c:56
|
||||
msgid "Click the icon to open admin console"
|
||||
msgstr ""
|
||||
|
||||
#: ../gui/win/seafile-applet.c:373
|
||||
msgid "Failed to disable auto sync"
|
||||
msgstr ""
|
||||
|
||||
#: ../gui/win/seafile-applet.c:373
|
||||
msgid "Failed to enable auto sync"
|
||||
msgstr ""
|
||||
|
||||
#: ../gui/win/seafile-applet.c:521
|
||||
msgid "Seafile is already running"
|
||||
msgstr ""
|
||||
|
||||
#: ../gui/win/init-ccnet.c:169
|
||||
msgid "free"
|
||||
msgstr ""
|
||||
|
||||
#: ../gui/win/init-ccnet.c:171
|
||||
msgid "free space unknown"
|
||||
msgstr ""
|
||||
|
||||
#: ../gui/win/init-ccnet.c:261 ../gui/win/init-ccnet.c:264
|
||||
msgid "Seafile help.txt"
|
||||
msgstr ""
|
||||
|
||||
#: ../gui/win/init-ccnet.c:289
|
||||
msgid "Choose a disk"
|
||||
msgstr ""
|
||||
|
||||
#: ../gui/win/init-ccnet.c:290
|
||||
msgid "Courier"
|
||||
msgstr ""
|
||||
|
||||
#: ../gui/win/init-ccnet.c:333 ../gui/win/init-ccnet.c:343
|
||||
msgid "Initialzation is not finished. Really quit?"
|
||||
msgstr ""
|
||||
|
||||
#: ../gui/win/trayicon.c:106
|
||||
msgid "Seafile Initialization"
|
||||
msgstr ""
|
113
po/zh_CN.po
Normal file
113
po/zh_CN.po
Normal file
@ -0,0 +1,113 @@
|
||||
# Chinese translations for seafile package
|
||||
# seafile 软件包的简体中文翻译.
|
||||
# Copyright (C) 2012 THE seafile'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the seafile package.
|
||||
# lin <linshuai2012@gmail.com>, 2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: seafile 1.1.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2012-10-25 20:07+0800\n"
|
||||
"PO-Revision-Date: 2012-10-25 14:18+0800\n"
|
||||
"Last-Translator: lin <linshuai2012@gmail.com>\n"
|
||||
"Language-Team: Chinese (simplified)\n"
|
||||
"Language: zh_CN\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../gui/common/applet-common.c:161
|
||||
msgid "Uploading"
|
||||
msgstr "正在上传"
|
||||
|
||||
#: ../gui/common/applet-common.c:161
|
||||
msgid "Downloading"
|
||||
msgstr "正在下载"
|
||||
|
||||
#: ../gui/common/applet-common.c:162
|
||||
msgid "Speed"
|
||||
msgstr "速度"
|
||||
|
||||
#: ../gui/common/applet-common.c:188
|
||||
msgid ""
|
||||
"is unsynced. \n"
|
||||
"Reason: Deleted on server"
|
||||
msgstr ""
|
||||
"已经被解除同步。\n"
|
||||
"原因:该目录已经在服务器上被删除"
|
||||
|
||||
#: ../gui/common/applet-common.c:202
|
||||
msgid "is in sync"
|
||||
msgstr "已同步"
|
||||
|
||||
#: ../gui/common/applet-common.c:216
|
||||
msgid ""
|
||||
"failed to sync. \n"
|
||||
"Access denied to service"
|
||||
msgstr ""
|
||||
"同步出错。\n"
|
||||
"您没有权限访问该资料库"
|
||||
|
||||
#: ../gui/common/applet-common.c:229
|
||||
msgid "failed to sync. Quota outage."
|
||||
msgstr ""
|
||||
"同步出错。\n"
|
||||
"该资料库所有者的空间限额已用完"
|
||||
|
||||
#: ../gui/gtk/seafile-applet.c:159
|
||||
#, c-format
|
||||
msgid "Seafile is already running\n"
|
||||
msgstr "Seafile 已经运行, 请不要重复启动\n"
|
||||
|
||||
#: ../gui/gtk/trayicon.c:159 ../gui/win/seafile-applet.c:71
|
||||
msgid "Auto sync is disabled"
|
||||
msgstr "Seafile 同步已暂停"
|
||||
|
||||
#: ../gui/win/seafile-applet.c:56
|
||||
msgid "Seafile is started"
|
||||
msgstr "Seafile 已启动"
|
||||
|
||||
#: ../gui/win/seafile-applet.c:56
|
||||
msgid "Click the icon to open admin console"
|
||||
msgstr "点击图标即可打开管理页面"
|
||||
|
||||
#: ../gui/win/seafile-applet.c:373
|
||||
msgid "Failed to disable auto sync"
|
||||
msgstr "暂停同步失败"
|
||||
|
||||
#: ../gui/win/seafile-applet.c:373
|
||||
msgid "Failed to enable auto sync"
|
||||
msgstr "开启同步失败"
|
||||
|
||||
#: ../gui/win/seafile-applet.c:521
|
||||
msgid "Seafile is already running"
|
||||
msgstr "Seafile 已经运行,请不要重复启动"
|
||||
|
||||
#: ../gui/win/init-ccnet.c:169
|
||||
msgid "free"
|
||||
msgstr "空闲"
|
||||
|
||||
#: ../gui/win/init-ccnet.c:171
|
||||
msgid "free space unknown"
|
||||
msgstr "空闲空间大小未知"
|
||||
|
||||
#: ../gui/win/init-ccnet.c:261 ../gui/win/init-ccnet.c:264
|
||||
msgid "Seafile help.txt"
|
||||
msgstr "Seafile使用帮助.txt"
|
||||
|
||||
#: ../gui/win/init-ccnet.c:289
|
||||
msgid "Choose a disk"
|
||||
msgstr "选择一个磁盘"
|
||||
|
||||
#: ../gui/win/init-ccnet.c:290
|
||||
msgid "Courier"
|
||||
msgstr "宋体"
|
||||
|
||||
#: ../gui/win/init-ccnet.c:333 ../gui/win/init-ccnet.c:343
|
||||
msgid "Initialzation is not finished. Really quit?"
|
||||
msgstr "Seafile 初始化仍未完成。确认要退出吗?"
|
||||
|
||||
#: ../gui/win/trayicon.c:106
|
||||
msgid "Seafile Initialization"
|
||||
msgstr "Seafile 初始化"
|
@ -23,6 +23,7 @@ from seaserv import get_repos, get_repo, get_commits, \
|
||||
get_branches, open_dir, get_diff, \
|
||||
list_dir, remove_repos_on_relay, get_default_seafile_worktree, \
|
||||
get_current_prefs
|
||||
from seaserv import lang_code
|
||||
|
||||
from seaserv import TaskType
|
||||
|
||||
@ -64,7 +65,7 @@ if "darwin" == sys.platform and hasattr(sys, 'frozen'):
|
||||
|
||||
NET_STATE_CONNECTED = 1
|
||||
|
||||
DEFAULT_LANG = 'zh_CN'
|
||||
DEFAULT_LANG = lang_code
|
||||
lang_in_use = None
|
||||
|
||||
gettext.install('messages', localedir, unicode=True)
|
||||
|
@ -9,5 +9,6 @@ from service import get_repos, get_repo, get_commits, \
|
||||
|
||||
from service import get_default_relay
|
||||
from service import CCNET_CONF_PATH
|
||||
from service import lang_code
|
||||
from seafile import TaskType
|
||||
|
||||
|
@ -79,6 +79,7 @@ if sys.platform == "darwin" and "LANG" not in os.environ:
|
||||
os.environ["LC_ALL"]="it_IT.UTF-8"
|
||||
|
||||
|
||||
# lang code will be used to set default language in main.py
|
||||
lang_code, system_encoding = locale.getdefaultlocale()
|
||||
|
||||
CCNET_CONF_PATH = CCNET_CONF_PATH.decode(system_encoding)
|
||||
|
Loading…
Reference in New Issue
Block a user