diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2011-01-02 10:48:25 -0800 |
---|---|---|
committer | Arjan van de Ven <arjan@linux.intel.com> | 2011-01-02 10:48:25 -0800 |
commit | 2aa2cfef3386e3271f7f928decc3c2d95eb19401 (patch) | |
tree | d3f77c8d10139e349bdad8838fbb76448eb0cf1b /cpu | |
parent | 37b44398fadab0d5a3a085bd037521ea8fba27b4 (diff) | |
download | powertop-2aa2cfef3386e3271f7f928decc3c2d95eb19401.tar.gz |
more translatable strings
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/cpu.cpp | 4 | ||||
-rw-r--r-- | cpu/cpu_core.cpp | 2 | ||||
-rw-r--r-- | cpu/cpu_linux.cpp | 4 | ||||
-rw-r--r-- | cpu/cpu_package.cpp | 2 | ||||
-rw-r--r-- | cpu/intel_cpus.cpp | 24 |
5 files changed, 18 insertions, 18 deletions
diff --git a/cpu/cpu.cpp b/cpu/cpu.cpp index 4c1fe46..3bd6209 100644 --- a/cpu/cpu.cpp +++ b/cpu/cpu.cpp @@ -71,8 +71,8 @@ static class abstract_cpu * new_package(int package, int cpu, char * vendor, int ret->set_number(package, cpu); ret->childcount = 0; - sprintf(packagename, "cpu package %i", cpu); - cpudev = new class cpudevice("cpu package", packagename, ret); + sprintf(packagename, _("cpu package %i"), cpu); + cpudev = new class cpudevice(_("cpu package"), packagename, ret); all_devices.push_back(cpudev); return ret; } diff --git a/cpu/cpu_core.cpp b/cpu/cpu_core.cpp index 579a1d9..bf969b6 100644 --- a/cpu/cpu_core.cpp +++ b/cpu/cpu_core.cpp @@ -113,7 +113,7 @@ void cpu_core::account_freq(uint64_t freq, uint64_t duration) state->freq = freq; hz_to_human(freq, state->human_name); if (freq == 0) - strcpy(state->human_name, "Idle"); + strcpy(state->human_name, _("Idle")); if (is_turbo(freq, max_frequency, max_minus_one_frequency)) sprintf(state->human_name, _("Turbo Mode")); diff --git a/cpu/cpu_linux.cpp b/cpu/cpu_linux.cpp index a47161c..9ecda79 100644 --- a/cpu/cpu_linux.cpp +++ b/cpu/cpu_linux.cpp @@ -89,7 +89,7 @@ void cpu_linux::measurement_start(void) } if (strcmp(human_name, "C0")==0) - strcpy(human_name, "C0 polling"); + strcpy(human_name, _("C0 polling")); sprintf(filename + len, "/%s/usage", entry->d_name); file.open(filename, ios::in); @@ -326,7 +326,7 @@ void cpu_linux::account_freq(uint64_t freq, uint64_t duration) state->freq = freq; hz_to_human(freq, state->human_name); if (freq == 0) - strcpy(state->human_name, "Idle"); + strcpy(state->human_name, _("Idle")); if (is_turbo(freq, max_frequency, max_minus_one_frequency)) sprintf(state->human_name, _("Turbo Mode")); diff --git a/cpu/cpu_package.cpp b/cpu/cpu_package.cpp index cdd751e..02b6146 100644 --- a/cpu/cpu_package.cpp +++ b/cpu/cpu_package.cpp @@ -142,7 +142,7 @@ void cpu_package::account_freq(uint64_t freq, uint64_t duration) state->freq = freq; hz_to_human(freq, state->human_name); if (freq == 0) - strcpy(state->human_name, "Idle"); + strcpy(state->human_name, _("Idle")); if (is_turbo(freq, max_frequency, max_minus_one_frequency)) sprintf(state->human_name, _("Turbo Mode")); state->after_count = 1; diff --git a/cpu/intel_cpus.cpp b/cpu/intel_cpus.cpp index e59cd76..301592f 100644 --- a/cpu/intel_cpus.cpp +++ b/cpu/intel_cpus.cpp @@ -85,8 +85,8 @@ void nhm_core::measurement_start(void) c6_before = get_msr(first_cpu, MSR_CORE_C6_RESIDENCY); tsc_before = get_msr(first_cpu, MSR_TSC); - insert_cstate("core c3", "C3 (cc3)", 0, c3_before, 1); - insert_cstate("core c6", "C6 (cc6)", 0, c6_before, 1); + insert_cstate("core c3", _("C3 (cc3)"), 0, c3_before, 1); + insert_cstate("core c6", _("C6 (cc6)"), 0, c6_before, 1); sprintf(filename, "/sys/devices/system/cpu/cpu%i/cpufreq/stats/time_in_state", first_cpu); @@ -196,7 +196,7 @@ void nhm_core::account_freq(uint64_t freq, uint64_t duration) state->freq = freq; hz_to_human(freq, state->human_name); if (freq == 0) - strcpy(state->human_name, "Idle"); + strcpy(state->human_name, _("Idle")); if (is_turbo(freq, max_frequency, max_minus_one_frequency)) sprintf(state->human_name, _("Turbo Mode")); @@ -270,7 +270,7 @@ char * nhm_core::fill_pstate_line(int line_nr, char *buffer) } if (line_nr == LEVEL_HEADER) { - sprintf(buffer," Core"); + sprintf(buffer,_(" Core")); return buffer; } @@ -296,7 +296,7 @@ char * nhm_package::fill_pstate_line(int line_nr, char *buffer) if (line_nr == LEVEL_HEADER) { - sprintf(buffer," Package"); + sprintf(buffer,_(" Package")); return buffer; } @@ -320,8 +320,8 @@ void nhm_package::measurement_start(void) c6_before = get_msr(number, MSR_PKG_C6_RESIDENCY); tsc_before = get_msr(first_cpu, MSR_TSC); - insert_cstate("pkg c3", "C3 (pc3)", 0, c3_before, 1); - insert_cstate("pkg c6", "C6 (pc6)", 0, c6_before, 1); + insert_cstate("pkg c3", _("C3 (pc3)"), 0, c3_before, 1); + insert_cstate("pkg c6", _("C6 (pc6)"), 0, c6_before, 1); } void nhm_package::measurement_end(void) @@ -414,7 +414,7 @@ void nhm_package::account_freq(uint64_t freq, uint64_t duration) state->freq = freq; hz_to_human(freq, state->human_name); if (freq == 0) - strcpy(state->human_name, "Idle"); + strcpy(state->human_name, _("Idle")); if (is_turbo(freq, max_frequency, max_minus_one_frequency)) sprintf(state->human_name, _("Turbo Mode")); state->after_count = 1; @@ -486,7 +486,7 @@ void nhm_cpu::measurement_start(void) mperf_before = get_msr(number, MSR_MPERF); tsc_before = get_msr(number, MSR_TSC); - insert_cstate("active", "C0 active", 0, aperf_before, 1); + insert_cstate("active", _("C0 active"), 0, aperf_before, 1); sprintf(filename, "/sys/devices/system/cpu/cpu%i/cpufreq/stats/time_in_state", first_cpu); @@ -545,7 +545,7 @@ void nhm_cpu::measurement_end(void) char * nhm_cpu::fill_pstate_name(int line_nr, char *buffer) { if (line_nr == LEVEL_C0) { - sprintf(buffer, "Actual"); + sprintf(buffer, _("Actual")); return buffer; } return cpu_linux::fill_pstate_name(line_nr, buffer); @@ -562,7 +562,7 @@ char * nhm_cpu::fill_pstate_line(int line_nr, char *buffer) } if (line_nr == LEVEL_HEADER) { - sprintf(buffer," CPU %i", number); + sprintf(buffer,_(" CPU %i"), number); return buffer; } @@ -615,7 +615,7 @@ void nhm_cpu::account_freq(uint64_t freq, uint64_t duration) state->freq = freq; hz_to_human(freq, state->human_name); if (freq == 0) - strcpy(state->human_name, "Idle"); + strcpy(state->human_name, _("Idle")); state->after_count = 1; } |