i18n, initial translation to Swedish
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34050 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
fe9ca3bd8e
commit
e2fe56d7d4
|
@ -0,0 +1,18 @@
|
|||
1 svenska x-vnd.haiku.zip-o-matic 274748138
|
||||
1 file added. file:ZipOMaticWindow.cpp 1 fil tillagd.
|
||||
Stop file:ZipOMaticWindow.cpp Avbryt
|
||||
Creating archive: %s file:ZipOMaticWindow.cpp Skapar fil: %s
|
||||
Continue file:ZipOMaticWindow.cpp Fortsätt
|
||||
Preparing to archive file:ZipperThread.cpp Förbereder...
|
||||
Filename: %s file:ZipOMaticWindow.cpp Filnamn: %s
|
||||
Let them continue file:ZipOMatic.cpp Låt dem fortsätta
|
||||
Do you want to stop them? file:ZipOMatic.cpp Vill du avbryta dem?
|
||||
Are you sure you want to stop creating this archive? file:ZipOMaticWindow.cpp Vill du avbryta skapandet av den här filen?
|
||||
%ld files added. file:ZipOMaticWindow.cpp %ld filer tillagda.
|
||||
Stopped file:ZipOMaticWindow.cpp Avbruten
|
||||
Archive file:ZipperThread.cpp Arkiv
|
||||
Drop files to zip. file:ZipOMaticWindow.cpp Släpp filer här för att zippa dem.
|
||||
Error creating archive file:ZipOMaticWindow.cpp Något gick snett.
|
||||
You have %ld Zip-O-Matic running.\n\n file:ZipOMatic.cpp %ld Zip-O-Matic är igång.\n\n
|
||||
Archive created OK file:ZipOMaticWindow.cpp Zipfil skapad utan problem.
|
||||
Stop them file:ZipOMatic.cpp Avbryt dem
|
|
@ -9,6 +9,17 @@ Application ZipOMatic-Z :
|
|||
ZipOMaticWindow.cpp
|
||||
ZipperThread.cpp
|
||||
|
||||
: be tracker $(TARGET_LIBSUPC++)
|
||||
: be tracker $(TARGET_LIBSUPC++) liblocale.so
|
||||
: ZipOMatic.rdef
|
||||
;
|
||||
|
||||
DoCatalogs ZipOMatic-Z :
|
||||
x-vnd.haiku.zip-o-matic
|
||||
:
|
||||
ZipOMatic.cpp
|
||||
ZipOMaticWindow.cpp
|
||||
ZipperThread.cpp
|
||||
: en.catalog
|
||||
: sv.catkeys
|
||||
;
|
||||
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
#include "ZipOMaticWindow.h"
|
||||
|
||||
|
||||
#define TR_CONTEXT "file:ZipOMatic.cpp"
|
||||
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
|
@ -33,6 +36,7 @@ ZipOMatic::ZipOMatic()
|
|||
fGotRefs(false),
|
||||
fInvoker(new BInvoker(new BMessage(ZIPPO_QUIT_OR_CONTINUE), NULL, this))
|
||||
{
|
||||
be_locale->GetAppCatalog(&fCatalog);
|
||||
}
|
||||
|
||||
|
||||
|
@ -149,11 +153,15 @@ ZipOMatic::QuitRequested(void)
|
|||
// in that zippers are not paused while the BAlert is up.
|
||||
|
||||
BString question;
|
||||
question << "You have " << zippoCount;
|
||||
question << " Zip-O-Matic running.\n\nDo you want to stop them?";
|
||||
question << TR("You have %ld Zip-O-Matic running.\n\n");
|
||||
question << TR("Do you want to stop them?");
|
||||
|
||||
BString temp;
|
||||
temp << zippoCount;
|
||||
question.ReplaceFirst("%ld", temp.String());
|
||||
|
||||
BAlert* alert = new BAlert("Stop or Continue", question.String(),
|
||||
"Stop them", "Let them continue", NULL, B_WIDTH_AS_USUAL,
|
||||
BAlert* alert = new BAlert(NULL, question.String(),
|
||||
TR("Stop them"), TR("Let them continue"), NULL, B_WIDTH_AS_USUAL,
|
||||
B_WARNING_ALERT);
|
||||
alert->Go(fInvoker);
|
||||
alert->Activate();
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
|
||||
|
||||
#include <Application.h>
|
||||
#include <Catalog.h>
|
||||
#include <Invoker.h>
|
||||
#include <Locale.h>
|
||||
#include <Message.h>
|
||||
|
||||
|
||||
|
@ -26,6 +28,8 @@ private:
|
|||
|
||||
bool fGotRefs;
|
||||
BInvoker* fInvoker;
|
||||
|
||||
BCatalog fCatalog;
|
||||
};
|
||||
|
||||
#endif // _ZIPOMATIC_H_
|
||||
|
|
|
@ -14,11 +14,13 @@
|
|||
|
||||
#include <Alert.h>
|
||||
#include <Application.h>
|
||||
#include <Catalog.h>
|
||||
#include <Directory.h>
|
||||
#include <File.h>
|
||||
#include <FindDirectory.h>
|
||||
#include <GroupLayout.h>
|
||||
#include <LayoutBuilder.h>
|
||||
#include <Locale.h>
|
||||
#include <Path.h>
|
||||
#include <Roster.h>
|
||||
#include <Screen.h>
|
||||
|
@ -31,6 +33,9 @@
|
|||
#include "ZipperThread.h"
|
||||
|
||||
|
||||
#define TR_CONTEXT "file:ZipOMaticWindow.cpp"
|
||||
|
||||
|
||||
ZippoWindow::ZippoWindow(BList windowList, bool keepOpen)
|
||||
:
|
||||
BWindow(BRect(0, 0, 0, 0), "Zip-O-Matic", B_TITLED_WINDOW,
|
||||
|
@ -50,11 +55,11 @@ ZippoWindow::ZippoWindow(BList windowList, bool keepOpen)
|
|||
fArchiveNameView->SetExplicitAlignment(BAlignment(B_ALIGN_LEFT,
|
||||
B_ALIGN_VERTICAL_UNSET));
|
||||
|
||||
fZipOutputView = new BStringView("output_text", "Drop files to zip.");
|
||||
fZipOutputView = new BStringView("output_text", TR("Drop files to zip."));
|
||||
fZipOutputView->SetExplicitAlignment(BAlignment(B_ALIGN_LEFT,
|
||||
B_ALIGN_VERTICAL_UNSET));
|
||||
|
||||
fStopButton = new BButton("stop", "Stop", new BMessage(B_QUIT_REQUESTED));
|
||||
fStopButton = new BButton("stop", TR("Stop"), new BMessage(B_QUIT_REQUESTED));
|
||||
fStopButton->SetEnabled(false);
|
||||
fStopButton->SetExplicitAlignment(BAlignment(B_ALIGN_RIGHT,
|
||||
B_ALIGN_VERTICAL_UNSET));
|
||||
|
@ -102,9 +107,9 @@ ZippoWindow::MessageReceived(BMessage* message)
|
|||
fStopButton->SetEnabled(false);
|
||||
fArchiveNameView->SetText(" ");
|
||||
if (fZippingWasStopped)
|
||||
fZipOutputView->SetText("Stopped");
|
||||
fZipOutputView->SetText(TR("Stopped"));
|
||||
else
|
||||
fZipOutputView->SetText("Archive created OK");
|
||||
fZipOutputView->SetText(TR("Archive created OK"));
|
||||
|
||||
_CloseWindowOrKeepOpen();
|
||||
break;
|
||||
|
@ -115,16 +120,17 @@ ZippoWindow::MessageReceived(BMessage* message)
|
|||
fActivityView->Stop();
|
||||
fStopButton->SetEnabled(false);
|
||||
fArchiveNameView->SetText("");
|
||||
fZipOutputView->SetText("Error creating archive");
|
||||
fZipOutputView->SetText(TR("Error creating archive"));
|
||||
break;
|
||||
|
||||
case ZIPPO_TASK_DESCRIPTION:
|
||||
{
|
||||
BString string;
|
||||
if (message->FindString("archive_filename", &string) == B_OK) {
|
||||
fArchiveName = string;
|
||||
string.Prepend("Creating archive: ");
|
||||
fArchiveNameView->SetText(string.String());
|
||||
BString filename;
|
||||
if (message->FindString("archive_filename", &filename) == B_OK) {
|
||||
fArchiveName = filename;
|
||||
BString temp(TR("Creating archive: %s"));
|
||||
temp.ReplaceFirst("%s", filename.String());
|
||||
fArchiveNameView->SetText(temp.String());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -133,8 +139,7 @@ ZippoWindow::MessageReceived(BMessage* message)
|
|||
{
|
||||
BString string;
|
||||
if (message->FindString("zip_output", &string) == B_OK) {
|
||||
if (string.FindFirst("Adding: ") == 0
|
||||
|| string.FindFirst("Updating: ") == 0) {
|
||||
if (string.FindFirst("Adding: ") == 0) {
|
||||
|
||||
// This is a workaround for the current window resizing
|
||||
// behavior as the window resizes for each line of output.
|
||||
|
@ -143,22 +148,19 @@ ZippoWindow::MessageReceived(BMessage* message)
|
|||
// being created (added to) or if we're updating an
|
||||
// already existing archive.
|
||||
|
||||
BString output;
|
||||
fFileCount++;
|
||||
BString countString;
|
||||
countString << fFileCount;
|
||||
BString count;
|
||||
count << fFileCount;
|
||||
|
||||
if (fFileCount == 1)
|
||||
countString << " file";
|
||||
else
|
||||
countString << " files";
|
||||
if (fFileCount == 1) {
|
||||
output << TR("1 file added.");
|
||||
} else {
|
||||
output << TR("%ld files added.");
|
||||
output.ReplaceFirst("%ld", count.String());
|
||||
}
|
||||
|
||||
if (string.FindFirst("Adding: ") == 0)
|
||||
countString << " added.";
|
||||
|
||||
if (string.FindFirst("Updating: ") == 0)
|
||||
countString << " updated.";
|
||||
|
||||
fZipOutputView->SetText(countString.String());
|
||||
fZipOutputView->SetText(output.String());
|
||||
} else {
|
||||
fZipOutputView->SetText(string.String());
|
||||
}
|
||||
|
@ -202,11 +204,14 @@ ZippoWindow::QuitRequested()
|
|||
fActivityView->Pause();
|
||||
|
||||
BString message;
|
||||
message << "Are you sure you want to stop creating this archive?\n\n";
|
||||
message << "Filename: " << fArchiveName.String() << "\n";
|
||||
message << TR("Are you sure you want to stop creating this archive?");
|
||||
message << "\n\n";
|
||||
message << TR("Filename: %s");
|
||||
message << "\n";
|
||||
message.ReplaceFirst("%s", fArchiveName.String());
|
||||
|
||||
BAlert* alert = new BAlert(NULL, message.String(), "Stop",
|
||||
"Continue", NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||
BAlert* alert = new BAlert(NULL, message.String(), TR("Stop"),
|
||||
TR("Continue"), NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||
alert->Go(fWindowInvoker);
|
||||
|
||||
return false;
|
||||
|
@ -244,7 +249,7 @@ ZippoWindow::StopZipping()
|
|||
fThread = NULL;
|
||||
|
||||
fArchiveNameView->SetText(" ");
|
||||
fZipOutputView->SetText("Stopped");
|
||||
fZipOutputView->SetText(TR("Stopped"));
|
||||
|
||||
_CloseWindowOrKeepOpen();
|
||||
}
|
||||
|
|
|
@ -15,7 +15,9 @@
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <FindDirectory.h>
|
||||
#include <Catalog.h>
|
||||
#include <FindDirectory.h>
|
||||
#include <Locale.h>
|
||||
#include <Locker.h>
|
||||
#include <Message.h>
|
||||
#include <Path.h>
|
||||
|
@ -25,6 +27,9 @@
|
|||
#include "ZipOMaticWindow.h"
|
||||
|
||||
|
||||
#define TR_CONTEXT "file:ZipperThread.cpp"
|
||||
|
||||
|
||||
ZipperThread::ZipperThread(BMessage* refsMessage, BWindow* window)
|
||||
:
|
||||
GenericThread("ZipperThread", B_NORMAL_PRIORITY, refsMessage),
|
||||
|
@ -107,7 +112,7 @@ ZipperThread::ThreadStartup()
|
|||
BString archiveName;
|
||||
|
||||
if (refCount > 1)
|
||||
archiveName = "Archive";
|
||||
archiveName = TR("Archive");
|
||||
else
|
||||
archiveName = lastRef.name;
|
||||
|
||||
|
@ -165,7 +170,7 @@ ZipperThread::ThreadStartup()
|
|||
_SendMessageToWindow(ZIPPO_TASK_DESCRIPTION, "archive_filename",
|
||||
archiveName.String());
|
||||
_SendMessageToWindow(ZIPPO_LINE_OF_STDOUT, "zip_output",
|
||||
"Preparing to archive");
|
||||
TR("Preparing to archive"));
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue