From 6343f3520249583e78ca75f28e1d20efa9c48aa5 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 23 Jun 2005 10:38:06 +0000 Subject: [PATCH] i18nize some programs i18nize some programs with gettext. --- Makefile.am | 2 +- aplay/Makefile.am | 2 +- aplay/aplay.c | 229 ++++---- configure.in | 2 +- include/gettext.h | 16 + po/LINGUAS | 1 + po/Makefile.in.in | 366 ++++++++++++ po/Makevars | 41 ++ po/Makevars.template | 41 ++ po/POTFILES.in | 4 + po/Rules-quot | 47 ++ po/boldquot.sed | 10 + po/en@boldquot.header | 25 + po/en@quot.header | 22 + po/insert-header.sin | 23 + po/ja.po | 1090 +++++++++++++++++++++++++++++++++++ po/quot.sed | 6 + po/remove-potcdate.sed | 11 + po/remove-potcdate.sin | 19 + seq/aconnect/Makefile.am | 1 + seq/aconnect/aconnect.c | 66 ++- seq/aseqdump/aseqdump.c | 2 +- seq/aseqnet/aseqnet.c | 63 +- speaker-test/Makefile.am | 3 +- speaker-test/speaker-test.c | 161 +++--- 25 files changed, 2001 insertions(+), 252 deletions(-) create mode 100644 include/gettext.h create mode 100644 po/LINGUAS create mode 100644 po/Makefile.in.in create mode 100644 po/Makevars create mode 100644 po/Makevars.template create mode 100644 po/POTFILES.in create mode 100644 po/Rules-quot create mode 100644 po/boldquot.sed create mode 100644 po/en@boldquot.header create mode 100644 po/en@quot.header create mode 100644 po/insert-header.sin create mode 100644 po/ja.po create mode 100644 po/quot.sed create mode 100644 po/remove-potcdate.sed create mode 100644 po/remove-potcdate.sin diff --git a/Makefile.am b/Makefile.am index 956c26c..3d310d4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,7 @@ ALSAMIXER_DIR=alsamixer else ALSAMIXER_DIR= endif -SUBDIRS= include alsactl alsaconf $(ALSAMIXER_DIR) amidi amixer aplay iecset seq speaker-test utils m4 +SUBDIRS= include alsactl alsaconf $(ALSAMIXER_DIR) amidi amixer aplay iecset seq speaker-test utils m4 po EXTRA_DIST=ChangeLog INSTALL TODO README configure cvscompile depcomp AUTOMAKE_OPTIONS=foreign ACLOCAL_AMFLAGS = -I m4 diff --git a/aplay/Makefile.am b/aplay/Makefile.am index df75c7e..06630ad 100644 --- a/aplay/Makefile.am +++ b/aplay/Makefile.am @@ -1,5 +1,5 @@ INCLUDES = -I$(top_srcdir)/include -LDADD = -lasound +LDADD = -lasound $(LIBINTL) # debug flags #LDFLAGS = -static diff --git a/aplay/aplay.c b/aplay/aplay.c index f9a7216..c3f3e15 100644 --- a/aplay/aplay.c +++ b/aplay/aplay.c @@ -44,6 +44,7 @@ #include #include #include "aconfig.h" +#include "gettext.h" #include "formats.h" #include "version.h" @@ -122,10 +123,10 @@ struct fmt_capture { void (*end) (int fd); char *what; } fmt_rec_table[] = { - { NULL, end_raw, "raw data" }, - { begin_voc, end_voc, "VOC" }, - { begin_wave, end_wave, "WAVE" }, - { begin_au, end_au, "Sparc Audio" } + { NULL, end_raw, N_("raw data") }, + { begin_voc, end_voc, N_("VOC") }, + { begin_wave, end_wave, N_("WAVE") }, + { begin_au, end_au, N_("Sparc Audio")} }; #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) @@ -146,7 +147,7 @@ static void usage(char *command) { snd_pcm_format_t k; fprintf(stderr, -"Usage: %s [OPTION]... [FILE]...\n" +_("Usage: %s [OPTION]... [FILE]...\n" "\n" "-h, --help help\n" " --version print current version\n" @@ -171,19 +172,19 @@ static void usage(char *command) " (relative to buffer size if <= 0)\n" "-T, --stop-delay=# delay for automatic PCM stop is # microseconds from xrun\n" "-v, --verbose show PCM structure and setup (accumulative)\n" -"-I, --separate-channels one file for each channel\n" +"-I, --separate-channels one file for each channel\n") , command); - fprintf(stderr, "Recognized sample formats are:"); + fprintf(stderr, _("Recognized sample formats are:")); for (k = 0; k < SND_PCM_FORMAT_LAST; ++k) { const char *s = snd_pcm_format_name(k); if (s) fprintf(stderr, " %s", s); } - fprintf(stderr, "\nSome of these may not be available on selected hardware\n"); - fprintf(stderr, "The availabled format shortcuts are:\n"); - fprintf(stderr, "-f cd (16 bit little endian, 44100, stereo)\n"); - fprintf(stderr, "-f cdr (16 bit big endian, 44100, stereo)\n"); - fprintf(stderr, "-f dat (16 bit little endian, 48000, stereo)\n"); + fprintf(stderr, _("\nSome of these may not be available on selected hardware\n")); + fprintf(stderr, _("The availabled format shortcuts are:\n")); + fprintf(stderr, _("-f cd (16 bit little endian, 44100, stereo)\n")); + fprintf(stderr, _("-f cdr (16 bit big endian, 44100, stereo)\n")); + fprintf(stderr, _("-f dat (16 bit little endian, 48000, stereo)\n")); } static void names_list(void) @@ -193,7 +194,7 @@ static void names_list(void) err = snd_names_list("pcm", &list); if (err < 0) { - error("snd_names_list error: %s", snd_strerror(err)); + error(_("snd_names_list error: %s"), snd_strerror(err)); return; } item = list; @@ -215,10 +216,11 @@ static void device_list(void) card = -1; if (snd_card_next(&card) < 0 || card < 0) { - error("no soundcards found..."); + error(_("no soundcards found...")); return; } - fprintf(stderr, "**** List of %s Hardware Devices ****\n", snd_pcm_stream_name(stream)); + fprintf(stderr, _("**** List of %s Hardware Devices ****\n"), + snd_pcm_stream_name(stream)); while (card >= 0) { char name[32]; sprintf(name, "hw:%d", card); @@ -246,19 +248,21 @@ static void device_list(void) error("control digital audio info (%i): %s", card, snd_strerror(err)); continue; } - fprintf(stderr, "card %i: %s [%s], device %i: %s [%s]\n", + fprintf(stderr, _("card %i: %s [%s], device %i: %s [%s]\n"), card, snd_ctl_card_info_get_id(info), snd_ctl_card_info_get_name(info), dev, snd_pcm_info_get_id(pcminfo), snd_pcm_info_get_name(pcminfo)); count = snd_pcm_info_get_subdevices_count(pcminfo); - fprintf(stderr, " Subdevices: %i/%i\n", snd_pcm_info_get_subdevices_avail(pcminfo), count); + fprintf(stderr, _(" Subdevices: %i/%i\n"), + snd_pcm_info_get_subdevices_avail(pcminfo), count); for (idx = 0; idx < (int)count; idx++) { snd_pcm_info_set_subdevice(pcminfo, idx); if ((err = snd_ctl_pcm_info(handle, pcminfo)) < 0) { error("control digital audio playback info (%i): %s", card, snd_strerror(err)); } else { - fprintf(stderr, " Subdevice #%i: %s\n", idx, snd_pcm_info_get_subdevice_name(pcminfo)); + fprintf(stderr, _(" Subdevice #%i: %s\n"), + idx, snd_pcm_info_get_subdevice_name(pcminfo)); } } } @@ -285,7 +289,7 @@ static void pcm_list(void) err = snd_config_search(snd_config, "pcm", &conf); if (err < 0) return; - fprintf(stderr, "PCM list:\n"); + fprintf(stderr, _("PCM list:\n")); snd_config_save(conf, out); snd_output_close(out); } @@ -298,7 +302,7 @@ static void version(void) static void signal_handler(int sig) { if (!quiet_mode) - fprintf(stderr, "Aborted by signal %s...\n", strsignal(sig)); + fprintf(stderr, _("Aborted by signal %s...\n"), strsignal(sig)); if (stream == SND_PCM_STREAM_CAPTURE) { fmt_rec_table[file_type].end(fd); stream = -1; @@ -358,6 +362,9 @@ int main(int argc, char *argv[]) int do_names_list = 0, do_device_list = 0, do_pcm_list = 0; snd_pcm_info_t *info; + setlocale(LC_ALL, ""); + textdomain(PACKAGE); + snd_pcm_info_alloca(&info); err = snd_output_stdio_attach(&log, stderr, 0); @@ -374,7 +381,7 @@ int main(int argc, char *argv[]) stream = SND_PCM_STREAM_PLAYBACK; command = "aplay"; } else { - error("command should be named either arecord or aplay"); + error(_("command should be named either arecord or aplay")); return 1; } @@ -416,14 +423,14 @@ int main(int argc, char *argv[]) else if (strcasecmp(optarg, "au") == 0 || strcasecmp(optarg, "sparc") == 0) file_type = FORMAT_AU; else { - error("unrecognized file format %s", optarg); + error(_("unrecognized file format %s"), optarg); return 1; } break; case 'c': rhwparams.channels = atoi(optarg); if (rhwparams.channels < 1 || rhwparams.channels > 32) { - error("value %i for channels is invalid", rhwparams.channels); + error(_("value %i for channels is invalid"), rhwparams.channels); return 1; } break; @@ -442,7 +449,7 @@ int main(int argc, char *argv[]) } else { rhwparams.format = snd_pcm_format_value(optarg); if (rhwparams.format == SND_PCM_FORMAT_UNKNOWN) { - error("wrong extended format '%s'", optarg); + error(_("wrong extended format '%s'"), optarg); exit(EXIT_FAILURE); } } @@ -453,7 +460,7 @@ int main(int argc, char *argv[]) tmp *= 1000; rhwparams.rate = tmp; if (tmp < 2000 || tmp > 192000) { - error("bad speed value %i", tmp); + error(_("bad speed value %i"), tmp); return 1; } break; @@ -509,7 +516,7 @@ int main(int argc, char *argv[]) file_type = FORMAT_WAVE; break; default: - fprintf(stderr, "Try `%s --help' for more information.\n", command); + fprintf(stderr, _("Try `%s --help' for more information.\n"), command); return 1; } } @@ -530,19 +537,19 @@ int main(int argc, char *argv[]) err = snd_pcm_open(&handle, pcm_name, stream, open_mode); if (err < 0) { - error("audio open error: %s", snd_strerror(err)); + error(_("audio open error: %s"), snd_strerror(err)); return 1; } if ((err = snd_pcm_info(handle, info)) < 0) { - error("info error: %s", snd_strerror(err)); + error(_("info error: %s"), snd_strerror(err)); return 1; } if (nonblock) { err = snd_pcm_nonblock(handle, 1); if (err < 0) { - error("nonblock setting error: %s", snd_strerror(err)); + error(_("nonblock setting error: %s"), snd_strerror(err)); return 1; } } @@ -552,7 +559,7 @@ int main(int argc, char *argv[]) audiobuf = (char *)malloc(1024); if (audiobuf == NULL) { - error("not enough memory"); + error(_("not enough memory")); return 1; } @@ -646,7 +653,7 @@ size_t test_wavefile_read(int fd, char *buffer, size_t *size, size_t reqsize, in if (*size >= reqsize) return *size; if ((size_t)safe_read(fd, buffer + *size, reqsize - *size) != reqsize - *size) { - error("read error (called from line %i)", line); + error(_("read error (called from line %i)"), line); exit(EXIT_FAILURE); } return *size = reqsize; @@ -656,7 +663,7 @@ size_t test_wavefile_read(int fd, char *buffer, size_t *size, size_t reqsize, in if (len > blimit) { \ blimit = len; \ if ((buffer = realloc(buffer, blimit)) == NULL) { \ - error("not enough memory"); \ + error(_("not enough memory")); \ exit(EXIT_FAILURE); \ } \ } @@ -704,18 +711,19 @@ static ssize_t test_wavefile(int fd, char *_buffer, size_t size) } if (len < sizeof(WaveFmtBody)) { - error("unknown length of 'fmt ' chunk (read %u, should be %u at least)", len, (u_int)sizeof(WaveFmtBody)); + error(_("unknown length of 'fmt ' chunk (read %u, should be %u at least)"), + len, (u_int)sizeof(WaveFmtBody)); exit(EXIT_FAILURE); } check_wavefile_space(buffer, len, blimit); test_wavefile_read(fd, buffer, &size, len, __LINE__); f = (WaveFmtBody*) buffer; if (LE_SHORT(f->format) != WAV_PCM_CODE) { - error("can't play not PCM-coded WAVE-files"); + error(_("can't play not PCM-coded WAVE-files")); exit(EXIT_FAILURE); } if (LE_SHORT(f->modus) < 1) { - error("can't play WAVE-files with %d tracks", LE_SHORT(f->modus)); + error(_("can't play WAVE-files with %d tracks"), LE_SHORT(f->modus)); exit(EXIT_FAILURE); } hwparams.channels = LE_SHORT(f->modus); @@ -723,13 +731,13 @@ static ssize_t test_wavefile(int fd, char *_buffer, size_t size) case 8: if (hwparams.format != DEFAULT_FORMAT && hwparams.format != SND_PCM_FORMAT_U8) - fprintf(stderr, "Warning: format is changed to U8\n"); + fprintf(stderr, _("Warning: format is changed to U8\n")); hwparams.format = SND_PCM_FORMAT_U8; break; case 16: if (hwparams.format != DEFAULT_FORMAT && hwparams.format != SND_PCM_FORMAT_S16_LE) - fprintf(stderr, "Warning: format is changed to S16_LE\n"); + fprintf(stderr, _("Warning: format is changed to S16_LE\n")); hwparams.format = SND_PCM_FORMAT_S16_LE; break; case 24: @@ -737,17 +745,18 @@ static ssize_t test_wavefile(int fd, char *_buffer, size_t size) case 3: if (hwparams.format != DEFAULT_FORMAT && hwparams.format != SND_PCM_FORMAT_S24_3LE) - fprintf(stderr, "Warning: format is changed to S24_3LE\n"); + fprintf(stderr, _("Warning: format is changed to S24_3LE\n")); hwparams.format = SND_PCM_FORMAT_S24_3LE; break; case 4: if (hwparams.format != DEFAULT_FORMAT && hwparams.format != SND_PCM_FORMAT_S24_LE) - fprintf(stderr, "Warning: format is changed to S24_LE\n"); + fprintf(stderr, _("Warning: format is changed to S24_LE\n")); hwparams.format = SND_PCM_FORMAT_S24_LE; break; default: - error(" can't play WAVE-files with sample %d bits in %d bytes wide (%d channels)", LE_SHORT(f->bit_p_spl), LE_SHORT(f->byte_p_spl), hwparams.channels); + error(_(" can't play WAVE-files with sample %d bits in %d bytes wide (%d channels)"), + LE_SHORT(f->bit_p_spl), LE_SHORT(f->byte_p_spl), hwparams.channels); exit(EXIT_FAILURE); } break; @@ -755,7 +764,8 @@ static ssize_t test_wavefile(int fd, char *_buffer, size_t size) hwparams.format = SND_PCM_FORMAT_S32_LE; break; default: - error(" can't play WAVE-files with sample %d bits wide", LE_SHORT(f->bit_p_spl)); + error(_(" can't play WAVE-files with sample %d bits wide"), + LE_SHORT(f->bit_p_spl)); exit(EXIT_FAILURE); } hwparams.rate = LE_INT(f->sample_fq); @@ -812,19 +822,19 @@ static int test_au(int fd, void *buffer) case AU_FMT_ULAW: if (hwparams.format != DEFAULT_FORMAT && hwparams.format != SND_PCM_FORMAT_MU_LAW) - fprintf(stderr, "Warning: format is changed to MU_LAW\n"); + fprintf(stderr, _("Warning: format is changed to MU_LAW\n")); hwparams.format = SND_PCM_FORMAT_MU_LAW; break; case AU_FMT_LIN8: if (hwparams.format != DEFAULT_FORMAT && hwparams.format != SND_PCM_FORMAT_U8) - fprintf(stderr, "Warning: format is changed to U8\n"); + fprintf(stderr, _("Warning: format is changed to U8\n")); hwparams.format = SND_PCM_FORMAT_U8; break; case AU_FMT_LIN16: if (hwparams.format != DEFAULT_FORMAT && hwparams.format != SND_PCM_FORMAT_S16_BE) - fprintf(stderr, "Warning: format is changed to S16_BE\n"); + fprintf(stderr, _("Warning: format is changed to S16_BE\n")); hwparams.format = SND_PCM_FORMAT_S16_BE; break; default: @@ -837,7 +847,7 @@ static int test_au(int fd, void *buffer) if (hwparams.channels < 1 || hwparams.channels > 128) return -1; if ((size_t)safe_read(fd, buffer + sizeof(AuHeader), BE_INT(ap->hdr_size) - sizeof(AuHeader)) != BE_INT(ap->hdr_size) - sizeof(AuHeader)) { - error("read error"); + error(_("read error")); exit(EXIT_FAILURE); } return 0; @@ -857,7 +867,7 @@ static void set_params(void) snd_pcm_sw_params_alloca(&swparams); err = snd_pcm_hw_params_any(handle, params); if (err < 0) { - error("Broken configuration for this PCM: no configurations available"); + error(_("Broken configuration for this PCM: no configurations available")); exit(EXIT_FAILURE); } if (mmap_flag) { @@ -874,17 +884,17 @@ static void set_params(void) err = snd_pcm_hw_params_set_access(handle, params, SND_PCM_ACCESS_RW_NONINTERLEAVED); if (err < 0) { - error("Access type not available"); + error(_("Access type not available")); exit(EXIT_FAILURE); } err = snd_pcm_hw_params_set_format(handle, params, hwparams.format); if (err < 0) { - error("Sample format non available"); + error(_("Sample format non available")); exit(EXIT_FAILURE); } err = snd_pcm_hw_params_set_channels(handle, params, hwparams.channels); if (err < 0) { - error("Channels count non available"); + error(_("Channels count non available")); exit(EXIT_FAILURE); } @@ -897,8 +907,8 @@ static void set_params(void) assert(err >= 0); if ((float)rate * 1.05 < hwparams.rate || (float)rate * 0.95 > hwparams.rate) { if (!quiet_mode) { - fprintf(stderr, "Warning: rate is not accurate (requested = %iHz, got = %iHz)\n", rate, hwparams.rate); - fprintf(stderr, " please, try the plug plugin (-Dplug:%s)\n", snd_pcm_name(handle)); + fprintf(stderr, _("Warning: rate is not accurate (requested = %iHz, got = %iHz)\n"), rate, hwparams.rate); + fprintf(stderr, _(" please, try the plug plugin (-Dplug:%s)\n"), snd_pcm_name(handle)); } } rate = hwparams.rate; @@ -932,20 +942,21 @@ static void set_params(void) assert(err >= 0); err = snd_pcm_hw_params(handle, params); if (err < 0) { - error("Unable to install hw params:"); + error(_("Unable to install hw params:")); snd_pcm_hw_params_dump(params, log); exit(EXIT_FAILURE); } snd_pcm_hw_params_get_period_size(params, &chunk_size, 0); snd_pcm_hw_params_get_buffer_size(params, &buffer_size); if (chunk_size == buffer_size) { - error("Can't use period equal to buffer size (%lu == %lu)", chunk_size, buffer_size); + error(_("Can't use period equal to buffer size (%lu == %lu)"), + chunk_size, buffer_size); exit(EXIT_FAILURE); } snd_pcm_sw_params_current(handle, swparams); err = snd_pcm_sw_params_get_xfer_align(swparams, &xfer_align); if (err < 0) { - error("Unable to obtain xfer align\n"); + error(_("Unable to obtain xfer align\n")); exit(EXIT_FAILURE); } if (sleep_min) @@ -982,7 +993,7 @@ static void set_params(void) assert(err >= 0); if (snd_pcm_sw_params(handle, swparams) < 0) { - error("unable to install sw params:"); + error(_("unable to install sw params:")); snd_pcm_sw_params_dump(swparams, log); exit(EXIT_FAILURE); } @@ -995,7 +1006,7 @@ static void set_params(void) chunk_bytes = chunk_size * bits_per_frame / 8; audiobuf = realloc(audiobuf, chunk_bytes); if (audiobuf == NULL) { - error("not enough memory"); + error(_("not enough memory")); exit(EXIT_FAILURE); } // fprintf(stderr, "real chunk_size = %i, frags = %i, total = %i\n", chunk_size, setup.buf.block.frags, setup.buf.block.frags * chunk_size); @@ -1021,7 +1032,7 @@ static void xrun(void) snd_pcm_status_alloca(&status); if ((res = snd_pcm_status(handle, status))<0) { - error("status error: %s", snd_strerror(res)); + error(_("status error: %s"), snd_strerror(res)); exit(EXIT_FAILURE); } if (snd_pcm_status_get_state(status) == SND_PCM_STATE_XRUN) { @@ -1029,37 +1040,37 @@ static void xrun(void) gettimeofday(&now, 0); snd_pcm_status_get_trigger_tstamp(status, &tstamp); timersub(&now, &tstamp, &diff); - fprintf(stderr, "%s!!! (at least %.3f ms long)\n", - stream == SND_PCM_STREAM_PLAYBACK ? "underrun" : "overrun", + fprintf(stderr, _("%s!!! (at least %.3f ms long)\n"), + stream == SND_PCM_STREAM_PLAYBACK ? _("underrun") : _("overrun"), diff.tv_sec * 1000 + diff.tv_usec / 1000.0); if (verbose) { - fprintf(stderr, "Status:\n"); + fprintf(stderr, _("Status:\n")); snd_pcm_status_dump(status, log); } if ((res = snd_pcm_prepare(handle))<0) { - error("xrun: prepare error: %s", snd_strerror(res)); + error(_("xrun: prepare error: %s"), snd_strerror(res)); exit(EXIT_FAILURE); } return; /* ok, data should be accepted again */ } if (snd_pcm_status_get_state(status) == SND_PCM_STATE_DRAINING) { if (verbose) { - fprintf(stderr, "Status(DRAINING):\n"); + fprintf(stderr, _("Status(DRAINING):\n")); snd_pcm_status_dump(status, log); } if (stream == SND_PCM_STREAM_CAPTURE) { - fprintf(stderr, "capture stream format change? attempting recover...\n"); + fprintf(stderr, _("capture stream format change? attempting recover...\n")); if ((res = snd_pcm_prepare(handle))<0) { - error("xrun(DRAINING): prepare error: %s", snd_strerror(res)); + error(_("xrun(DRAINING): prepare error: %s"), snd_strerror(res)); exit(EXIT_FAILURE); } return; } } if (verbose) { - fprintf(stderr, "Status(R/W):\n"); + fprintf(stderr, _("Status(R/W):\n")); snd_pcm_status_dump(status, log); } - error("read/write error, state = %s", snd_pcm_state_name(snd_pcm_status_get_state(status))); + error(_("read/write error, state = %s"), snd_pcm_state_name(snd_pcm_status_get_state(status))); exit(EXIT_FAILURE); } @@ -1069,19 +1080,19 @@ static void suspend(void) int res; if (!quiet_mode) - fprintf(stderr, "Suspended. Trying resume. "); fflush(stderr); + fprintf(stderr, _("Suspended. Trying resume. ")); fflush(stderr); while ((res = snd_pcm_resume(handle)) == -EAGAIN) sleep(1); /* wait until suspend flag is released */ if (res < 0) { if (!quiet_mode) - fprintf(stderr, "Failed. Restarting stream. "); fflush(stderr); + fprintf(stderr, _("Failed. Restarting stream. ")); fflush(stderr); if ((res = snd_pcm_prepare(handle)) < 0) { - error("suspend: prepare error: %s", snd_strerror(res)); + error(_("suspend: prepare error: %s"), snd_strerror(res)); exit(EXIT_FAILURE); } } if (!quiet_mode) - fprintf(stderr, "Done.\n"); + fprintf(stderr, _("Done.\n")); } /* peak handler */ @@ -1132,7 +1143,7 @@ static void compute_max_peak(u_char *data, size_t count) max = 1 << (bits_per_sample-1); if (max <= 0) max = 0x7fffffff; - printf("Max peak (%li samples): %05i (0x%04x) ", (long)ocount, max_peak, max_peak); + printf(_("Max peak (%li samples): %05i (0x%04x) "), (long)ocount, max_peak, max_peak); if (bits_per_sample > 16) perc = max_peak / (max / 100); else @@ -1168,7 +1179,7 @@ static ssize_t pcm_write(u_char *data, size_t count) } else if (r == -ESTRPIPE) { suspend(); } else if (r < 0) { - error("write error: %s", snd_strerror(r)); + error(_("write error: %s"), snd_strerror(r)); exit(EXIT_FAILURE); } if (r > 0) { @@ -1210,7 +1221,7 @@ static ssize_t pcm_writev(u_char **data, unsigned int channels, size_t count) } else if (r == -ESTRPIPE) { suspend(); } else if (r < 0) { - error("writev error: %s", snd_strerror(r)); + error(_("writev error: %s"), snd_strerror(r)); exit(EXIT_FAILURE); } if (r > 0) { @@ -1249,7 +1260,7 @@ static ssize_t pcm_read(u_char *data, size_t rcount) } else if (r == -ESTRPIPE) { suspend(); } else if (r < 0) { - error("read error: %s", snd_strerror(r)); + error(_("read error: %s"), snd_strerror(r)); exit(EXIT_FAILURE); } if (r > 0) { @@ -1288,7 +1299,7 @@ static ssize_t pcm_readv(u_char **data, unsigned int channels, size_t rcount) } else if (r == -ESTRPIPE) { suspend(); } else if (r < 0) { - error("readv error: %s", snd_strerror(r)); + error(_("readv error: %s"), snd_strerror(r)); exit(EXIT_FAILURE); } if (r > 0) { @@ -1336,7 +1347,7 @@ static void voc_write_silence(unsigned x) buf = (char *) malloc(chunk_bytes); if (buf == NULL) { - error("can't allocate buffer for silence"); + error(_("can't allocate buffer for silence")); return; /* not fatal error */ } snd_pcm_format_set_silence(hwparams.format, buf, chunk_size * hwparams.channels); @@ -1345,7 +1356,7 @@ static void voc_write_silence(unsigned x) if (l > chunk_size) l = chunk_size; if (voc_pcm_write(buf, l) != (ssize_t)l) { - error("write error"); + error(_("write error")); exit(EXIT_FAILURE); } x -= l; @@ -1359,13 +1370,13 @@ static void voc_pcm_flush(void) size_t b; if (sleep_min == 0) { if (snd_pcm_format_set_silence(hwparams.format, audiobuf + buffer_pos, chunk_bytes - buffer_pos * 8 / bits_per_sample) < 0) - fprintf(stderr, "voc_pcm_flush - silence error"); + fprintf(stderr, _("voc_pcm_flush - silence error")); b = chunk_size; } else { b = buffer_pos * 8 / bits_per_frame; } if (pcm_write(audiobuf, b) != (ssize_t)b) - error("voc_pcm_flush error"); + error(_("voc_pcm_flush error")); } snd_pcm_drain(handle); } @@ -1389,23 +1400,23 @@ static void voc_play(int fd, int ofs, char *name) data = buf = (u_char *)malloc(64 * 1024); buffer_pos = 0; if (data == NULL) { - error("malloc error"); + error(_("malloc error")); exit(EXIT_FAILURE); } if (!quiet_mode) { - fprintf(stderr, "Playing Creative Labs Channel file '%s'...\n", name); + fprintf(stderr, _("Playing Creative Labs Channel file '%s'...\n"), name); } /* first we waste the rest of header, ugly but we don't need seek */ while (ofs > (ssize_t)chunk_bytes) { if ((size_t)safe_read(fd, buf, chunk_bytes) != chunk_bytes) { - error("read error"); + error(_("read error")); exit(EXIT_FAILURE); } ofs -= chunk_bytes; } if (ofs) { if (safe_read(fd, buf, ofs) != ofs) { - error("read error"); + error(_("read error")); exit(EXIT_FAILURE); } } @@ -1461,7 +1472,7 @@ static void voc_play(int fd, int ofs, char *name) d_printf("Channel data %d Hz\n", dsp_speed); #endif if (vd->pack) { /* /dev/dsp can't it */ - error("can't play packed .voc files"); + error(_("can't play packed .voc files")); return; } if (hwparams.channels == 2) /* if we are in Stereo-Mode, switch back */ @@ -1513,7 +1524,7 @@ static void voc_play(int fd, int ofs, char *name) #endif if (filepos >= 0) { /* if < 0, one seek fails, why test another */ if ((filepos = lseek64(fd, 0, 1)) < 0) { - error("can't play loops; %s isn't seekable\n", name); + error(_("can't play loops; %s isn't seekable\n"), name); repeat = 0; } else { filepos -= in_buffer; /* set filepos after repeat */ @@ -1553,7 +1564,7 @@ static void voc_play(int fd, int ofs, char *name) if (hwparams.channels == 2) hwparams.rate = hwparams.rate >> 1; if (eb->pack) { /* /dev/dsp can't it */ - error("can't play packed .voc files"); + error(_("can't play packed .voc files")); return; } #if 0 @@ -1562,7 +1573,7 @@ static void voc_play(int fd, int ofs, char *name) #endif break; default: - error("unknown blocktype %d. terminate.", bp->type); + error(_("unknown blocktype %d. terminate."), bp->type); return; } /* switch (bp->type) */ } /* while (! nextblock) */ @@ -1573,12 +1584,12 @@ static void voc_play(int fd, int ofs, char *name) if (l) { if (output && !quiet_mode) { if (write(2, data, l) != l) { /* to stderr */ - error("write error"); + error(_("write error")); exit(EXIT_FAILURE); } } else { if (voc_pcm_write(data, l) != l) { - error("write error"); + error(_("write error")); exit(EXIT_FAILURE); } } @@ -1625,7 +1636,7 @@ static void begin_voc(int fd, size_t cnt) vh.coded_ver = LE_SHORT(0x1233 - VOC_ACTUAL_VERSION); if (write(fd, &vh, sizeof(VocHeader)) != sizeof(VocHeader)) { - error("write error"); + error(_("write error")); exit(EXIT_FAILURE); } if (hwparams.channels > 1) { @@ -1634,14 +1645,14 @@ static void begin_voc(int fd, size_t cnt) bt.datalen = 4; bt.datalen_m = bt.datalen_h = 0; if (write(fd, &bt, sizeof(VocBlockType)) != sizeof(VocBlockType)) { - error("write error"); + error(_("write error")); exit(EXIT_FAILURE); } eb.tc = LE_SHORT(65536 - 256000000L / (hwparams.rate << 1)); eb.pack = 0; eb.mode = 1; if (write(fd, &eb, sizeof(VocExtBlock)) != sizeof(VocExtBlock)) { - error("write error"); + error(_("write error")); exit(EXIT_FAILURE); } } @@ -1651,13 +1662,13 @@ static void begin_voc(int fd, size_t cnt) bt.datalen_m = (u_char) ((cnt & 0xFF00) >> 8); bt.datalen_h = (u_char) ((cnt & 0xFF0000) >> 16); if (write(fd, &bt, sizeof(VocBlockType)) != sizeof(VocBlockType)) { - error("write error"); + error(_("write error")); exit(EXIT_FAILURE); } vd.tc = (u_char) (256 - (1000000 / hwparams.rate)); vd.pack = 0; if (write(fd, &vd, sizeof(VocVoiceData)) != sizeof(VocVoiceData)) { - error("write error"); + error(_("write error")); exit(EXIT_FAILURE); } } @@ -1692,7 +1703,7 @@ static void begin_wave(int fd, size_t cnt) bits = 24; break; default: - error("Wave doesn't support %s format...", snd_pcm_format_name(hwparams.format)); + error(_("Wave doesn't support %s format..."), snd_pcm_format_name(hwparams.format)); exit(EXIT_FAILURE); } h.magic = WAV_RIFF; @@ -1725,7 +1736,7 @@ static void begin_wave(int fd, size_t cnt) write(fd, &cf, sizeof(WaveChunkHeader)) != sizeof(WaveChunkHeader) || write(fd, &f, sizeof(WaveFmtBody)) != sizeof(WaveFmtBody) || write(fd, &cd, sizeof(WaveChunkHeader)) != sizeof(WaveChunkHeader)) { - error("write error"); + error(_("write error")); exit(EXIT_FAILURE); } } @@ -1749,13 +1760,13 @@ static void begin_au(int fd, size_t cnt) ah.encoding = BE_INT(AU_FMT_LIN16); break; default: - error("Sparc Audio doesn't support %s format...", snd_pcm_format_name(hwparams.format)); + error(_("Sparc Audio doesn't support %s format..."), snd_pcm_format_name(hwparams.format)); exit(EXIT_FAILURE); } ah.sample_rate = BE_INT(hwparams.rate); ah.channels = BE_INT(hwparams.channels); if (write(fd, &ah, sizeof(AuHeader)) != sizeof(AuHeader)) { - error("write error"); + error(_("write error")); exit(EXIT_FAILURE); } } @@ -1769,7 +1780,7 @@ static void end_voc(int fd) char dummy = 0; /* Write a Terminator */ if (write(fd, &dummy, 1) != 1) { - error("write error"); + error(_("write error")); exit(EXIT_FAILURE); } length_seek = sizeof(VocHeader); @@ -1834,17 +1845,17 @@ static void header(int rtype, char *name) { if (!quiet_mode) { fprintf(stderr, "%s %s '%s' : ", - (stream == SND_PCM_STREAM_PLAYBACK) ? "Playing" : "Recording", - fmt_rec_table[rtype].what, + (stream == SND_PCM_STREAM_PLAYBACK) ? _("Playing") : _("Recording"), + gettext(fmt_rec_table[rtype].what), name); fprintf(stderr, "%s, ", snd_pcm_format_description(hwparams.format)); - fprintf(stderr, "Rate %d Hz, ", hwparams.rate); + fprintf(stderr, _("Rate %d Hz, "), hwparams.rate); if (hwparams.channels == 1) - fprintf(stderr, "Mono"); + fprintf(stderr, _("Mono")); else if (hwparams.channels == 2) - fprintf(stderr, "Stereo"); + fprintf(stderr, _("Stereo")); else - fprintf(stderr, "Channels %i", hwparams.channels); + fprintf(stderr, _("Channels %i"), hwparams.channels); fprintf(stderr, "\n"); } } @@ -1952,7 +1963,7 @@ static void playback(char *name) /* read the file header */ dta = sizeof(AuHeader); if ((size_t)safe_read(fd, audiobuf, dta) != dta) { - error("read error"); + error(_("read error")); exit(EXIT_FAILURE); } if (test_au(fd, audiobuf) >= 0) { @@ -1964,7 +1975,7 @@ static void playback(char *name) dta = sizeof(VocHeader); if ((size_t)safe_read(fd, audiobuf + sizeof(AuHeader), dta - sizeof(AuHeader)) != dta - sizeof(AuHeader)) { - error("read error"); + error(_("read error")); exit(EXIT_FAILURE); } if ((ofs = test_vocfile(audiobuf)) >= 0) { @@ -2126,7 +2137,7 @@ static void playbackv(char **names, unsigned int count) } alloced = 1; } else if (count != channels) { - error("You need to specify %d files", channels); + error(_("You need to specify %d files"), channels); exit(EXIT_FAILURE); } @@ -2179,7 +2190,7 @@ static void capturev(char **names, unsigned int count) } alloced = 1; } else if (count != channels) { - error("You need to specify %d files", channels); + error(_("You need to specify %d files"), channels); exit(EXIT_FAILURE); } diff --git a/configure.in b/configure.in index 54ed921..a724b9d 100644 --- a/configure.in +++ b/configure.in @@ -84,7 +84,7 @@ AC_PROG_GCC_TRADITIONAL SAVE_UTIL_VERSION AC_OUTPUT(Makefile alsactl/Makefile alsamixer/Makefile amidi/Makefile amixer/Makefile \ - m4/Makefile \ + m4/Makefile po/Makefile.in \ alsaconf/alsaconf alsaconf/Makefile \ alsaconf/po/Makefile \ aplay/Makefile include/Makefile iecset/Makefile utils/Makefile \ diff --git a/include/gettext.h b/include/gettext.h new file mode 100644 index 0000000..c2bfe96 --- /dev/null +++ b/include/gettext.h @@ -0,0 +1,16 @@ +#ifndef __MY_GETTEXT_H +#define __MY_GETTEXT_H + +#if ENABLE_NLS +# include +#else +# define gettext(msgid) (msgid) +# define textdomain(domain) +# define bindtextdomain(domain, dir) +#endif + +#define _(msgid) gettext (msgid) +#define gettext_noop(msgid) msgid +#define N_(msgid) gettext_noop (msgid) + +#endif /* __MY_GETTEXT_H */ diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 0000000..bef7f4a --- /dev/null +++ b/po/LINGUAS @@ -0,0 +1 @@ +ja diff --git a/po/Makefile.in.in b/po/Makefile.in.in new file mode 100644 index 0000000..53efc5e --- /dev/null +++ b/po/Makefile.in.in @@ -0,0 +1,366 @@ +# Makefile for PO directory in any package using GNU gettext. +# Copyright (C) 1995-1997, 2000-2004 by Ulrich Drepper +# +# This file can be copied and used freely without restrictions. It can +# be used in projects which are not available under the GNU General Public +# License but which still want to provide support for the GNU gettext +# functionality. +# Please note that the actual code of GNU gettext is covered by the GNU +# General Public License and is *not* in the public domain. +# +# Origin: gettext-0.14 + +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +SHELL = /bin/sh +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +datadir = @datadir@ +localedir = $(datadir)/locale +gettextsrcdir = $(datadir)/gettext/po + +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) + +GMSGFMT = @GMSGFMT@ +MSGFMT = @MSGFMT@ +XGETTEXT = @XGETTEXT@ +MSGMERGE = msgmerge +MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGINIT = msginit +MSGCONV = msgconv +MSGFILTER = msgfilter + +POFILES = @POFILES@ +GMOFILES = @GMOFILES@ +UPDATEPOFILES = @UPDATEPOFILES@ +DUMMYPOFILES = @DUMMYPOFILES@ +DISTFILES.common = Makefile.in.in remove-potcdate.sin \ +$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) +DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \ +$(POFILES) $(GMOFILES) \ +$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) + +POTFILES = \ + +CATALOGS = @CATALOGS@ + +# Makevars gets inserted here. (Don't remove this line!) + +.SUFFIXES: +.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update + +.po.mo: + @echo "$(MSGFMT) -c -o $@ $<"; \ + $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ + +.po.gmo: + @lang=`echo $* | sed -e 's,.*/,,'`; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ + cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + +.sin.sed: + sed -e '/^#/d' $< > t-$@ + mv t-$@ $@ + + +all: all-@USE_NLS@ + +all-yes: stamp-po +all-no: + +# stamp-po is a timestamp denoting the last time at which the CATALOGS have +# been loosely updated. Its purpose is that when a developer or translator +# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, +# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent +# invocations of "make" will do nothing. This timestamp would not be necessary +# if updating the $(CATALOGS) would always touch them; however, the rule for +# $(POFILES) has been designed to not touch files that don't need to be +# changed. +stamp-po: $(srcdir)/$(DOMAIN).pot + test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) + @echo "touch stamp-po" + @echo timestamp > stamp-poT + @mv stamp-poT stamp-po + +# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', +# otherwise packages like GCC can not be built if only parts of the source +# have been downloaded. + +# This target rebuilds $(DOMAIN).pot; it is an expensive operation. +# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. +$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed + $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ + --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ + --files-from=$(srcdir)/POTFILES.in \ + --copyright-holder='$(COPYRIGHT_HOLDER)' \ + --msgid-bugs-address='$(MSGID_BUGS_ADDRESS)' + test ! -f $(DOMAIN).po || { \ + if test -f $(srcdir)/$(DOMAIN).pot; then \ + sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ + sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ + if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ + rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ + else \ + rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ + fi; \ + else \ + mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ + fi; \ + } + +# This rule has no dependencies: we don't need to update $(DOMAIN).pot at +# every "make" invocation, only create it when it is missing. +# Only "make $(DOMAIN).pot-update" or "make dist" will force an update. +$(srcdir)/$(DOMAIN).pot: + $(MAKE) $(DOMAIN).pot-update + +# This target rebuilds a PO file if $(DOMAIN).pot has changed. +# Note that a PO file is not touched if it doesn't need to be changed. +$(POFILES): $(srcdir)/$(DOMAIN).pot + @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ + if test -f "$(srcdir)/$${lang}.po"; then \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + else \ + $(MAKE) $${lang}.po-create; \ + fi + + +install: install-exec install-data +install-exec: +install-data: install-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + for file in $(DISTFILES.common) Makevars.template; do \ + $(INSTALL_DATA) $(srcdir)/$$file \ + $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + for file in Makevars; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi +install-data-no: all +install-data-yes: all + $(mkinstalldirs) $(DESTDIR)$(datadir) + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkinstalldirs) $(DESTDIR)$$dir; \ + if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ + $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ + echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ + for file in *; do \ + if test -f $$file; then \ + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ + fi; \ + done); \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + else \ + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ + :; \ + else \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + fi; \ + fi; \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ + ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ + cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ + fi; \ + done; \ + done + +install-strip: install + +installdirs: installdirs-exec installdirs-data +installdirs-exec: +installdirs-data: installdirs-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ + else \ + : ; \ + fi +installdirs-data-no: +installdirs-data-yes: + $(mkinstalldirs) $(DESTDIR)$(datadir) + @catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + dir=$(localedir)/$$lang/LC_MESSAGES; \ + $(mkinstalldirs) $(DESTDIR)$$dir; \ + for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ + if test -n "$$lc"; then \ + if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ + link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ + mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ + for file in *; do \ + if test -f $$file; then \ + ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ + fi; \ + done); \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ + else \ + if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ + :; \ + else \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ + mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ + fi; \ + fi; \ + fi; \ + done; \ + done + +# Define this as empty until I found a useful application. +installcheck: + +uninstall: uninstall-exec uninstall-data +uninstall-exec: +uninstall-data: uninstall-data-@USE_NLS@ + if test "$(PACKAGE)" = "gettext-tools"; then \ + for file in $(DISTFILES.common) Makevars.template; do \ + rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ + done; \ + else \ + : ; \ + fi +uninstall-data-no: +uninstall-data-yes: + catalogs='$(CATALOGS)'; \ + for cat in $$catalogs; do \ + cat=`basename $$cat`; \ + lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ + for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ + rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ + done; \ + done + +check: all + +info dvi ps pdf html tags TAGS ctags CTAGS ID: + +mostlyclean: + rm -f remove-potcdate.sed + rm -f stamp-poT + rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po + rm -fr *.o + +clean: mostlyclean + +distclean: clean + rm -f Makefile Makefile.in POTFILES *.mo + +maintainer-clean: distclean + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f stamp-po $(GMOFILES) + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) +dist distdir: + $(MAKE) update-po + @$(MAKE) dist2 +# This is a separate target because 'update-po' must be executed before. +dist2: $(DISTFILES) + dists="$(DISTFILES)"; \ + if test "$(PACKAGE)" = "gettext-tools"; then \ + dists="$$dists Makevars.template"; \ + fi; \ + if test -f $(srcdir)/ChangeLog; then \ + dists="$$dists ChangeLog"; \ + fi; \ + for i in 0 1 2 3 4 5 6 7 8 9; do \ + if test -f $(srcdir)/ChangeLog.$$i; then \ + dists="$$dists ChangeLog.$$i"; \ + fi; \ + done; \ + if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ + for file in $$dists; do \ + if test -f $$file; then \ + cp -p $$file $(distdir); \ + else \ + cp -p $(srcdir)/$$file $(distdir); \ + fi; \ + done + +update-po: Makefile + $(MAKE) $(DOMAIN).pot-update + test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) + $(MAKE) update-gmo + +# General rule for creating PO files. + +.nop.po-create: + @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ + echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ + exit 1 + +# General rule for updating PO files. + +.nop.po-update: + @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ + if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ + tmpdir=`pwd`; \ + echo "$$lang:"; \ + test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ + echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + cd $(srcdir); \ + if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "msgmerge for $$lang.po failed!" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi + +$(DUMMYPOFILES): + +update-gmo: Makefile $(GMOFILES) + @: + +Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@ + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ + $(SHELL) ./config.status + +force: + +# Tell versions [3.59,3.63) of GNU make not to export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/po/Makevars b/po/Makevars new file mode 100644 index 0000000..32692ab --- /dev/null +++ b/po/Makevars @@ -0,0 +1,41 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = Free Software Foundation, Inc. + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_LOCALE_CATEGORIES = diff --git a/po/Makevars.template b/po/Makevars.template new file mode 100644 index 0000000..32692ab --- /dev/null +++ b/po/Makevars.template @@ -0,0 +1,41 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = Free Software Foundation, Inc. + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_LOCALE_CATEGORIES = diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..11a6a96 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,4 @@ +aplay/aplay.c +seq/aconnect/aconnect.c +seq/aseqnet/aseqnet.c +speaker-test/speaker-test.c diff --git a/po/Rules-quot b/po/Rules-quot new file mode 100644 index 0000000..9c2a995 --- /dev/null +++ b/po/Rules-quot @@ -0,0 +1,47 @@ +# Special Makefile rules for English message catalogs with quotation marks. + +DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot + +.SUFFIXES: .insert-header .po-update-en + +en@quot.po-create: + $(MAKE) en@quot.po-update +en@boldquot.po-create: + $(MAKE) en@boldquot.po-update + +en@quot.po-update: en@quot.po-update-en +en@boldquot.po-update: en@boldquot.po-update-en + +.insert-header.po-update-en: + @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ + if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ + tmpdir=`pwd`; \ + echo "$$lang:"; \ + ll=`echo $$lang | sed -e 's/@.*//'`; \ + LC_ALL=C; export LC_ALL; \ + cd $(srcdir); \ + if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "creation of $$lang.po failed!" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi + +en@quot.insert-header: insert-header.sin + sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header + +en@boldquot.insert-header: insert-header.sin + sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header + +mostlyclean: mostlyclean-quot +mostlyclean-quot: + rm -f *.insert-header diff --git a/po/boldquot.sed b/po/boldquot.sed new file mode 100644 index 0000000..4b937aa --- /dev/null +++ b/po/boldquot.sed @@ -0,0 +1,10 @@ +s/"\([^"]*\)"/“\1”/g +s/`\([^`']*\)'/‘\1’/g +s/ '\([^`']*\)' / ‘\1’ /g +s/ '\([^`']*\)'$/ ‘\1’/g +s/^'\([^`']*\)' /‘\1’ /g +s/“”/""/g +s/“/“/g +s/”/”/g +s/‘/‘/g +s/’/’/g diff --git a/po/en@boldquot.header b/po/en@boldquot.header new file mode 100644 index 0000000..fedb6a0 --- /dev/null +++ b/po/en@boldquot.header @@ -0,0 +1,25 @@ +# All this catalog "translates" are quotation characters. +# The msgids must be ASCII and therefore cannot contain real quotation +# characters, only substitutes like grave accent (0x60), apostrophe (0x27) +# and double quote (0x22). These substitutes look strange; see +# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# +# This catalog translates grave accent (0x60) and apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019). +# It also translates pairs of apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019) +# and pairs of quotation mark (0x22) to +# left double quotation mark (U+201C) and right double quotation mark (U+201D). +# +# When output to an UTF-8 terminal, the quotation characters appear perfectly. +# When output to an ISO-8859-1 terminal, the single quotation marks are +# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to +# grave/acute accent (by libiconv), and the double quotation marks are +# transliterated to 0x22. +# When output to an ASCII terminal, the single quotation marks are +# transliterated to apostrophes, and the double quotation marks are +# transliterated to 0x22. +# +# This catalog furthermore displays the text between the quotation marks in +# bold face, assuming the VT100/XTerm escape sequences. +# diff --git a/po/en@quot.header b/po/en@quot.header new file mode 100644 index 0000000..a9647fc --- /dev/null +++ b/po/en@quot.header @@ -0,0 +1,22 @@ +# All this catalog "translates" are quotation characters. +# The msgids must be ASCII and therefore cannot contain real quotation +# characters, only substitutes like grave accent (0x60), apostrophe (0x27) +# and double quote (0x22). These substitutes look strange; see +# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# +# This catalog translates grave accent (0x60) and apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019). +# It also translates pairs of apostrophe (0x27) to +# left single quotation mark (U+2018) and right single quotation mark (U+2019) +# and pairs of quotation mark (0x22) to +# left double quotation mark (U+201C) and right double quotation mark (U+201D). +# +# When output to an UTF-8 terminal, the quotation characters appear perfectly. +# When output to an ISO-8859-1 terminal, the single quotation marks are +# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to +# grave/acute accent (by libiconv), and the double quotation marks are +# transliterated to 0x22. +# When output to an ASCII terminal, the single quotation marks are +# transliterated to apostrophes, and the double quotation marks are +# transliterated to 0x22. +# diff --git a/po/insert-header.sin b/po/insert-header.sin new file mode 100644 index 0000000..b26de01 --- /dev/null +++ b/po/insert-header.sin @@ -0,0 +1,23 @@ +# Sed script that inserts the file called HEADER before the header entry. +# +# At each occurrence of a line starting with "msgid ", we execute the following +# commands. At the first occurrence, insert the file. At the following +# occurrences, do nothing. The distinction between the first and the following +# occurrences is achieved by looking at the hold space. +/^msgid /{ +x +# Test if the hold space is empty. +s/m/m/ +ta +# Yes it was empty. First occurrence. Read the file. +r HEADER +# Output the file's contents by reading the next line. But don't lose the +# current line while doing this. +g +N +bb +:a +# The hold space was nonempty. Following occurrences. Do nothing. +x +:b +} diff --git a/po/ja.po b/po/ja.po new file mode 100644 index 0000000..8425bce --- /dev/null +++ b/po/ja.po @@ -0,0 +1,1090 @@ +# Japanese translations for alsa-utils package +# alsa-utils パッケージに対する英訳. +# Copyright (C) 2005 Free Software Foundation, Inc. +# This file is distributed under the same license as the alsa-utils package. +# Takashi Iwai , 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: alsa-utils 1.0.9a\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2005-06-03 15:10+0200\n" +"PO-Revision-Date: 2005-06-16 16:50+0200\n" +"Last-Translator: Takashi Iwai \n" +"Language-Team: Japanese\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: aplay/aplay.c:126 +msgid "raw data" +msgstr "raw データ" + +#: aplay/aplay.c:127 +msgid "VOC" +msgstr "VOC" + +#: aplay/aplay.c:128 +msgid "WAVE" +msgstr "WAVE" + +#: aplay/aplay.c:129 +msgid "Sparc Audio" +msgstr "Sparc オーディオ" + +#: aplay/aplay.c:150 +#, c-format +msgid "" +"Usage: %s [OPTION]... [FILE]...\n" +"\n" +"-h, --help help\n" +" --version print current version\n" +"-l, --list-devices list all soundcards and digital audio devices\n" +"-L, --list-pcms list all PCMs defined\n" +"-D, --device=NAME select PCM by name\n" +"-q, --quiet quiet mode\n" +"-t, --file-type TYPE file type (voc, wav, raw or au)\n" +"-c, --channels=# channels\n" +"-f, --format=FORMAT sample format (case insensitive)\n" +"-r, --rate=# sample rate\n" +"-d, --duration=# interrupt after # seconds\n" +"-s, --sleep-min=# min ticks to sleep\n" +"-M, --mmap mmap stream\n" +"-N, --nonblock nonblocking mode\n" +"-F, --period-time=# distance between interrupts is # microseconds\n" +"-B, --buffer-time=# buffer duration is # microseconds\n" +" --period-size=# distance between interrupts is # frames\n" +" --buffer-size=# buffer duration is # frames\n" +"-A, --avail-min=# min available space for wakeup is # microseconds\n" +"-R, --start-delay=# delay for automatic PCM start is # microseconds \n" +" (relative to buffer size if <= 0)\n" +"-T, --stop-delay=# delay for automatic PCM stop is # microseconds from " +"xrun\n" +"-v, --verbose show PCM structure and setup (accumulative)\n" +"-I, --separate-channels one file for each channel\n" +msgstr "" +"使用法: %s [オプション]... [ファイル]...\n" +"\n" +"-h, --help ヘルプ\n" +" --version 現在のバージョンを表示\n" +"-l, --list-devices 全てのサウンドカードとオーディオデバイスを表示\n" +"-L, --list-pcms 全ての定義された PCM を表示\n" +"-D, --device=NAME 使用する PCM を指定\n" +"-q, --quiet quiet モード\n" +"-t, --file-type TYPE ファイルタイプ (voc, wav, raw または au)\n" +"-c, --channels=# チャネル数\n" +"-f, --format=FORMAT サンプルフォーマット (大/小文字区別)\n" +"-r, --rate=# サンプルレート\n" +"-d, --duration=# 指定の秒数後に終了\n" +"-s, --sleep-min=# sleep する最少 tick 数\n" +"-M, --mmap mmap ストリーム\n" +"-N, --nonblock 非ブロックモード\n" +"-F, --period-time=# 割り込み間隔をμ秒で指定\n" +"-B, --buffer-time=# バッファの大きさをμ秒で指定\n" +" --period-size=# 割り込み間隔をフレーム数で指定\n" +" --buffer-size=# バッファの大きさをフレーム数で指定\n" +"-A, --avail-min=# wakeup の最少スペースをμ秒で指定\n" +"-R, --start-delay=# 指定のμ秒後に PCM を自動スタート\n" +" (0 以下の場合はバッファサイズより)\n" +"-T, --stop-delay=# XRUN から指定のμ秒後に PCM の自動停止\n" +"-v, --verbose PCM の設定を表示 (複数指定可能)\n" +"-I, --separate-channels 各チャネルに一つのファイルを用いる\n" + +#: aplay/aplay.c:177 speaker-test/speaker-test.c:465 +#, c-format +msgid "Recognized sample formats are:" +msgstr "認識されるサンプルフォーマット:" + +#: aplay/aplay.c:183 +#, c-format +msgid "" +"\n" +"Some of these may not be available on selected hardware\n" +msgstr "\nこれらのいくつかは指定のハードウェアで使用不可能な場合があります" + +#: aplay/aplay.c:184 +#, c-format +msgid "The availabled format shortcuts are:\n" +msgstr "可能なフォーマットの省略形:" + +#: aplay/aplay.c:185 +#, c-format +msgid "-f cd (16 bit little endian, 44100, stereo)\n" +msgstr "-f cd (16 ビット、リトルエンディアン、44100、ステレオ)" + +#: aplay/aplay.c:186 +#, c-format +msgid "-f cdr (16 bit big endian, 44100, stereo)\n" +msgstr "-f cdr (16 ビット、ビッグエンディアン、44100、ステレオ)" + +#: aplay/aplay.c:187 +#, c-format +msgid "-f dat (16 bit little endian, 48000, stereo)\n" +msgstr "-f dat (16 ビット、リトルエンディアン、48000、ステレオ)" + +#: aplay/aplay.c:197 +#, c-format +msgid "snd_names_list error: %s" +msgstr "snd_names_list エラー: %s" + +#: aplay/aplay.c:219 +msgid "no soundcards found..." +msgstr "サウンドカードが見つかりません..." + +#: aplay/aplay.c:222 +#, c-format +msgid "**** List of %s Hardware Devices ****\n" +msgstr "**** ハードウェアデバイス %s のリスト ****\n" + +#: aplay/aplay.c:251 +#, c-format +msgid "card %i: %s [%s], device %i: %s [%s]\n" +msgstr "カード %i: %s [%s], デバイス %i: %s [%s]\n" + +#: aplay/aplay.c:257 +#, c-format +msgid " Subdevices: %i/%i\n" +msgstr " サブデバイス: %i/%i\n" + +#: aplay/aplay.c:264 +#, c-format +msgid " Subdevice #%i: %s\n" +msgstr " サブデバイス #%i: %s\n" + +#: aplay/aplay.c:292 +#, c-format +msgid "PCM list:\n" +msgstr "PCM リスト:\n" + +#: aplay/aplay.c:305 +#, c-format +msgid "Aborted by signal %s...\n" +msgstr "シグナル %s で中断...\n" + +#: aplay/aplay.c:384 +msgid "command should be named either arecord or aplay" +msgstr "arecord または aplay コマンドのみ可能" + +#: aplay/aplay.c:426 +#, c-format +msgid "unrecognized file format %s" +msgstr "不正なファイルフォーマット %s" + +#: aplay/aplay.c:433 +#, c-format +msgid "value %i for channels is invalid" +msgstr "不正なチャネル数 %i" + +#: aplay/aplay.c:452 +#, c-format +msgid "wrong extended format '%s'" +msgstr "不正な拡張フォーマット '%s'" + +#: aplay/aplay.c:463 +#, c-format +msgid "bad speed value %i" +msgstr "不正なレート値 %i" + +#: aplay/aplay.c:519 +#, c-format +msgid "Try `%s --help' for more information.\n" +msgstr "より詳しい情報は「%s --help」を実行してください\n" + +#: aplay/aplay.c:540 +#, c-format +msgid "audio open error: %s" +msgstr "" + +#: aplay/aplay.c:545 +#, c-format +msgid "info error: %s" +msgstr "" + +#: aplay/aplay.c:552 +#, c-format +msgid "nonblock setting error: %s" +msgstr "" + +#: aplay/aplay.c:562 aplay/aplay.c:666 aplay/aplay.c:1009 +msgid "not enough memory" +msgstr "メモリが足りません" + +#: aplay/aplay.c:656 +#, c-format +msgid "read error (called from line %i)" +msgstr "リードエラー (%i 行)" + +#: aplay/aplay.c:714 +#, c-format +msgid "unknown length of 'fmt ' chunk (read %u, should be %u at least)" +msgstr "" + +#: aplay/aplay.c:722 +msgid "can't play not PCM-coded WAVE-files" +msgstr "PCM 以外の WAVE ファイルは再生できません" + +#: aplay/aplay.c:726 +#, c-format +msgid "can't play WAVE-files with %d tracks" +msgstr "%d トラックを含む WAVE ファイルは再生できません" + +#: aplay/aplay.c:734 aplay/aplay.c:831 +#, c-format +msgid "Warning: format is changed to U8\n" +msgstr "警告: フォーマットは U8 に変更されます\n" + +#: aplay/aplay.c:740 +#, c-format +msgid "Warning: format is changed to S16_LE\n" +msgstr "警告: フォーマットは S16_LE に変更されます\n" + +#: aplay/aplay.c:748 +#, c-format +msgid "Warning: format is changed to S24_3LE\n" +msgstr "警告: フォーマットは S24_3LE に変更されます\n" + +#: aplay/aplay.c:754 +#, c-format +msgid "Warning: format is changed to S24_LE\n" +msgstr "警告: フォーマットは S24_LE に変更されます\n" + +#: aplay/aplay.c:758 +#, c-format +msgid "" +" can't play WAVE-files with sample %d bits in %d bytes wide (%d channels)" +msgstr "%2$d バイト長 %1$d サンプルビット (%3$d チャネル) の WAVE ファイルは再生できません" + +#: aplay/aplay.c:767 +#, c-format +msgid " can't play WAVE-files with sample %d bits wide" +msgstr "%d ビット長のサンプルの WAVE ファイルは再生できません" + +#: aplay/aplay.c:825 +#, c-format +msgid "Warning: format is changed to MU_LAW\n" +msgstr "警告: フォーマットは MU_LAW に変更されます\n" + +#: aplay/aplay.c:837 +#, c-format +msgid "Warning: format is changed to S16_BE\n" +msgstr "警告: フォーマットは S16_BE に変更されます\n" + +#: aplay/aplay.c:850 aplay/aplay.c:1412 aplay/aplay.c:1419 aplay/aplay.c:1966 +#: aplay/aplay.c:1978 +msgid "read error" +msgstr "リードエラー" + +#: aplay/aplay.c:870 +msgid "Broken configuration for this PCM: no configurations available" +msgstr "指定の PCM を使用できません: 設定がありません" + +#: aplay/aplay.c:887 +msgid "Access type not available" +msgstr "アクセスタイプが使用不可能" + +#: aplay/aplay.c:892 +msgid "Sample format non available" +msgstr "サンプルフォーマットが使用不可能" + +#: aplay/aplay.c:897 +msgid "Channels count non available" +msgstr "チャネル数が使用不可能" + +#: aplay/aplay.c:910 +#, c-format +msgid "Warning: rate is not accurate (requested = %iHz, got = %iHz)\n" +msgstr "警告: レートが不正確です (要求値 = %iHz, 使用値 = %iHz)\n" + +#: aplay/aplay.c:911 +#, c-format +msgid " please, try the plug plugin (-Dplug:%s)\n" +msgstr " plug プラグイン (-Dplug:%s) を使用してください" + +#: aplay/aplay.c:945 +msgid "Unable to install hw params:" +msgstr "hw params のインストールに失敗しました:" + +#: aplay/aplay.c:952 +#, c-format +msgid "Can't use period equal to buffer size (%lu == %lu)" +msgstr "period と buffer サイズには同じ値を使用できません (%lu == %lu)" + +#: aplay/aplay.c:959 +msgid "Unable to obtain xfer align\n" +msgstr "xfer align 値を得ることができません\n" + +#: aplay/aplay.c:996 +msgid "unable to install sw params:" +msgstr "sw params のインストールに失敗しました:" + +#: aplay/aplay.c:1035 +#, c-format +msgid "status error: %s" +msgstr "ステータスエラー: %s" + +#: aplay/aplay.c:1043 +#, c-format +msgid "%s!!! (at least %.3f ms long)\n" +msgstr "%s!!! (少なくとも %.3f ms)\n" + +#: aplay/aplay.c:1044 +msgid "underrun" +msgstr "アンダーラン" + +#: aplay/aplay.c:1044 +msgid "overrun" +msgstr "オーバーラン" + +#: aplay/aplay.c:1047 +#, c-format +msgid "Status:\n" +msgstr "ステータス:\n" + +#: aplay/aplay.c:1051 +#, c-format +msgid "xrun: prepare error: %s" +msgstr "" + +#: aplay/aplay.c:1057 +#, c-format +msgid "Status(DRAINING):\n" +msgstr "ステータス(DRAINING):\n" + +#: aplay/aplay.c:1061 +#, c-format +msgid "capture stream format change? attempting recover...\n" +msgstr "録音ストリームのフォーマットが変更? 修復を試みます...\n" + +#: aplay/aplay.c:1063 +#, c-format +msgid "xrun(DRAINING): prepare error: %s" +msgstr "" + +#: aplay/aplay.c:1070 +#, c-format +msgid "Status(R/W):\n" +msgstr "ステータス(R/W):\n" + +#: aplay/aplay.c:1073 +#, c-format +msgid "read/write error, state = %s" +msgstr "読み書きエラー, ステータス = %s" + +#: aplay/aplay.c:1083 +#, c-format +msgid "Suspended. Trying resume. " +msgstr "サスペンド中です。レジュームします。" + +#: aplay/aplay.c:1088 +#, c-format +msgid "Failed. Restarting stream. " +msgstr "失敗しました。ストリームを再スタートします。" + +#: aplay/aplay.c:1090 +#, c-format +msgid "suspend: prepare error: %s" +msgstr "サスペンド: prepare エラー: %s" + +#: aplay/aplay.c:1095 +#, c-format +msgid "Done.\n" +msgstr "終了\n" + +#: aplay/aplay.c:1146 +#, c-format +msgid "Max peak (%li samples): %05i (0x%04x) " +msgstr "最大ピーク (%li サンプル): %05i (0x%04x) " + +#: aplay/aplay.c:1182 +#, c-format +msgid "write error: %s" +msgstr "書込エラー: %s" + +#: aplay/aplay.c:1224 +#, c-format +msgid "writev error: %s" +msgstr "書込(writev)エラー: %s" + +#: aplay/aplay.c:1263 +#, c-format +msgid "read error: %s" +msgstr "読込エラー: %s" + +#: aplay/aplay.c:1302 +#, c-format +msgid "readv error: %s" +msgstr "読込(readv)エラー" + +#: aplay/aplay.c:1350 +msgid "can't allocate buffer for silence" +msgstr "サイレンス用のバッファの取得に失敗しました" + +#: aplay/aplay.c:1359 aplay/aplay.c:1587 aplay/aplay.c:1592 aplay/aplay.c:1639 +#: aplay/aplay.c:1648 aplay/aplay.c:1655 aplay/aplay.c:1665 aplay/aplay.c:1671 +#: aplay/aplay.c:1739 aplay/aplay.c:1769 aplay/aplay.c:1783 +msgid "write error" +msgstr "書込エラー" + +#: aplay/aplay.c:1373 +#, c-format +msgid "voc_pcm_flush - silence error" +msgstr "" + +#: aplay/aplay.c:1379 +msgid "voc_pcm_flush error" +msgstr "" + +#: aplay/aplay.c:1403 +msgid "malloc error" +msgstr "malloc エラー" + +#: aplay/aplay.c:1407 +#, c-format +msgid "Playing Creative Labs Channel file '%s'...\n" +msgstr "Creative Labs Channel ファイル '%s' を演奏中...\n" + +#: aplay/aplay.c:1475 aplay/aplay.c:1567 +msgid "can't play packed .voc files" +msgstr "packed .voc ファイルは演奏できません" + +#: aplay/aplay.c:1527 +#, c-format +msgid "can't play loops; %s isn't seekable\n" +msgstr "ループ演奏できません。%s はシーク不可能です\n" + +#: aplay/aplay.c:1576 +#, c-format +msgid "unknown blocktype %d. terminate." +msgstr "未知のブロックタイプ %d: 終了します。" + +#: aplay/aplay.c:1706 +#, c-format +msgid "Wave doesn't support %s format..." +msgstr "WAVE は %s フォーマットをサポートしません..." + +#: aplay/aplay.c:1763 +#, c-format +msgid "Sparc Audio doesn't support %s format..." +msgstr "Sparc オーディオは %s フォーマットをサポートしません..." + +#: aplay/aplay.c:1848 +msgid "Playing" +msgstr "再生中" + +#: aplay/aplay.c:1848 +msgid "Recording" +msgstr "録音中" + +#: aplay/aplay.c:1852 +#, c-format +msgid "Rate %d Hz, " +msgstr "レート %d Hz, " + +#: aplay/aplay.c:1854 +#, c-format +msgid "Mono" +msgstr "モノラル" + +#: aplay/aplay.c:1856 +#, c-format +msgid "Stereo" +msgstr "ステレオ" + +#: aplay/aplay.c:1858 +#, c-format +msgid "Channels %i" +msgstr "チャネル数 %i" + +#: aplay/aplay.c:2140 aplay/aplay.c:2193 +#, c-format +msgid "You need to specify %d files" +msgstr "%d 個のファイルを指定してください" + +#: seq/aconnect/aconnect.c:48 +#, c-format +msgid "aconnect - ALSA sequencer connection manager\n" +msgstr "aconnect - ALSA sequencer 接続マネージャ\n" + +#: seq/aconnect/aconnect.c:49 +#, c-format +msgid "Copyright (C) 1999-2000 Takashi Iwai\n" +msgstr "" + +#: seq/aconnect/aconnect.c:50 +#, c-format +msgid "Usage:\n" +msgstr "使用法:\n" + +#: seq/aconnect/aconnect.c:51 +#, c-format +msgid " * Connection/disconnection between two ports\n" +msgstr " * 二つのポートの接続/切り離し\n" + +#: seq/aconnect/aconnect.c:52 +#, c-format +msgid " aconnect [-options] sender receiver\n" +msgstr " aconnect [-オプション] 送信 受信\n" + +#: seq/aconnect/aconnect.c:53 +#, c-format +msgid " sender, receiver = client:port pair\n" +msgstr " 送信, 受信 = クライアント:ポートの組\n" + +#: seq/aconnect/aconnect.c:54 +#, c-format +msgid " -d,--disconnect disconnect\n" +msgstr " -d,--disconnect 切り離し\n" + +#: seq/aconnect/aconnect.c:55 +#, c-format +msgid " -e,--exclusive exclusive connection\n" +msgstr " -e,--exclusive 排他接続\n" + +#: seq/aconnect/aconnect.c:56 +#, c-format +msgid " -r,--real # convert real-time-stamp on queue\n" +msgstr " -r,--real # キューのリアルタイムスタンプに変換\n" + +#: seq/aconnect/aconnect.c:57 +#, c-format +msgid " -t,--tick # convert tick-time-stamp on queue\n" +msgstr " -t,--tick # キューのティックタイムスタンプに変換\n" + +#: seq/aconnect/aconnect.c:58 +#, c-format +msgid " * List connected ports (no subscription action)\n" +msgstr " * 接続済みのポートの一覧\n" + +#: seq/aconnect/aconnect.c:59 +#, c-format +msgid " aconnect -i|-o [-options]\n" +msgstr " aconnect -i|-o [-オプション]\n" + +#: seq/aconnect/aconnect.c:60 +#, c-format +msgid " -i,--input list input (readable) ports\n" +msgstr " -i,--input 入力 (読込) ポートの一覧\n" + +#: seq/aconnect/aconnect.c:61 +#, c-format +msgid " -o,--output list output (writable) ports\n" +msgstr " -o,--output 主力 (書込) ポートの一覧\n" + +#: seq/aconnect/aconnect.c:62 +#, c-format +msgid " -l,--list list current connections of each port\n" +msgstr " -l,--list 各ポートの現在の接続を表示\n" + +#: seq/aconnect/aconnect.c:63 +#, c-format +msgid " * Remove all exported connections\n" +msgstr " * 全てのエクスポートされた接続を切り離す\n" + +#: seq/aconnect/aconnect.c:64 +#, c-format +msgid " -x, --removeall\n" +msgstr " -x, --removall\n" + +#: seq/aconnect/aconnect.c:131 +msgid "Connecting To" +msgstr "接続先" + +#: seq/aconnect/aconnect.c:132 +msgid "Connected From" +msgstr "接続元" + +#: seq/aconnect/aconnect.c:168 +#, c-format +msgid "client %d: '%s' [type=%s]\n" +msgstr "クライアント %d: '%s' [タイプ=%s]\n" + +#: seq/aconnect/aconnect.c:172 +msgid "user" +msgstr "ユーザ" + +#: seq/aconnect/aconnect.c:172 +msgid "kernel" +msgstr "カーネル" + +#: seq/aconnect/aconnect.c:323 +#, c-format +msgid "can't open sequencer\n" +msgstr "sequencer をオープンできません\n" + +#: seq/aconnect/aconnect.c:351 +#, c-format +msgid "can't get client id\n" +msgstr "クライアント ID を取得できません\n" + +#: seq/aconnect/aconnect.c:358 +#, c-format +msgid "can't set client info\n" +msgstr "クライアント情報を取得できません\n" + +#: seq/aconnect/aconnect.c:365 +#, c-format +msgid "invalid sender address %s\n" +msgstr "送信アドレスが不正です: %s\n" + +#: seq/aconnect/aconnect.c:370 seq/aseqnet/aseqnet.c:286 +#, c-format +msgid "invalid destination address %s\n" +msgstr "受信アドレスが不正です: %s\n" + +#: seq/aconnect/aconnect.c:384 +#, c-format +msgid "No subscription is found\n" +msgstr "接続が見つかりません\n" + +#: seq/aconnect/aconnect.c:389 +#, c-format +msgid "Disconnection failed (%s)\n" +msgstr "切り離しに失敗 (%s)\n" + +#: seq/aconnect/aconnect.c:395 +#, c-format +msgid "Connection is already subscribed\n" +msgstr "既に接続されています\n" + +#: seq/aconnect/aconnect.c:400 +#, c-format +msgid "Connection failed (%s)\n" +msgstr "接続に失敗 (%s)\n" + +#: seq/aseqnet/aseqnet.c:160 +#, c-format +msgid "aseqnet - network client/server on ALSA sequencer\n" +msgstr "aseqnet - ALSA sequencer 上のネットワーククライアント/サーバ" + +#: seq/aseqnet/aseqnet.c:161 +#, c-format +msgid " Copyright (C) 1999 Takashi Iwai\n" +msgstr "" + +#: seq/aseqnet/aseqnet.c:162 +#, c-format +msgid "usage:\n" +msgstr "使用法:\n" + +#: seq/aseqnet/aseqnet.c:163 +#, c-format +msgid " server mode: aseqnet [-options]\n" +msgstr " サーバモード: aseqnet [-オプション]\n" + +#: seq/aseqnet/aseqnet.c:164 +#, c-format +msgid " client mode: aseqnet [-options] server_host\n" +msgstr " クライアントモード: aseqnet [-オプション] サーバホスト\n" + +#: seq/aseqnet/aseqnet.c:165 +#, c-format +msgid "options:\n" +msgstr "オプション:\n" + +#: seq/aseqnet/aseqnet.c:166 +#, c-format +msgid " -p,--port # : sepcify TCP port (digit or service name)\n" +msgstr " -p,--port # : TCP ポートの指定 (数字またはサービス名)\n" + +#: seq/aseqnet/aseqnet.c:167 +#, c-format +msgid " -s,--source addr : read from given addr (client:port)\n" +msgstr " -s,--source addr : 指定のアドレス(クライアント:ポート)から読み込む\n" + +#: seq/aseqnet/aseqnet.c:168 +#, c-format +msgid " -d,--dest addr : write to given addr (client:port)\n" +msgstr " -d,--dest addr : 指定のアドレス(クライアント:ポート)に書き込む\n" + +#: seq/aseqnet/aseqnet.c:169 +#, c-format +msgid " -v, --verbose : print verbose messages\n" +msgstr " -v,--verbose : 冗長メッセージ表示\n" + +#: seq/aseqnet/aseqnet.c:170 +#, c-format +msgid " -i, --info : print certain received events\n" +msgstr " -i,--info : 受信イベントを表示する\n" + +#: seq/aseqnet/aseqnet.c:184 +#, c-format +msgid "can't malloc\n" +msgstr "malloc できません" + +#: seq/aseqnet/aseqnet.c:209 +#, c-format +msgid "closing files..\n" +msgstr "ファイルを閉じます..\n" + +#: seq/aseqnet/aseqnet.c:268 +#, c-format +msgid "sequencer opened: %d:%d\n" +msgstr "" + +#: seq/aseqnet/aseqnet.c:275 +#, c-format +msgid "invalid source address %s\n" +msgstr "不正な送信アドレス %s\n" + +#: seq/aseqnet/aseqnet.c:305 +#, c-format +msgid "service '%s' is not found in /etc/services\n" +msgstr "サービス '%s' が /etc/services に見つかりません\n" + +#: seq/aseqnet/aseqnet.c:373 +#, c-format +msgid "too many connections!\n" +msgstr "接続が多すぎます!\n" + +#: seq/aseqnet/aseqnet.c:384 +#, c-format +msgid "accepted[%d]\n" +msgstr "了解[%d]\n" + +#: seq/aseqnet/aseqnet.c:407 +#, c-format +msgid "can't get address %s\n" +msgstr "アドレス %s を取得できません\n" + +#: seq/aseqnet/aseqnet.c:418 +#, c-format +msgid "ok.. connected\n" +msgstr "ok.. 接続\n" + +#: seq/aseqnet/aseqnet.c:514 +#, c-format +msgid "Channel %2d: Control event : %5d\n" +msgstr "チャネル %2d: コントロール : %5d\n" + +#: seq/aseqnet/aseqnet.c:518 +#, c-format +msgid "Channel %2d: Pitchbender : %5d\n" +msgstr "チャネル %2d: ピッチベンド : %5d\n" + +#: seq/aseqnet/aseqnet.c:522 +#, c-format +msgid "Channel %2d: Note On event : %5d\n" +msgstr "チャネル %2d: ノートオン : %5d\n" + +#: seq/aseqnet/aseqnet.c:526 +#, c-format +msgid "Channel %2d: Note Off event: %5d\n" +msgstr "チャネル %2d: ノートオフ : %5d\n" + +#: seq/aseqnet/aseqnet.c:581 +#, c-format +msgid "disconnected\n" +msgstr "切り離し\n" + +#: speaker-test/speaker-test.c:71 +msgid "Front Left" +msgstr "" + +#: speaker-test/speaker-test.c:72 +msgid "Front Right" +msgstr "" + +#: speaker-test/speaker-test.c:73 +msgid "Rear Left" +msgstr "" + +#: speaker-test/speaker-test.c:74 +msgid "Rear Right" +msgstr "" + +#: speaker-test/speaker-test.c:75 +msgid "Center" +msgstr "" + +#: speaker-test/speaker-test.c:76 +msgid "LFE" +msgstr "" + +#: speaker-test/speaker-test.c:77 +msgid "Side Left" +msgstr "" + +#: speaker-test/speaker-test.c:78 +msgid "Side Right" +msgstr "" + +#: speaker-test/speaker-test.c:79 +msgid "8" +msgstr "" + +#: speaker-test/speaker-test.c:80 +msgid "9" +msgstr "" + +#: speaker-test/speaker-test.c:81 +msgid "10" +msgstr "" + +#: speaker-test/speaker-test.c:82 +msgid "11" +msgstr "" + +#: speaker-test/speaker-test.c:83 +msgid "12" +msgstr "" + +#: speaker-test/speaker-test.c:84 +msgid "13" +msgstr "" + +#: speaker-test/speaker-test.c:85 +msgid "14" +msgstr "" + +#: speaker-test/speaker-test.c:86 +msgid "15" +msgstr "" + +#: speaker-test/speaker-test.c:87 +msgid "16" +msgstr "" + +#: speaker-test/speaker-test.c:237 +#, c-format +msgid "Broken configuration for playback: no configurations available: %s\n" +msgstr "再生用に設定できません: 設定がみつかりません: %s\n" + +#: speaker-test/speaker-test.c:244 +#, c-format +msgid "Access type not available for playback: %s\n" +msgstr "アクセスタイプが不正です: %s\n" + +#: speaker-test/speaker-test.c:251 +#, c-format +msgid "Sample format not available for playback: %s\n" +msgstr "指定のサンプルフォーマットを使用できません: %s\n" + +#: speaker-test/speaker-test.c:258 +#, c-format +msgid "Channels count (%i) not available for playbacks: %s\n" +msgstr "チャネル数 (%i) を使用できません: %s\n" + +#: speaker-test/speaker-test.c:266 +#, c-format +msgid "Rate %iHz not available for playback: %s\n" +msgstr "レート %iHz を使用できません: %s\n" + +#: speaker-test/speaker-test.c:271 +#, c-format +msgid "Rate doesn't match (requested %iHz, get %iHz, err %d)\n" +msgstr "設定レートが一致しません< (要求値 %iHz, 取得値 %iHz, エラー %d)\n" + +#: speaker-test/speaker-test.c:275 +#, c-format +msgid "Rate set to %iHz (requested %iHz)\n" +msgstr "レート %iHz (要求値 %iHz)\n" + +#: speaker-test/speaker-test.c:284 +#, c-format +msgid "Buffer size range from %lu to %lu\n" +msgstr "バッファサイズ範囲 %lu 〜 %lu\n" + +#: speaker-test/speaker-test.c:285 +#, c-format +msgid "Period size range from %lu to %lu\n" +msgstr "ピリオドサイズ範囲 %lu 〜 %lu\n" + +#: speaker-test/speaker-test.c:286 +#, c-format +msgid "Periods = %d\n" +msgstr "ピリオド数 = %d\n" + +#: speaker-test/speaker-test.c:287 +#, c-format +msgid "Buffer time size %lu\n" +msgstr "バッファタイムサイズ %lu\n" + +#: speaker-test/speaker-test.c:298 +#, c-format +msgid "To choose buffer_size = %lu\n" +msgstr "buffer_size = %lu を選択\n" + +#: speaker-test/speaker-test.c:299 +#, c-format +msgid "To choose period_size = %lu\n" +msgstr "period_size = %lu を選択\n" + +#: speaker-test/speaker-test.c:303 +#, c-format +msgid "Unable to set period size %lu for playback: %s\n" +msgstr "period_size %lu を設定できません: %s\n" + +#: speaker-test/speaker-test.c:308 +#, c-format +msgid "Unable to get period size for playback: %s\n" +msgstr "period_size を取得できません: %s\n" + +#: speaker-test/speaker-test.c:313 +#, c-format +msgid "Unable to set buffer size %lu for playback: %s\n" +msgstr "buffer_size %lu を設定できません: %s\n" + +#: speaker-test/speaker-test.c:317 +#, c-format +msgid "was set period_size = %lu\n" +msgstr "period_size = %lu で設定\n" + +#: speaker-test/speaker-test.c:318 +#, c-format +msgid "was set buffer_size = %lu\n" +msgstr "buffer_size = %lu で設定\n" + +#: speaker-test/speaker-test.c:320 +#, c-format +msgid "buffer to small, could not use\n" +msgstr "バッファが小さすぎます\n" + +#: speaker-test/speaker-test.c:328 +#, c-format +msgid "Unable to set hw params for playback: %s\n" +msgstr "hw params を設定できません: %s\n" + +#: speaker-test/speaker-test.c:341 +#, c-format +msgid "Unable to determine current swparams for playback: %s\n" +msgstr "現在の swparams を取得できません: %s\n" + +#: speaker-test/speaker-test.c:348 +#, c-format +msgid "Unable to set start threshold mode for playback: %s\n" +msgstr "start_threshold モードを設定できません: %s\n" + +#: speaker-test/speaker-test.c:355 +#, c-format +msgid "Unable to set avail min for playback: %s\n" +msgstr "avail_min を設定できません: %s\n" + +#: speaker-test/speaker-test.c:362 +#, c-format +msgid "Unable to set transfer align for playback: %s\n" +msgstr "転送 align を設定できません: %s\n" + +#: speaker-test/speaker-test.c:369 +#, c-format +msgid "Unable to set sw params for playback: %s\n" +msgstr "再生用の sw params を設定できません: %s\n" + +#: speaker-test/speaker-test.c:384 +#, c-format +msgid "Can't recovery from underrun, prepare failed: %s\n" +msgstr "アンダーランから復帰失敗: %s\n" + +#: speaker-test/speaker-test.c:395 +#, c-format +msgid "Can't recovery from suspend, prepare failed: %s\n" +msgstr "サスペンドから復帰失敗: %s\n" + +#: speaker-test/speaker-test.c:431 +#, c-format +msgid "Write error: %d,%s\n" +msgstr "書込エラー: %d,%s\n" + +#: speaker-test/speaker-test.c:433 +#, c-format +msgid "xrun_recovery failed: %d,%s\n" +msgstr "xrun_recovery 失敗: %d,%s\n" + +#: speaker-test/speaker-test.c:452 +#, c-format +msgid "" +"Usage: speaker-test [OPTION]... \n" +"-h,--help\thelp\n" +"-D,--device\tplayback device\n" +"-r,--rate\tstream rate in Hz\n" +"-c,--channels\tcount of channels in stream\n" +"-f,--frequency\tsine wave frequency in Hz\n" +"-F,--format\tsample format\n" +"-b,--buffer\tring buffer size in us\n" +"-p,--period\tperiod size in us\n" +"-t,--test\t1=use pink noise, 2=use sine wave\n" +"-s,--speaker\tsingle speaker test. Values 1=Left or 2=right\n" +"\n" +msgstr "" +"使用法: speaker-test [オプション]...\n" +"-h,--help ヘルプ\n" +"-D,--device 再生デバイス\n" +"-r,--rate ストリームレート (Hz)\n" +"-c,--channels チャネル数\n" +"-f,--frequency 正弦波周波数 (hz)\n" +"-F,--format サンプルフォーマット\n" +"-b,--buffer リングバッファーサイズ (μs)\n" +"-p,--period ピリオドサイズ (μs)\n" +"-t,--test 1=ピンクノイズを使用, 2=正弦波を使用\n" +"-s,--speaker 単一スピーカーテスト 1=左 または 2=右\n" +"\n" + +#: speaker-test/speaker-test.c:561 +#, c-format +msgid "Invalid parameter for -s option.\n" +msgstr "-s オプションの値が不正です\n" + +#: speaker-test/speaker-test.c:566 +#, c-format +msgid "Unknown option '%c'\n" +msgstr "未知のオプション '%c'\n" + +#: speaker-test/speaker-test.c:579 +#, c-format +msgid "Output failed: %s\n" +msgstr "出力失敗: %s\n" + +#: speaker-test/speaker-test.c:583 +#, c-format +msgid "Playback device is %s\n" +msgstr "再生デバイス: %s\n" + +#: speaker-test/speaker-test.c:584 +#, c-format +msgid "Stream parameters are %iHz, %s, %i channels\n" +msgstr "ストリームパラメータ: %iHz, %s, %i チャネル\n" + +#: speaker-test/speaker-test.c:586 +#, c-format +msgid "Using 16 octaves of pink noise\n" +msgstr "16 オクターブのピンクノイズを使用\n" + +#: speaker-test/speaker-test.c:588 +#, c-format +msgid "Sine wave rate is %.4fHz\n" +msgstr "正弦波レート: %.4fHz\n" + +#: speaker-test/speaker-test.c:592 +#, c-format +msgid "Playback open error: %d,%s\n" +msgstr "再生オープンエラー: %d,%s\n" + +#: speaker-test/speaker-test.c:597 +#, c-format +msgid "Setting of hwparams failed: %s\n" +msgstr "hwparams の設定に失敗: %s\n" + +#: speaker-test/speaker-test.c:604 +#, c-format +msgid "Setting of swparams failed: %s\n" +msgstr "swparams の設定に失敗: %s\n" + +#: speaker-test/speaker-test.c:614 +#, c-format +msgid "No enough memory\n" +msgstr "メモリが足りません\n" + +#: speaker-test/speaker-test.c:638 speaker-test/speaker-test.c:660 +#, c-format +msgid "Transfer failed: %s\n" +msgstr "転送に失敗しました: %s\n" + +#: speaker-test/speaker-test.c:641 +#, c-format +msgid "Pausing\n" +msgstr "停止中\n" + +#: speaker-test/speaker-test.c:653 +#, c-format +msgid "Time per period = %lf\n" +msgstr "ピリオド時間 = %lf\n" diff --git a/po/quot.sed b/po/quot.sed new file mode 100644 index 0000000..0122c46 --- /dev/null +++ b/po/quot.sed @@ -0,0 +1,6 @@ +s/"\([^"]*\)"/“\1”/g +s/`\([^`']*\)'/‘\1’/g +s/ '\([^`']*\)' / ‘\1’ /g +s/ '\([^`']*\)'$/ ‘\1’/g +s/^'\([^`']*\)' /‘\1’ /g +s/“”/""/g diff --git a/po/remove-potcdate.sed b/po/remove-potcdate.sed new file mode 100644 index 0000000..edb38d7 --- /dev/null +++ b/po/remove-potcdate.sed @@ -0,0 +1,11 @@ +/^"POT-Creation-Date: .*"$/{ +x +s/P/P/ +ta +g +d +bb +:a +x +:b +} diff --git a/po/remove-potcdate.sin b/po/remove-potcdate.sin new file mode 100644 index 0000000..2436c49 --- /dev/null +++ b/po/remove-potcdate.sin @@ -0,0 +1,19 @@ +# Sed script that remove the POT-Creation-Date line in the header entry +# from a POT file. +# +# The distinction between the first and the following occurrences of the +# pattern is achieved by looking at the hold space. +/^"POT-Creation-Date: .*"$/{ +x +# Test if the hold space is empty. +s/P/P/ +ta +# Yes it was empty. First occurrence. Remove the line. +g +d +bb +:a +# The hold space was nonempty. Following occurrences. Do nothing. +x +:b +} diff --git a/seq/aconnect/Makefile.am b/seq/aconnect/Makefile.am index c2e1d09..507b9fe 100644 --- a/seq/aconnect/Makefile.am +++ b/seq/aconnect/Makefile.am @@ -1,5 +1,6 @@ INCLUDES = -I$(top_srcdir)/include EXTRA_DIST = README.aconnect aconnect.1 +LDADD = $(LIBINTL) bin_PROGRAMS = aconnect aconnect_SOURCES = aconnect.c diff --git a/seq/aconnect/aconnect.c b/seq/aconnect/aconnect.c index a7bc15d..03cce4e 100644 --- a/seq/aconnect/aconnect.c +++ b/seq/aconnect/aconnect.c @@ -25,6 +25,8 @@ #include #include #include +#include "aconfig.h" +#include "gettext.h" static void error_handler(const char *file, int line, const char *function, int err, const char *fmt, ...) { @@ -43,23 +45,23 @@ static void error_handler(const char *file, int line, const char *function, int static void usage(void) { - fprintf(stderr, "aconnect - ALSA sequencer connection manager\n"); - fprintf(stderr, "Copyright (C) 1999-2000 Takashi Iwai\n"); - fprintf(stderr, "Usage:\n"); - fprintf(stderr, " * Connection/disconnection between two ports\n"); - fprintf(stderr, " aconnect [-options] sender receiver\n"); - fprintf(stderr, " sender, receiver = client:port pair\n"); - fprintf(stderr, " -d,--disconnect disconnect\n"); - fprintf(stderr, " -e,--exclusive exclusive connection\n"); - fprintf(stderr, " -r,--real # convert real-time-stamp on queue\n"); - fprintf(stderr, " -t,--tick # convert tick-time-stamp on queue\n"); - fprintf(stderr, " * List connected ports (no subscription action)\n"); - fprintf(stderr, " aconnect -i|-o [-options]\n"); - fprintf(stderr, " -i,--input list input (readable) ports\n"); - fprintf(stderr, " -o,--output list output (writable) ports\n"); - fprintf(stderr, " -l,--list list current connections of each port\n"); - fprintf(stderr, " * Remove all exported connections\n"); - fprintf(stderr, " -x, --removeall\n"); + fprintf(stderr, _("aconnect - ALSA sequencer connection manager\n")); + fprintf(stderr, _("Copyright (C) 1999-2000 Takashi Iwai\n")); + fprintf(stderr, _("Usage:\n")); + fprintf(stderr, _(" * Connection/disconnection between two ports\n")); + fprintf(stderr, _(" aconnect [-options] sender receiver\n")); + fprintf(stderr, _(" sender, receiver = client:port pair\n")); + fprintf(stderr, _(" -d,--disconnect disconnect\n")); + fprintf(stderr, _(" -e,--exclusive exclusive connection\n")); + fprintf(stderr, _(" -r,--real # convert real-time-stamp on queue\n")); + fprintf(stderr, _(" -t,--tick # convert tick-time-stamp on queue\n")); + fprintf(stderr, _(" * List connected ports (no subscription action)\n")); + fprintf(stderr, _(" aconnect -i|-o [-options]\n")); + fprintf(stderr, _(" -i,--input list input (readable) ports\n")); + fprintf(stderr, _(" -o,--output list output (writable) ports\n")); + fprintf(stderr, _(" -l,--list list current connections of each port\n")); + fprintf(stderr, _(" * Remove all exported connections\n")); + fprintf(stderr, _(" -x, --removeall\n")); } /* @@ -126,8 +128,8 @@ static void list_subscribers(snd_seq_t *seq, const snd_seq_addr_t *addr) snd_seq_query_subscribe_t *subs; snd_seq_query_subscribe_alloca(&subs); snd_seq_query_subscribe_set_root(subs, addr); - list_each_subs(seq, subs, SND_SEQ_QUERY_SUBS_READ, "Connecting To"); - list_each_subs(seq, subs, SND_SEQ_QUERY_SUBS_WRITE, "Connected From"); + list_each_subs(seq, subs, SND_SEQ_QUERY_SUBS_READ, _("Connecting To")); + list_each_subs(seq, subs, SND_SEQ_QUERY_SUBS_WRITE, _("Connected From")); } /* @@ -163,10 +165,11 @@ static void print_port(snd_seq_t *seq, snd_seq_client_info_t *cinfo, snd_seq_port_info_t *pinfo, int count) { if (! count) { - printf("client %d: '%s' [type=%s]\n", + printf(_("client %d: '%s' [type=%s]\n"), snd_seq_client_info_get_client(cinfo), snd_seq_client_info_get_name(cinfo), - (snd_seq_client_info_get_type(cinfo) == SND_SEQ_USER_CLIENT ? "user" : "kernel")); + (snd_seq_client_info_get_type(cinfo) == SND_SEQ_USER_CLIENT ? + _("user") : _("kernel"))); } printf(" %3d '%-16s'\n", snd_seq_port_info_get_port(pinfo), @@ -275,6 +278,9 @@ int main(int argc, char **argv) snd_seq_port_subscribe_t *subs; snd_seq_addr_t sender, dest; + setlocale(LC_ALL, ""); + textdomain(PACKAGE); + while ((c = getopt_long(argc, argv, "dior:t:elx", long_option, NULL)) != -1) { switch (c) { case 'd': @@ -314,7 +320,7 @@ int main(int argc, char **argv) } if (snd_seq_open(&seq, "default", SND_SEQ_OPEN_DUPLEX, 0) < 0) { - fprintf(stderr, "can't open sequencer\n"); + fprintf(stderr, _("can't open sequencer\n")); return 1; } @@ -342,26 +348,26 @@ int main(int argc, char **argv) if ((client = snd_seq_client_id(seq)) < 0) { snd_seq_close(seq); - fprintf(stderr, "can't get client id\n"); + fprintf(stderr, _("can't get client id\n")); return 1; } /* set client info */ if (snd_seq_set_client_name(seq, "ALSA Connector") < 0) { snd_seq_close(seq); - fprintf(stderr, "can't set client info\n"); + fprintf(stderr, _("can't set client info\n")); return 1; } /* set subscription */ if (snd_seq_parse_address(seq, &sender, argv[optind]) < 0) { snd_seq_close(seq); - fprintf(stderr, "invalid sender address %s\n", argv[optind]); + fprintf(stderr, _("invalid sender address %s\n"), argv[optind]); return 1; } if (snd_seq_parse_address(seq, &dest, argv[optind + 1]) < 0) { snd_seq_close(seq); - fprintf(stderr, "invalid destination address %s\n", argv[optind + 1]); + fprintf(stderr, _("invalid destination address %s\n"), argv[optind + 1]); return 1; } snd_seq_port_subscribe_alloca(&subs); @@ -375,23 +381,23 @@ int main(int argc, char **argv) if (command == UNSUBSCRIBE) { if (snd_seq_get_port_subscription(seq, subs) < 0) { snd_seq_close(seq); - fprintf(stderr, "No subscription is found\n"); + fprintf(stderr, _("No subscription is found\n")); return 1; } if (snd_seq_unsubscribe_port(seq, subs) < 0) { snd_seq_close(seq); - fprintf(stderr, "Disconnection failed (%s)\n", snd_strerror(errno)); + fprintf(stderr, _("Disconnection failed (%s)\n"), snd_strerror(errno)); return 1; } } else { if (snd_seq_get_port_subscription(seq, subs) == 0) { snd_seq_close(seq); - fprintf(stderr, "Connection is already subscribed\n"); + fprintf(stderr, _("Connection is already subscribed\n")); return 1; } if (snd_seq_subscribe_port(seq, subs) < 0) { snd_seq_close(seq); - fprintf(stderr, "Connection failed (%s)\n", snd_strerror(errno)); + fprintf(stderr, _("Connection failed (%s)\n"), snd_strerror(errno)); return 1; } } diff --git a/seq/aseqdump/aseqdump.c b/seq/aseqdump/aseqdump.c index 528eaa1..e25d472 100644 --- a/seq/aseqdump/aseqdump.c +++ b/seq/aseqdump/aseqdump.c @@ -238,7 +238,7 @@ static void dump_event(const snd_seq_event_t *ev) break; case SND_SEQ_EVENT_TUNE_REQUEST: /* something's fishy here ... */ - printf("Tuna request\n"); + printf("Tune request\n"); break; case SND_SEQ_EVENT_RESET: printf("Reset\n"); diff --git a/seq/aseqnet/aseqnet.c b/seq/aseqnet/aseqnet.c index 9340bb3..0a7c414 100644 --- a/seq/aseqnet/aseqnet.c +++ b/seq/aseqnet/aseqnet.c @@ -25,6 +25,8 @@ #include #include #include +#include "aconfig.h" +#include "gettext.h" /* * prototypes @@ -95,6 +97,9 @@ int main(int argc, char **argv) int port = DEFAULT_PORT; char *source = NULL, *dest = NULL; + setlocale(LC_ALL, ""); + textdomain(PACKAGE); + while ((c = getopt_long(argc, argv, "p:s:d:vi", long_option, NULL)) != -1) { switch (c) { case 'p': @@ -152,17 +157,17 @@ int main(int argc, char **argv) */ static void usage(void) { - fprintf(stderr, "aseqnet - network client/server on ALSA sequencer\n"); - fprintf(stderr, " Copyright (C) 1999 Takashi Iwai\n"); - fprintf(stderr, "usage:\n"); - fprintf(stderr, " server mode: aseqnet [-options]\n"); - fprintf(stderr, " client mode: aseqnet [-options] server_host\n"); - fprintf(stderr, "options:\n"); - fprintf(stderr, " -p,--port # : sepcify TCP port (digit or service name)\n"); - fprintf(stderr, " -s,--source addr : read from given addr (client:port)\n"); - fprintf(stderr, " -d,--dest addr : write to given addr (client:port)\n"); - fprintf(stderr, " -v, --verbose : print verbose messages\n"); - fprintf(stderr, " -i, --info : print certain received events\n"); + fprintf(stderr, _("aseqnet - network client/server on ALSA sequencer\n")); + fprintf(stderr, _(" Copyright (C) 1999 Takashi Iwai\n")); + fprintf(stderr, _("usage:\n")); + fprintf(stderr, _(" server mode: aseqnet [-options]\n")); + fprintf(stderr, _(" client mode: aseqnet [-options] server_host\n")); + fprintf(stderr, _("options:\n")); + fprintf(stderr, _(" -p,--port # : sepcify TCP port (digit or service name)\n")); + fprintf(stderr, _(" -s,--source addr : read from given addr (client:port)\n")); + fprintf(stderr, _(" -d,--dest addr : write to given addr (client:port)\n")); + fprintf(stderr, _(" -v, --verbose : print verbose messages\n")); + fprintf(stderr, _(" -i, --info : print certain received events\n")); } @@ -176,7 +181,7 @@ static void init_buf(void) writebuf = malloc(max_wrlen); readbuf = malloc(max_rdlen); if (writebuf == NULL || readbuf == NULL) { - fprintf(stderr, "can't malloc\n"); + fprintf(stderr, _("can't malloc\n")); exit(1); } memset(writebuf, 0, max_wrlen); @@ -201,7 +206,7 @@ static void close_files(void) { int i; if (verbose) - fprintf(stderr, "closing files..\n"); + fprintf(stderr, _("closing files..\n")); for (i = 0; i < max_connection; i++) { if (netfd[i] >= 0) close(netfd[i]); @@ -260,14 +265,14 @@ static void init_seq(char *source, char *dest) exit(1); } if (verbose) - fprintf(stderr, "sequencer opened: %d:%d\n", + fprintf(stderr, _("sequencer opened: %d:%d\n"), snd_seq_client_id(handle), seq_port); /* explicit subscriptions */ if (source) { /* read subscription */ if (snd_seq_parse_address(handle, &addr, source) < 0) { - fprintf(stderr, "invalid source address %s\n", source); + fprintf(stderr, _("invalid source address %s\n"), source); exit(1); } if (snd_seq_connect_from(handle, seq_port, addr.client, addr.port)) { @@ -278,7 +283,7 @@ static void init_seq(char *source, char *dest) if (dest) { /* write subscription */ if (snd_seq_parse_address(handle, &addr, dest) < 0) { - fprintf(stderr, "invalid destination address %s\n", dest); + fprintf(stderr, _("invalid destination address %s\n"), dest); exit(1); } if (snd_seq_connect_to(handle, seq_port, addr.client, addr.port)) { @@ -297,7 +302,7 @@ static int get_port(char *service) struct servent *sp; if ((sp = getservbyname(service, "tcp")) == NULL){ - fprintf(stderr, "service '%s' is not found in /etc/services\n", service); + fprintf(stderr, _("service '%s' is not found in /etc/services\n"), service); return -1; } return sp->s_port; @@ -365,7 +370,7 @@ static void start_connection(void) break; } if (i >= max_connection) { - fprintf(stderr, "too many connections!\n"); + fprintf(stderr, _("too many connections!\n")); exit(1); } memset(&addr, 0, sizeof(addr)); @@ -376,7 +381,7 @@ static void start_connection(void) exit(1); } if (verbose) - fprintf(stderr, "accepted[%d]\n", netfd[i]); + fprintf(stderr, _("accepted[%d]\n"), netfd[i]); cur_connected++; } @@ -399,7 +404,7 @@ static void init_client(char *server, int port) exit(1); } if ((host = gethostbyname(server)) == NULL){ - fprintf(stderr,"can't get address %s\n", server); + fprintf(stderr, _("can't get address %s\n"), server); exit(1); } addr.sin_port = htons(port); @@ -410,7 +415,7 @@ static void init_client(char *server, int port) exit(1); } if (verbose) - fprintf(stderr, "ok.. connected\n"); + fprintf(stderr, _("ok.. connected\n")); netfd[0] = fd; cur_connected = 1; } @@ -506,21 +511,21 @@ static void print_event(snd_seq_event_t *ev) { switch (ev->type) { case SND_SEQ_EVENT_CONTROLLER: - printf("Channel %2d: Control event : %5d\n", + printf(_("Channel %2d: Control event : %5d\n"), ev->data.control.channel, ev->data.control.value); break; case SND_SEQ_EVENT_PITCHBEND: - printf("Channel %2d: Pitchbender : %5d\n", + printf(_("Channel %2d: Pitchbender : %5d\n"), ev->data.control.channel, ev->data.control.value); break; case SND_SEQ_EVENT_NOTEON: - printf("Channel %2d: Note On event : %5d\n", + printf(_("Channel %2d: Note On event : %5d\n"), ev->data.control.channel, ev->data.note.note); - break; + break; case SND_SEQ_EVENT_NOTEOFF: - printf("Channel %2d: Note Off event: %5d\n", - ev->data.control.channel, ev->data.note.note); - break; + printf(_("Channel %2d: Note Off event: %5d\n"), + ev->data.control.channel, ev->data.note.note); + break; } } @@ -573,7 +578,7 @@ static int copy_remote_to_local(int fd) if (count == 0) { if (verbose) - fprintf(stderr, "disconnected\n"); + fprintf(stderr, _("disconnected\n")); return 1; } diff --git a/speaker-test/Makefile.am b/speaker-test/Makefile.am index 6777c4c..2ee40ff 100644 --- a/speaker-test/Makefile.am +++ b/speaker-test/Makefile.am @@ -1,6 +1,7 @@ SPEAKER_TEST_VERSION = 0.0.8 -INCLUDES = -I$(top_srcdir)/include -DVERSION=\"$(SPEAKER_TEST_VERSION)\" +INCLUDES = -I$(top_srcdir)/include -DSPEAKER_TEST_VERSION=\"$(SPEAKER_TEST_VERSION)\" SUBDIRS= samples +LDADD = $(LIBINTL) bin_PROGRAMS = speaker-test speaker_test_SOURCES = speaker-test.c pink.c diff --git a/speaker-test/speaker-test.c b/speaker-test/speaker-test.c index 061b5db..06f3d0b 100644 --- a/speaker-test/speaker-test.c +++ b/speaker-test/speaker-test.c @@ -44,14 +44,14 @@ #include #include -/* #include "aconfig.h" */ - #define ALSA_PCM_NEW_HW_PARAMS_API #define ALSA_PCM_NEW_SW_PARAMS_API #include #include #include #include "pink.h" +#include "aconfig.h" +#include "gettext.h" static char *device = "plughw:0,0"; /* playback device */ static snd_pcm_format_t format = SND_PCM_FORMAT_S16; /* sample format */ @@ -68,23 +68,23 @@ static snd_output_t *output = NULL; static snd_pcm_uframes_t buffer_size; static snd_pcm_uframes_t period_size; static const char *channel_name[] = { - "Front Left" , - "Front Right" , - "Rear Left" , - "Rear Right" , - "Center" , - "LFE", - "Side Left", - "Side Right", - "8", - "9", - "10", - "11", - "12", - "13", - "14", - "15", - "16" + N_("Front Left"), + N_("Front Right"), + N_("Rear Left"), + N_("Rear Right"), + N_("Center"), + N_("LFE"), + N_("Side Left"), + N_("Side Right"), + N_("8"), + N_("9"), + N_("10"), + N_("11"), + N_("12"), + N_("13"), + N_("14"), + N_("15"), + N_("16") }; static const int channels4[] = { @@ -234,28 +234,28 @@ static int set_hwparams(snd_pcm_t *handle, snd_pcm_hw_params_t *params, snd_pcm_ /* choose all parameters */ err = snd_pcm_hw_params_any(handle, params); if (err < 0) { - printf("Broken configuration for playback: no configurations available: %s\n", snd_strerror(err)); + printf(_("Broken configuration for playback: no configurations available: %s\n"), snd_strerror(err)); return err; } /* set the interleaved read/write format */ err = snd_pcm_hw_params_set_access(handle, params, access); if (err < 0) { - printf("Access type not available for playback: %s\n", snd_strerror(err)); + printf(_("Access type not available for playback: %s\n"), snd_strerror(err)); return err; } /* set the sample format */ err = snd_pcm_hw_params_set_format(handle, params, format); if (err < 0) { - printf("Sample format not available for playback: %s\n", snd_strerror(err)); + printf(_("Sample format not available for playback: %s\n"), snd_strerror(err)); return err; } /* set the count of channels */ err = snd_pcm_hw_params_set_channels(handle, params, channels); if (err < 0) { - printf("Channels count (%i) not available for playbacks: %s\n", channels, snd_strerror(err)); + printf(_("Channels count (%i) not available for playbacks: %s\n"), channels, snd_strerror(err)); return err; } @@ -263,16 +263,16 @@ static int set_hwparams(snd_pcm_t *handle, snd_pcm_hw_params_t *params, snd_pcm_ rrate = rate; err = snd_pcm_hw_params_set_rate(handle, params, rate, 0); if (err < 0) { - printf("Rate %iHz not available for playback: %s\n", rate, snd_strerror(err)); + printf(_("Rate %iHz not available for playback: %s\n"), rate, snd_strerror(err)); return err; } if (rrate != rate) { - printf("Rate doesn't match (requested %iHz, get %iHz, err %d)\n", rate, rrate, err); + printf(_("Rate doesn't match (requested %iHz, get %iHz, err %d)\n"), rate, rrate, err); return -EINVAL; } - printf("Rate set to %iHz (requested %iHz)\n", rrate, rate); + printf(_("Rate set to %iHz (requested %iHz)\n"), rrate, rate); /* set the buffer time */ buffer_time_to_size = ( (snd_pcm_uframes_t)buffer_time * rate) / 1000000; err = snd_pcm_hw_params_get_buffer_size_min(params, &buffer_size_min); @@ -281,10 +281,10 @@ static int set_hwparams(snd_pcm_t *handle, snd_pcm_hw_params_t *params, snd_pcm_ err = snd_pcm_hw_params_get_period_size_min(params, &period_size_min,&dir); dir=0; err = snd_pcm_hw_params_get_period_size_max(params, &period_size_max,&dir); - printf("Buffer size range from %lu to %lu\n",buffer_size_min, buffer_size_max); - printf("Period size range from %lu to %lu\n",period_size_min, period_size_max); - printf("Periods = %d\n", PERIODS); - printf("Buffer time size %lu\n",buffer_time_to_size); + printf(_("Buffer size range from %lu to %lu\n"),buffer_size_min, buffer_size_max); + printf(_("Period size range from %lu to %lu\n"),period_size_min, period_size_max); + printf(_("Periods = %d\n"), PERIODS); + printf(_("Buffer time size %lu\n"),buffer_time_to_size); buffer_size = buffer_time_to_size; //buffer_size=8096; @@ -295,29 +295,29 @@ static int set_hwparams(snd_pcm_t *handle, snd_pcm_hw_params_t *params, snd_pcm_ period_size = buffer_size/PERIODS; buffer_size = period_size*PERIODS; //period_size = 510; - printf("To choose buffer_size = %lu\n",buffer_size); - printf("To choose period_size = %lu\n",period_size); + printf(_("To choose buffer_size = %lu\n"),buffer_size); + printf(_("To choose period_size = %lu\n"),period_size); dir=0; err = snd_pcm_hw_params_set_period_size_near(handle, params, &period_size, &dir); if (err < 0) { - printf("Unable to set period size %lu for playback: %s\n", period_size, snd_strerror(err)); + printf(_("Unable to set period size %lu for playback: %s\n"), period_size, snd_strerror(err)); return err; } dir=0; err = snd_pcm_hw_params_get_period_size(params, &period_size, &dir); - if (err < 0) printf("Unable to get period size for playback: %s\n", snd_strerror(err)); + if (err < 0) printf(_("Unable to get period size for playback: %s\n"), snd_strerror(err)); dir=0; err = snd_pcm_hw_params_set_buffer_size_near(handle, params, &buffer_size); if (err < 0) { - printf("Unable to set buffer size %lu for playback: %s\n", buffer_size, snd_strerror(err)); + printf(_("Unable to set buffer size %lu for playback: %s\n"), buffer_size, snd_strerror(err)); return err; } err = snd_pcm_hw_params_get_buffer_size(params, &buffer_size); - printf("was set period_size = %lu\n",period_size); - printf("was set buffer_size = %lu\n",buffer_size); + printf(_("was set period_size = %lu\n"),period_size); + printf(_("was set buffer_size = %lu\n"),buffer_size); if (2*period_size > buffer_size) { - printf("buffer to small, could not use\n"); + printf(_("buffer to small, could not use\n")); return err; } @@ -325,7 +325,7 @@ static int set_hwparams(snd_pcm_t *handle, snd_pcm_hw_params_t *params, snd_pcm_ /* write the parameters to device */ err = snd_pcm_hw_params(handle, params); if (err < 0) { - printf("Unable to set hw params for playback: %s\n", snd_strerror(err)); + printf(_("Unable to set hw params for playback: %s\n"), snd_strerror(err)); return err; } @@ -338,35 +338,35 @@ static int set_swparams(snd_pcm_t *handle, snd_pcm_sw_params_t *swparams) { /* get the current swparams */ err = snd_pcm_sw_params_current(handle, swparams); if (err < 0) { - printf("Unable to determine current swparams for playback: %s\n", snd_strerror(err)); + printf(_("Unable to determine current swparams for playback: %s\n"), snd_strerror(err)); return err; } /* start the transfer when a buffer is full */ err = snd_pcm_sw_params_set_start_threshold(handle, swparams, buffer_size); if (err < 0) { - printf("Unable to set start threshold mode for playback: %s\n", snd_strerror(err)); + printf(_("Unable to set start threshold mode for playback: %s\n"), snd_strerror(err)); return err; } /* allow the transfer when at least period_size frames can be processed */ err = snd_pcm_sw_params_set_avail_min(handle, swparams, period_size); if (err < 0) { - printf("Unable to set avail min for playback: %s\n", snd_strerror(err)); + printf(_("Unable to set avail min for playback: %s\n"), snd_strerror(err)); return err; } /* align all transfers to 1 sample */ err = snd_pcm_sw_params_set_xfer_align(handle, swparams, 1); if (err < 0) { - printf("Unable to set transfer align for playback: %s\n", snd_strerror(err)); + printf(_("Unable to set transfer align for playback: %s\n"), snd_strerror(err)); return err; } /* write the parameters to the playback device */ err = snd_pcm_sw_params(handle, swparams); if (err < 0) { - printf("Unable to set sw params for playback: %s\n", snd_strerror(err)); + printf(_("Unable to set sw params for playback: %s\n"), snd_strerror(err)); return err; } @@ -381,7 +381,7 @@ static int xrun_recovery(snd_pcm_t *handle, int err) { if (err == -EPIPE) { /* under-run */ err = snd_pcm_prepare(handle); if (err < 0) - printf("Can't recovery from underrun, prepare failed: %s\n", snd_strerror(err)); + printf(_("Can't recovery from underrun, prepare failed: %s\n"), snd_strerror(err)); return 0; } else if (err == -ESTRPIPE) { @@ -392,7 +392,7 @@ static int xrun_recovery(snd_pcm_t *handle, int err) { if (err < 0) { err = snd_pcm_prepare(handle); if (err < 0) - printf("Can't recovery from suspend, prepare failed: %s\n", snd_strerror(err)); + printf(_("Can't recovery from suspend, prepare failed: %s\n"), snd_strerror(err)); } return 0; @@ -428,9 +428,9 @@ static int write_loop(snd_pcm_t *handle, int channel, int periods, uint8_t *fram continue; if (err < 0) { - printf("Write error: %d,%s\n", err, snd_strerror(err)); + printf(_("Write error: %d,%s\n"), err, snd_strerror(err)); if (xrun_recovery(handle, err) < 0) { - printf("xrun_recovery failed: %d,%s\n", err, snd_strerror(err)); + printf(_("xrun_recovery failed: %d,%s\n"), err, snd_strerror(err)); return -1; } break; /* skip one period */ @@ -449,20 +449,20 @@ static void help(void) int k; printf( - "Usage: speaker-test [OPTION]... \n" - "-h,--help help\n" - "-D,--device playback device\n" - "-r,--rate stream rate in Hz\n" - "-c,--channels count of channels in stream\n" - "-f,--frequency sine wave frequency in Hz\n" - "-F,--format sample format\n" - "-b,--buffer ring buffer size in us\n" - "-p,--period period size in us\n" - "-t,--test 1=use pink noise, 2=use sine wave\n" - "-s,--speaker single speaker test. Values 1=Left or 2=right\n" - "\n"); + _("Usage: speaker-test [OPTION]... \n" + "-h,--help help\n" + "-D,--device playback device\n" + "-r,--rate stream rate in Hz\n" + "-c,--channels count of channels in stream\n" + "-f,--frequency sine wave frequency in Hz\n" + "-F,--format sample format\n" + "-b,--buffer ring buffer size in us\n" + "-p,--period period size in us\n" + "-t,--test 1=use pink noise, 2=use sine wave\n" + "-s,--speaker single speaker test. Values 1=Left or 2=right\n" + "\n")); #if 1 - printf("Recognized sample formats are:"); + printf(_("Recognized sample formats are:")); for (k = 0; k < SND_PCM_FORMAT_LAST; ++k) { const char *s = snd_pcm_format_name(k); if (s) @@ -498,12 +498,15 @@ int main(int argc, char *argv[]) { {NULL, 0, NULL, 0 }, }; + setlocale(LC_ALL, ""); + textdomain(PACKAGE); + snd_pcm_hw_params_alloca(&hwparams); snd_pcm_sw_params_alloca(&swparams); morehelp = 0; - printf("\nspeaker-test %s\n\n",VERSION); + printf("\nspeaker-test %s\n\n", SPEAKER_TEST_VERSION); while (1) { int c; @@ -555,12 +558,12 @@ int main(int argc, char *argv[]) { speaker = speaker < 1 ? 0 : speaker; speaker = speaker > channels ? 0 : speaker; if (speaker==0) { - printf("Invalid parameter for -s option.\n"); + printf(_("Invalid parameter for -s option.\n")); exit(EXIT_FAILURE); } break; default: - printf("Unknown option '%c'\n", c); + printf(_("Unknown option '%c'\n"), c); exit(EXIT_FAILURE); break; } @@ -573,32 +576,32 @@ int main(int argc, char *argv[]) { err = snd_output_stdio_attach(&output, stdout, 0); if (err < 0) { - printf("Output failed: %s\n", snd_strerror(err)); + printf(_("Output failed: %s\n"), snd_strerror(err)); exit(EXIT_FAILURE); } - printf("Playback device is %s\n", device); - printf("Stream parameters are %iHz, %s, %i channels\n", rate, snd_pcm_format_name(format), channels); + printf(_("Playback device is %s\n"), device); + printf(_("Stream parameters are %iHz, %s, %i channels\n"), rate, snd_pcm_format_name(format), channels); if(test_type==1) - printf("Using 16 octaves of pink noise\n"); + printf(_("Using 16 octaves of pink noise\n")); else - printf("Sine wave rate is %.4fHz\n", freq); + printf(_("Sine wave rate is %.4fHz\n"), freq); loop: while ((err = snd_pcm_open(&handle, device, SND_PCM_STREAM_PLAYBACK, 0)) < 0) { - printf("Playback open error: %d,%s\n", err,snd_strerror(err)); + printf(_("Playback open error: %d,%s\n"), err,snd_strerror(err)); sleep(1); } if ((err = set_hwparams(handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED)) < 0) { - printf("Setting of hwparams failed: %s\n", snd_strerror(err)); + printf(_("Setting of hwparams failed: %s\n"), snd_strerror(err)); snd_pcm_close(handle); goto loop; exit(EXIT_FAILURE); } //getchar(); if ((err = set_swparams(handle, swparams)) < 0) { - printf("Setting of swparams failed: %s\n", snd_strerror(err)); + printf(_("Setting of swparams failed: %s\n"), snd_strerror(err)); snd_pcm_close(handle); goto loop; exit(EXIT_FAILURE); @@ -608,7 +611,7 @@ loop: initialize_pink_noise( &pink, 16); if (frames == NULL) { - printf("No enough memory\n"); + printf(_("No enough memory\n")); exit(EXIT_FAILURE); } if (speaker==0) { @@ -626,16 +629,16 @@ loop: if (channels == 8) { channel=channels8[chn]; } - printf(" %d - %s\n", channel, channel_name[channel]); + printf(" %d - %s\n", channel, gettext(channel_name[channel])); err = write_loop(handle, channel, ((rate*3)/period_size), frames); //err = write_loop(handle, 255, ((rate*3)/period_size), frames); if (err < 0) { - printf("Transfer failed: %s\n", snd_strerror(err)); + printf(_("Transfer failed: %s\n"), snd_strerror(err)); free(frames); snd_pcm_close(handle); - printf("Pausing\n"); + printf(_("Pausing\n")); goto loop ; //pause(); //printf("Done Pausing\n"); @@ -647,14 +650,14 @@ loop: time1 = (double)tv1.tv_sec + ((double)tv1.tv_usec / 1000000.0); time2 = (double)tv2.tv_sec + ((double)tv2.tv_usec / 1000000.0); time3 = time2 - time1; - printf("Time per period = %lf\n", time3 ); + printf(_("Time per period = %lf\n"), time3 ); } } else { - printf(" - %s\n", channel_name[speaker-1]); + printf(" - %s\n", gettext(channel_name[speaker-1])); err = write_loop(handle, speaker-1, ((rate*5)/period_size), frames); if (err < 0) { - printf("Transfer failed: %s\n", snd_strerror(err)); + printf(_("Transfer failed: %s\n"), snd_strerror(err)); } }