Author: jkupec Date: Tue Apr 15 11:25:31 2008 New Revision: 9641 URL: http://svn.opensuse.org/viewcvs/zypp?rev=9641&view=rev Log: - make translator comments visible Modified: trunk/zypper/src/zypp-checkpatches.cc trunk/zypper/src/zypper-keyring-callbacks.h trunk/zypper/src/zypper-misc.cc trunk/zypper/src/zypper-prompt.cc trunk/zypper/src/zypper-repo-callbacks.h trunk/zypper/src/zypper.cc Modified: trunk/zypper/src/zypp-checkpatches.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypp-checkpatches.cc?rev=9641&r1=9640&r2=9641&view=diff ============================================================================== --- trunk/zypper/src/zypp-checkpatches.cc (original) +++ trunk/zypper/src/zypp-checkpatches.cc Tue Apr 15 11:25:31 2008 @@ -179,8 +179,8 @@ } catch (const Exception &excpt_r ) { - // TranslatorExplanation %s = detailed low level (unstranslated) error message string error = excpt_r.msg(); + // TranslatorExplanation %s = detailed low level (unstranslated) error message errors.push_back(str::form(_("Couldn't restore repository.\nDetail: %s"), error.c_str())); } } Modified: trunk/zypper/src/zypper-keyring-callbacks.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-keyring-callbacks.h?rev=9641&r1=9640&r2=9641&view=diff ============================================================================== --- trunk/zypper/src/zypper-keyring-callbacks.h (original) +++ trunk/zypper/src/zypper-keyring-callbacks.h Tue Apr 15 11:25:31 2008 @@ -44,8 +44,8 @@ return true; } - // TranslatorExplanation: speaking of a file std::string question = boost::str(boost::format( + // TranslatorExplanation: speaking of a file _("%s is unsigned, continue?")) % file); return read_bool_answer(PROMPT_YN_GPG_UNSIGNED_FILE_ACCEPT, question, false); } @@ -71,8 +71,8 @@ return true; } - // TranslatorExplanation: speaking of a file std::string question = boost::str(boost::format( + // TranslatorExplanation: speaking of a file _("%s is signed with an unknown key %s. Continue?")) % file % id); return read_bool_answer(PROMPT_YN_GPG_UNKNOWN_KEY_ACCEPT, question, false); } Modified: trunk/zypper/src/zypper-misc.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-misc.cc?rev=9641&r1=9640&r2=9641&view=diff ============================================================================== --- trunk/zypper/src/zypper-misc.cc (original) +++ trunk/zypper/src/zypper-misc.cc Tue Apr 15 11:25:31 2008 @@ -259,7 +259,7 @@ if (!installer.item) { zypper.out().error( - // translators: meaning a package %s or provider of capability %s + // translators: meaning a package %s or provider of capability %s str::form(_("'%s' not found"), name.c_str())); WAR << str::form("'%s' not found", name.c_str()) << endl; zypper.setExitCode(ZYPPER_EXIT_INF_CAP_NOT_FOUND); @@ -754,9 +754,9 @@ "Choose from above solutions by number or skip, retry or cancel", solution_count); else - // translators: translate 'c' to whatever you translated the 'c' in - // "#/c" and "#/s/r/c" strings prompt_text = _PL( + // translators: translate 'c' to whatever you translated the 'c' in + // "c" and "s/r/c" strings "Choose the above solution using '1' or cancel using 'c'", "Choose from above solutions by number or cancel", solution_count); Modified: trunk/zypper/src/zypper-prompt.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-prompt.cc?rev=9641&r1=9640&r2=9641&view=diff ============================================================================== --- trunk/zypper/src/zypper-prompt.cc (original) +++ trunk/zypper/src/zypper-prompt.cc Tue Apr 15 11:25:31 2008 @@ -116,64 +116,6 @@ PromptOptions popts(_("a/r/i"), (unsigned int) default_action); zypper.out().prompt(pid, _("Abort, retry, ignore?"), popts); return get_prompt_reply(zypper, pid, popts); - -/* - Out & out = Zypper::instance()->out(); - // translators: "a/r/i" are the answers to the - // "Abort, retry, ignore?" prompt - // Translate the letters to whatever is suitable for your language. - // the answers must be separated by slash characters '/' and must - // correspond to abort/retry/ignore in that order. - // The answers should be lower case letters. - PromptOptions popts(_("a/r/i"), 0); - out.prompt(pid, _("Abort, retry, ignore?"), popts); - - // choose abort if no default has been specified - if (default_action == -1) { - default_action = 0; - } - - // non-interactive mode - if (Zypper::instance()->globalOpts().non_interactive) { - char c; - switch (default_action) { - case 0: c = 'a'; break; - case 1: c = 'r'; break; - case 2: c = 'i'; break; - default: c = '?'; - } - // print the answer for conveniecne (only for normal output) - out.info(string(1, c), Out::QUIET, Out::TYPE_NORMAL); - MIL << "answer: " << c << endl; - return default_action; - } - - // interactive mode, ask user - while (cin.good()) { // #269263 - char c; - cin >> c; - MIL << "answer: " << c << endl; - c = tolower (c); - MIL << "answer: " << c << endl; - if (c == 'a') - return 0; - else if (c == 'r') - return 1; - else if (c == 'i') - return 2; - else if (c == 0) - return default_action; - - // translators: don't translate the letters - ostringstream s; - s << format(_("Invalid answer '%s'.")) % c << " " - << _("Choose letter 'a', 'r', or 'i'"); - out.prompt(pid, s.str(), popts); //! \todo remove this, handle invalid answers within the first prompt() - DBG << "invalid answer" << endl; - } - - return default_action; - */ } // ---------------------------------------------------------------------------- @@ -185,56 +127,6 @@ PromptOptions popts(yn, default_answer ? 0 : 1); zypper.out().prompt(pid, question, popts); return !get_prompt_reply(zypper, pid, popts); - - /* - string yn = string(_("yes")) + "/" + _("no"); - - PromptOptions popts(yn, default_answer ? 0 : 1); - out.prompt(pid, question, popts); - - // non-interactive mode: print the answer for convenience (only for normal - // output) and return default - if (gopts.non_interactive) - { - if (!gopts.machine_readable) - out.info((default_answer ? _("yes") : _("no")), Out::QUIET, Out::TYPE_NORMAL); - MIL << "answer (default): " << (default_answer ? 'y' : 'n') << endl; - return default_answer; - } - - istream & stm = cin; - - string c; - bool been_here_before = false; - while (stm.good()) - { - if (been_here_before) - { - ostringstream s; - s << format(_("Invalid answer '%s'.")) % c << " " << format( - // TranslatorExplanation don't translate the 'y' and 'n', they can always be used as answers. - // The second and the third %s is the translated 'yes' and 'no' string (lowercase). - _("Enter 'y' for '%s' or 'n' for '%s' if nothing else works for you")) - % _("yes") % _("no"); - out.prompt(pid, s.str(), popts); //! \todo remove this, handle invalid answers within the first prompt() - } - c = zypp::str::getline (stm, zypp::str::TRIM); - if (rpmatch(c.c_str()) >= 0 || c.empty()) - break; - been_here_before = true; - } - - MIL << "answer: " << c << endl; - int answer = c.empty() ? default_answer : rpmatch(c.c_str()); - if (answer >= 0) - return answer; - else // in case of !stm.good() - { - WAR << "could not read answer, returning default: " - << (default_answer ? 'y' : 'n') << endl; - return default_answer; - } - */ } unsigned int get_prompt_reply(Zypper & zypper, Modified: trunk/zypper/src/zypper-repo-callbacks.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-repo-callbacks.h?rev=9641&r1=9640&r2=9641&view=diff ============================================================================== --- trunk/zypper/src/zypper-repo-callbacks.h (original) +++ trunk/zypper/src/zypper-repo-callbacks.h Tue Apr 15 11:25:31 2008 @@ -58,7 +58,7 @@ // seems this is never called, the progress is reported by the media backend anyway INT << "not impelmented" << endl; // TranslatorExplanation This text is a progress display label e.g. "Downloading delta [42%]" - //display_step( "apply-delta", _("Downloading delta") /*+ _delta.asString()*/, value ); + //display_step( "apply-delta", ~("Downloading delta") /*+ _delta.asString()*/, value ); return true; } @@ -173,7 +173,7 @@ // seems this is never called, the progress is reported by the media backend anyway INT << "not impelmented" << endl; // TranslatorExplanation This text is a progress display label e.g. "Downloading [42%]" -// display_step( "download-resolvable", _("Downloading") /* + resolvable_ptr->name() */, value ); +// display_step( "download-resolvable", ~("Downloading") /* + resolvable_ptr->name() */, value ); return true; } Modified: trunk/zypper/src/zypper.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper.cc?rev=9641&r1=9640&r2=9641&view=diff ============================================================================== --- trunk/zypper/src/zypper.cc (original) +++ trunk/zypper/src/zypper.cc Tue Apr 15 11:25:31 2008 @@ -501,8 +501,8 @@ case ZypperCommand::REMOVE_LOCK_e: case ZypperCommand::LIST_LOCKS_e: { - // TranslatorExplanation The %s is "--plus-repo" out().warning(boost::str(format( + // TranslatorExplanation The %s is "--plus-repo" _("The %s option has no effect here, ignoring.")) % "--plus-repo")); break; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org