legend_header_label[key] = "%s" % (legend_header_label[key].encode("utf-8"))
legend_header = "<tt> %s %s %s %s</tt>" % (legend_header_label['min'],
- legend_header_label['max'],
- legend_header_label['ave'],
- legend_header_label['last']
- )
+ legend_header_label['max'],
+ legend_header_label['ave'],
+ legend_header_label['last']
+ )
title = "<tt>CPU-%s</tt>" % (str(cpu_number))
created_label = _('Graph created')
"DEF:steal=%s:value:AVERAGE" % (rrd_filepath[7]),
"COMMENT:%s\\r" % legend_footer,
"COMMENT:<tt>---------------------------------------------------------------------------</tt>\\n",
- "AREA:steal#FDFF6A:<tt>Steal </tt>",
+ # TRANSLATORS:
+ # CPUのグラフの凡例
+ # 日本語にした場合は表示が崩れますが、後で直すのでそのままで大丈夫です
+ "AREA:steal#FDFF6A:<tt>%s </tt>" % (_('Steal').encode("utf-8")),
"GPRINT:steal:MIN:<tt>%8.2lf</tt>",
"GPRINT:steal:MAX:<tt>%8.2lf</tt>",
"GPRINT:steal:AVERAGE:<tt>%8.2lf</tt>",
"GPRINT:steal:LAST:<tt>%8.2lf</tt>\\n",
- "STACK:interrupt#F7FF13:<tt>Interrupt </tt>",
+ "STACK:interrupt#F7FF13:<tt>%s </tt>" % (_('Interrupt').encode("utf-8")),
"GPRINT:interrupt:MIN:<tt>%8.2lf</tt>",
"GPRINT:interrupt:MAX:<tt>%8.2lf</tt>",
"GPRINT:interrupt:AVERAGE:<tt>%8.2lf</tt>",
"GPRINT:interrupt:LAST:<tt>%8.2lf</tt>\\n",
- "STACK:softirq#E7EF00:<tt>SoftIRQ </tt>",
+ "STACK:softirq#E7EF00:<tt>%s </tt>" % (_('SoftIRQ').encode("utf-8")),
"GPRINT:softirq:MIN:<tt>%8.2lf</tt>",
"GPRINT:softirq:MAX:<tt>%8.2lf</tt>",
"GPRINT:softirq:AVERAGE:<tt>%8.2lf</tt>",
"GPRINT:softirq:LAST:<tt>%8.2lf</tt>\\n",
- "STACK:system#B5F100:<tt>System </tt>",
+ "STACK:system#B5F100:<tt>%s </tt>" % (_('System').encode("utf-8")),
"GPRINT:system:MIN:<tt>%8.2lf</tt>",
"GPRINT:system:MAX:<tt>%8.2lf</tt>",
"GPRINT:system:AVERAGE:<tt>%8.2lf</tt>",
"GPRINT:system:LAST:<tt>%8.2lf</tt>\\n",
- "STACK:wait#B3EF00:<tt>Wait - IO </tt>",
+ "STACK:wait#B3EF00:<tt>%s </tt>" % (_('Wait - IO').encode("utf-8")),
"GPRINT:wait:MIN:<tt>%8.2lf</tt>",
"GPRINT:wait:MAX:<tt>%8.2lf</tt>",
"GPRINT:wait:AVERAGE:<tt>%8.2lf</tt>",
"GPRINT:wait:LAST:<tt>%8.2lf</tt>\\n",
- "STACK:user#95C700:<tt>User </tt>",
+ "STACK:user#95C700:<tt>%s </tt>" % (_('User').encode("utf-8")),
"GPRINT:user:MIN:<tt>%8.2lf</tt>",
"GPRINT:user:MAX:<tt>%8.2lf</tt>",
"GPRINT:user:AVERAGE:<tt>%8.2lf</tt>",
"GPRINT:user:LAST:<tt>%8.2lf</tt>\\n",
- "STACK:nice#80AA00:<tt>Nice </tt>",
+ "STACK:nice#80AA00:<tt>%s </tt>" % (_('Nice').encode("utf-8")),
"GPRINT:nice:MIN:<tt>%8.2lf</tt>",
"GPRINT:nice:MAX:<tt>%8.2lf</tt>",
"GPRINT:nice:AVERAGE:<tt>%8.2lf</tt>",
"GPRINT:nice:LAST:<tt>%8.2lf</tt>\\n",
- "STACK:idle#FFFFFF:<tt>Idle </tt>",
+ "STACK:idle#FFFFFF:<tt>%s </tt>" % (_('Idle').encode("utf-8")),
"GPRINT:idle:MIN:<tt>%8.2lf</tt>",
"GPRINT:idle:MAX:<tt>%8.2lf</tt>",
"GPRINT:idle:AVERAGE:<tt>%8.2lf</tt>",
data = rrdtool.graph(graph_filepath,
GRAPH_COMMON_PARAM,
"--title", title,
- "--vertical-label", "Byte",
+ # TRANSLATORS:
+ # ディスク容量のグラフの縦軸のラベル
+ # Byte? Bytes?
+ "--vertical-label", _('Byte').encode("utf-8"),
"--lower-limit", "0",
"--rigid",
"--start", start,
"DEF:free=%s:free:AVERAGE" % (rrd_filepath[0]),
"COMMENT:%s\\r" % legend_footer,
"COMMENT:<tt>---------------------------------------------------------------------------</tt>\\n",
- "AREA:used#80AA00:<tt>Used </tt>",
+ # TRANSLATORS:
+ # ディスク容量のグラフの縦軸のラベル
+ # 日本語にした場合は表示が崩れますが、後で直すのでそのままで大丈夫です
+ "AREA:used#80AA00:<tt>%s </tt>" % (_('Used').encode("utf-8")),
"GPRINT:used:MIN:<tt>%8.2lf%s</tt>",
"GPRINT:used:MAX:<tt>%8.2lf%s</tt>",
"GPRINT:used:AVERAGE:<tt>%8.2lf%s</tt>",
"GPRINT:used:LAST:<tt>%8.2lf%s</tt>\\n",
- "STACK:free#FFFFFF:<tt>Free </tt>",
+ "STACK:free#FFFFFF:<tt>%s </tt>" % (_('Free').encode("utf-8")),
"GPRINT:free:MIN:<tt>%8.2lf%s</tt>",
"GPRINT:free:MAX:<tt>%8.2lf%s</tt>",
"GPRINT:free:AVERAGE:<tt>%8.2lf%s</tt>",
rrd_filepath = ("%s/disk-%s/disk_%s.rrd" % (rrd_dir, dev, type),
)
+ # TRANSLATORS:
+ # ディスク性能のグラフの縦軸のラベル
+ # /proc/diskstatsの値をとってきているらしいです
+ # よく分からないので、公式HPの説明をコピペしておきます
+ #
+ # "merged" are the number of operations, that could be merged into other, already queued operations, i. e. one physical disk access served two or more logical operations. Of course, the higher that number, the better.
+ # "time" is the average time an I/O-operation took to complete. Since this is a little messy to calculate take the actual values with a grain of salt.
graph_label = {
- "merged":"Merged Ops/s",
- "octets":"Byte/s",
- "ops":"Ops/s",
- "time":"Seconds/s",
+ "merged":_("Merged Ops/s").encode("utf-8"),
+ "octets":_("Byte/s").encode("utf-8"),
+ "ops":_("Ops/s").encode("utf-8"),
+ "time":_("Seconds/s").encode("utf-8"),
}
for filepath in rrd_filepath:
import rrdtool
import karesansui
from karesansui.lib.const import GRAPH_COMMON_PARAM, DEFAULT_LANGS
-from karesansui.lib.utils import is_readable, generate_phrase, copy_file
+from karesansui.lib.utils import is_readable, generate_phrase
def is_interface_file_exist(rrd_dir, dev):
ret = True
rrd_filepath = ("%s/interface/if_%s-%s.rrd" % (rrd_dir, type, dev),
)
-
+ # TRANSLATORS:
+ # ネットワークのグラフのタイトル
graph_title = {
- "packets":"%s - packets",
- "octets":"%s - traffic",
- "errors":"%s - errors",
+ "packets":"%%s - %s" % (_('Packets').encode("utf-8")),
+ "octets":"%%s - %s" % (_('Traffic').encode("utf-8")),
+ "errors":"%%s - %s" % (_('Errors').encode("utf-8")),
}
+ # TRANSLATORS:
+ # ネットワークのグラフの縦軸のラベル
+ # packetsは1秒あたりのパケット数
+ # octetsは1秒あたりのバイト数
+ # errorsは1秒あたりのエラーパケット数
graph_label = {
- "packets":"Packets / sec",
- "octets":"Octet / sec",
- "errors":"Packets / sec",
+ "packets":_("Packets / sec").encode("utf-8"),
+ "octets":_("Octet / sec").encode("utf-8"),
+ "errors":_("Packets / sec").encode("utf-8"),
}
for filepath in rrd_filepath:
data = rrdtool.graph(graph_filepath,
GRAPH_COMMON_PARAM,
"--title", title,
- "--vertical-label", "second",
+ # TRANSLATORS:
+ # 仮想マシンのグラフのCPUグラフの縦軸のラベル
+ # 単位はCPU時間(秒)です
+ "--vertical-label", _('Second').encode("utf-8"),
"--units-exponent", "0",
"--alt-y-grid",
"--start", start,
"CDEF:s=ns,1000,1000,1000,*,*,/",
"COMMENT:%s\\r" % legend_footer,
"COMMENT:<tt>---------------------------------------------------------------------------</tt>\\n",
- "AREA:s#80AA00:<tt>Second </tt>",
+ # TRANSLATORS:
+ # 仮想マシンのグラフのCPUグラフの凡例
+ "AREA:s#80AA00:<tt>%s </tt>" % (_('Second').encode("utf-8")),
"GPRINT:s:MIN:<tt>%8.2lf</tt>",
"GPRINT:s:MAX:<tt>%8.2lf</tt>",
"GPRINT:s:AVERAGE:<tt>%8.2lf</tt>",
"ops":"%s - %s",
}
+ # TRANSLATORS:
+ # 仮想マシンのグラフのディスクグラフの縦軸のラベル
graph_label = {
- "octets":"Byte/s",
- "ops":"Ops/s",
+ "octets":_('Byte/s').encode("utf-8"),
+ "ops":_('Ops/s').encode("utf-8"),
}
for filepath in rrd_filepath:
rrd_filepath = ("%s/libvirt/if_%s-%s.rrd" % (rrd_dir, type, dev),
)
+ # TRANSLATORS:
+ # 仮想マシンのグラフのネットワークグラフのタイトル
graph_title = {
- "packets":"%s - packets",
- "octets":"%s - traffic",
- "errors":"%s - errors",
- "dropped":"%s - dropped",
+ "packets":"%%s - %s" % (_('Packets').encode("utf-8")),
+ "octets":"%%s - %s" % (_('Traffic').encode("utf-8")),
+ "errors":"%%s - %s" % (_('Errors').encode("utf-8")),
+ "dropped":"%%s - %s" % (_('Dropped').encode("utf-8")),
}
+ # TRANSLATORS:
+ # 仮想マシンのグラフのネットワークグラフの縦軸のラベル
+ # packetsは1秒あたりのパケット数
+ # octetsは1秒あたりのバイト数
+ # errorsは1秒あたりのエラーパケット数
+ # droppedは1秒あたりのパケットドロップ数
graph_label = {
- "packets":"Packets / sec",
- "octets":"Octet / sec",
- "errors":"Packets / sec",
- "dropped":"Packets / sec",
+ "packets":_("Packets / sec").encode("utf-8"),
+ "octets":_("Octet / sec").encode("utf-8"),
+ "errors":_("Packets / sec").encode("utf-8"),
+ "dropped":_("Packets / sec").encode("utf-8"),
}
for filepath in rrd_filepath:
else:
title = "<tt>%s</tt>" % (title.encode("utf-8"))
+ # TRANSLATORS:
+ # ロードアベレージのグラフの凡例
legend = {"1m":_('1m average'),
"5m":_('5m average'),
"15m":_('15m average'),
data = rrdtool.graph(graph_filepath,
GRAPH_COMMON_PARAM,
"--title", title,
- "--vertical-label", "System load",
+ # TRANSLATORS:
+ # ロードアベレージのグラフの縦軸のラベル
+ "--vertical-label", _('System load').encode("utf-8"),
"--start", start,
"--end", end,
"--units-exponent", "0",
data = rrdtool.graph(graph_filepath,
GRAPH_COMMON_PARAM,
"--title", title,
- "--vertical-label", "byte",
+ # TRANSLATORS:
+ # メモリのグラフの縦軸のラベル
+ # Byte? Bytes?
+ "--vertical-label", _('Byte').encode("utf-8"),
"--lower-limit", "0",
"--rigid",
"--start", start,
"DEF:used=%s:value:AVERAGE" % (rrd_filepath[3]),
"COMMENT:%s\\r" % legend_footer,
"COMMENT:<tt>---------------------------------------------------------------------------</tt>\\n",
- "AREA:used#80AA00:<tt>used </tt>",
+ # TRANSLATORS:
+ # メモリのグラフの項目名
+ # 日本語にした場合は表示が崩れますが、後で直すのでそのままで大丈夫です
+ "AREA:used#80AA00:<tt>%s </tt>" % (_('Used').encode("utf-8")),
"GPRINT:used:MIN:<tt>%8.1lf %s</tt>",
"GPRINT:used:MAX:<tt>%8.1lf %s</tt>",
"GPRINT:used:AVERAGE:<tt>%8.1lf %s</tt>",
"GPRINT:used:LAST:<tt>%8.1lf %s</tt>\\n",
- "STACK:buffered#E7EF00:<tt>buffered </tt>",
+ "STACK:buffered#E7EF00:<tt>%s </tt>" % (_('Buffered').encode("utf-8")),
"GPRINT:buffered:MIN:<tt>%8.1lf %s</tt>",
"GPRINT:buffered:MAX:<tt>%8.1lf %s</tt>",
"GPRINT:buffered:AVERAGE:<tt>%8.1lf %s</tt>",
"GPRINT:buffered:LAST:<tt>%8.1lf %s</tt>\\n",
- "STACK:cached#B3EF00:<tt>cached </tt>",
+ "STACK:cached#B3EF00:<tt>%s </tt>" % (_('Cached').encode("utf-8")),
"GPRINT:cached:MIN:<tt>%8.1lf %s</tt>",
"GPRINT:cached:MAX:<tt>%8.1lf %s</tt>",
"GPRINT:cached:AVERAGE:<tt>%8.1lf %s</tt>",
"GPRINT:cached:LAST:<tt>%8.1lf %s</tt>\\n",
- "STACK:free#FFFFFF:<tt>free </tt>",
+ "STACK:free#FFFFFF:<tt>%s </tt>" % (_('Free').encode("utf-8")),
"GPRINT:free:MIN:<tt>%8.1lf %s</tt>",
"GPRINT:free:MAX:<tt>%8.1lf %s</tt>",
"GPRINT:free:AVERAGE:<tt>%8.1lf %s</tt>",
legend_header = "<tt> %s</tt>" % (legend_header_label['last'])
+ # TRANSLATORS:
+ # 起動時間のグラフの凡例
legend_label = {"uptime":_('uptime'),
"day":_('days'),
"hour":_('hours'),
else:
legend_label[key] = "%s" % (legend_label[key].encode("utf-8"))
+ # TRANSLATORS:
+ # 起動時間のグラフのタイトル
title = _('Uptime')
if re.search(u"[^a-zA-Z0-9_\-\.]", title):
title = "%s" % (title.encode("utf-8"))
data = rrdtool.graph(graph_filepath,
GRAPH_COMMON_PARAM,
"--title", title,
- "--vertical-label", "Days",
+ # TRANSLATORS:
+ # 起動時間のグラフの縦軸のラベル
+ "--vertical-label", _('Days').encode("utf-8"),
+ "--lower-limit", "0",
+ "--rigid",
"--start", start,
"--end", end,
"--alt-autoscale",
legend_header_label['ave'],
legend_header_label['last']
)
+ # TRANSLATORS:
+ # ユーザ数のグラフのタイトル
title = _('Users')
if re.search(u"[^a-zA-Z0-9_\-\.]", title):
title = "%s" % (title.encode("utf-8"))
data = rrdtool.graph(graph_filepath,
GRAPH_COMMON_PARAM,
"--title", title,
- "--vertical-label", "Users",
+ # TRANSLATORS:
+ # ユーザ数のグラフの縦軸のラベル
+ "--vertical-label", _('Users').encode("utf-8"),
"--start", start,
"--end", end,
"--legend-direction", "bottomup",
"DEF:users=%s:users:AVERAGE" % (rrd_filepath[0]),
"COMMENT:%s\\r" % legend_footer,
"COMMENT:<tt>---------------------------------------------------------------------------</tt>\\n",
- "AREA:users#80AA00:<tt>Users </tt>",
+ # TRANSLATORS:
+ # ユーザ数のグラフの凡例
+ "AREA:users#80AA00:<tt>%s </tt>" % (_('Users').encode("utf-8")),
"GPRINT:users:MIN:<tt>%8.2lf</tt>",
"GPRINT:users:MAX:<tt>%8.2lf</tt>",
"GPRINT:users:AVERAGE:<tt>%8.2lf</tt>",
helptip("#network_storage_auto_start_help",
"${_('Autostart')}",
"${_('When checked, the connection automatically at startup.')}");
+
+ $("#network_storage_auth_none").click();
});
-->
</script>
<div class="grayout-param">${_('Authentication')}<span id="network_storage_authentication_help" /></div>
<div class="grayout-value grayout-form">
- <input type="radio" name="network_storage_authentication" id="network_storage_auth_chap" value="CHAP" checked/>${_('CHAP')}
- <input type="radio" name="network_storage_authentication" id="network_storage_auth_none" value="None" />${_('None')}
+ <input type="radio" name="network_storage_authentication" id="network_storage_auth_chap" value="CHAP" />${_('CHAP')}
+ <input type="radio" name="network_storage_authentication" id="network_storage_auth_none" value="None" checked/>${_('None')}
</div>
<div id="auth-section">
・現在の状態
・自動起動のONOFF
-->
- <th>${_('Network Storage Type')}</th>
- <th>${_('Target host name')}</th>
- <th>${_('Target IQN')}</th>
- <th>${_('Status')}</th>
- <th>${_('Autostart')}
+ <th width="10%">${_('Type')}</th>
+ <th width="30%">${_('Target host name')}</th>
+ <th width="40%">${_('Target IQN')}</th>
+ <th width="10%">${_('Status')}</th>
+ <th width="10%">${_('Autostart')}
</tr>
</thead>
<tbody>
<td>${_('Disconnect')}</td>
% endif
% if network_storage['autostart'] == 1:
- <td>${_('ON')}</td>
+ <td align="center"><img src="${ctx.homepath}/static/images/server-startup.png" alt="${_('ON')}" /></td>
% else:
- <td>${_('OFF')}</td>
+ <td align="center">-</td>
% endif
</tr>
% endfor
</table>
</td>
<td id="report_period" class="report_period" valign="center">
+ <!--
+ TRANSLATORS:
+ グラフで表示するデータの開始時刻~終了時刻のこと
+ -->
<span>${_('Report Period')}: </span>
<input type="text" id="report_start_day" name="report_start_day" size="14" maxlength="10" />
<input type="text" id="report_start_time" name="report_start_time" size="6"/>
<form method="post" action="" id="input_storagepool_form" name="input_storagepool_form">
<div class="grayout-head">
<span class="grayout-title">
- <img src="${ctx.homepath}/static/images/settings-title.gif">${_('Storage Pool Settings')}
+ <img src="${ctx.homepath}/static/images/settings-title.gif">${_('Add Storage Pool')}
</span>
<br style="clear: both;"/>
</div>
$("#add_storagepool").click(function() {
grayout_view("GET",
"${ctx.homepath}${ctx.path}?mode=input",
- "${_('Add storagepool')}",
+ "${_('Storage Pool Settings')}",
"${ctx.homepath}${ctx.path}");
});
}