1 /*
2 Copyright (c) 2005-2012 Alon Bar-Lev <alon.barlev@gmail.com>
3 Copyright (c) 2005-2012 Andrey Dubovik <andu@inbox.ru>
4 All rights reserved.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License version 2
8 as published by the Free Software Foundation.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program (see the file COPYING.GPL included with this
17 distribution); if not, write to the Free Software Foundation, Inc.,
18 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21 #include "messages.h"
22
23 namespace msg {
24
25 const char* copyright = (
26 "Copyright (c) 2005-2012 Alon Bar-Lev <alon.barlev@gmail.com>\n"
27 "Copyright (c) 2005-2012 Andrey Dubovik <http://www.yellowsite.ru>\n"
28 "\n"
29 "This is free software; see the source for copying conditions.\n"
30 "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
31 );
32
33 const char* usage = (
34 "Usage:\n"
35 " mp3unicode [options] file1 file2 ...\n"
36 "\n"
37 "Options:\n"
38 " -h, --help This help\n"
39 " -v, --version Version information\n"
40 " -s, --source-encoding=cp Current encoding, required\n"
41 " -1, --id3v1-encoding=t Target encoding, can be 'none' or an ANSI code page\n"
42 " -2, --id3v2-encoding=t Target encoding, can be 'none', an ANSI code page or 'unicode'\n"
43 " -p, --preserve-unicode Try not to reencode unicode.\n"
44 " -w, --preview Do not modify the files, just show converted tags.\n"
45 " -q, --quiet Do not report what files have been processed.\n"
46 "\n"
47 "To view available ANSI code pages, execute:\n"
48 " iconv --list\n"
49 "\n"
50 "Important: use 'unicode' instead of utf-8 or utf-16\n\n"
51 );
52
53 const char* wrong_senc = "Cannot open source encoding.\n";
54
55 const char* wrong_1enc = "Cannot open id3v1 encoding.\n";
56
57 const char* wrong_2enc = "Cannot open id3v2 encoding.\n";
58
59 const char* enc_error = "Error during encoding.\n";
60
61 const char* nosenc = "Please specify source encoding.\n";
62
63 const char* seehelp = "For help, type mp3unicode --help.\n";
64
65 const char* nofiles = "No files are given.\n";
66
67 const char* v1unicode = "ID3v1 does not support unicode.\n";
68
nofile(const std::string filename)69 std::string nofile(const std::string filename) {
70 return "Cannot open file: " + filename + ".";
71 }
72
emptyfile(const std::string filename)73 std::string emptyfile(const std::string filename) {
74 return filename + " does not contain any ID3 tags, skipping.\n";
75 }
76
writefail(const std::string filename)77 std::string writefail(const std::string filename) {
78 return filename + "failed!\n";
79 }
80
filedone(const std::string filename)81 std::string filedone(const std::string filename) {
82 return filename + "...done\n";
83 }
84
error(const std::string message)85 std::string error(const std::string message) {
86 return "Error: " + message + "\n";
87 }
88
89 }
90