SliTaz SliTaz Forum

You are not logged in.

#1 2015-10-09 20:22:01

llev
Member
Registered: 2011-12-09
Posts: 568

TazPkg beta: translation

Hi,

A few questions and remarks about the POT file tazpkg.pot:

- there is a spurious entry at lines 567-569: line 164 of modules/help has no gettext command (maybe I misunderstand, title() from libtaz does call gettext)

- I don't understand the meaning of the message "Check %s for reinstallation" line 193 of modules/remove: are we asking the user to manually check some file?

- I don't understand either "Matching packages name with version and desc" line 83 of modules/search: what is the search_in_packages_txt function used for?

- Is there a difference between "check upgrade" and "check updates"?

Your help will help me to help smile

Offline

#2 2015-10-09 22:25:39

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: TazPkg beta: translation

Hi llev,

Thank you for your interest and your help!

And here answers in the same order (it is not too handy to write using smartphone, so without citations).

Please leave '%s' as is. Title function contains gettext invocation inside it, and '%s' is a placeholder for string. I know it's disappointed, but I can't make other title without translation.

Check package for reinstallation. Example. SliTaz based on busybox. And busybox contains wget (/usr/bin/wget or something similar). It works if you call "wget" command, and you can make sure executing command "wget --help".) Now you installed package "wget", it contains "traditional" wget command, and it overwrites existing wget from busybox. At this point we say that file /usr/bin/wget is modified, and that package "wget" is modifier for package "busybox". And now you're decided to remove package "wget", module "remove" works. It checks and find that we need to reinstall original package "busybox" because original file /usr/bin/wget is gone, and we can restore it only if we reinstall whole package "busybox".

Matching name, version and description. Make your search query and tazpkg will find matches among all packages names, versions and descriptions. For example, you search for "gtk" and you'll find all packages with "gtk" inside it's names, and all packages with "gtk" inside it's descriptions, and maybe packages exists with "gtk" inside it's version.

Upgrade or updates. Can't recall smile Seems not a big difference. Recharge is an other thing when you're upgrade your package databases. But upgrade and updates seems the same.

Offline

#3 2015-10-09 23:32:44

Genesis
Member
Registered: 2014-07-03
Posts: 109

Re: TazPkg beta: translation

About "upgrades" and "updates":

As far as I know, "updates" refers to new versions of a software, like a new version of TazPakg, for example; "upgrades" refers to new improvements of hardware, like a new sound board, for example.

I hope this information could be useful.

Offline

#4 2015-10-09 23:41:01

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: TazPkg beta: translation

Hi Genesis,

I think you're right.

Also, update sounds like up-to-date. And our general goal is to keep the system up-to-date via packages updating.

And word "upgrade" exists in the Russian too, without translation. And yes, it means random changing of hardware parts to new and more powerful ones.

Offline

#5 2015-10-10 08:27:58

llev
Member
Registered: 2011-12-09
Posts: 568

Re: TazPkg beta: translation

Please leave '%s' as is.

OK. So do I put a translation of '%s', or must I leave the translation blank?

Check package for reinstallation.

Thanks for explanations. But I don't understand if tazpkg is going to automatically reinstall, or if the user has to do it by hand: the code reads

[c]for i in $REFRESH; do
  if [ "$(wc -l < "$INSTALLED/$i")" -gt 1 ]; then
    _ 'Check %s for reinstallation' "$INSTALLED/$i"
    continue
  fi
  rm -r "$INSTALLED/$i"
  tazpkg get-install ${i%/modifiers} --forced
done[/c]
and I don't understand this 'if' part. To me it looks like "if modifier is installed, skip", which would mean the user has to reinstall by hand in this case (because get-install is skipped).

Matching name, version and description.

OK, thanks.

Upgrade or updates.

I found that some distros use "upgrade" for a distro release update (commands like "dist-upgrade" in Debian-likes I think). But I don't think SliTaz does this, right? So maybe we need to use "update" everywhere to avoid confusing the users of other Linuxes?

Offline

#6 2015-10-10 09:01:35

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: TazPkg beta: translation

Hi,

So do I put a translation of '%s', or must I leave the translation blank?

Any you want. In the final it is the same: if gettext unable to find the translation, then it outputs the untranslated message. The resulting .mo file will be a few (about 10) Bytes smaller in this case. But putting '%s' to translation is better for i18n statistics.

and I don't understand this 'if' part. To me it looks like "if modifier is installed, skip", which would mean the user has to reinstall by hand in this case (because get-install is skipped).

Let's reproduce step by step.

[c]PACKAGE="wget"
REFRESH="busybox/modifiers"
wc -l < "$INSTALLED/$i" => 29
Check busybox/modifiers for reinstallation
continue[/c]
So I don't see here any automatic reinstall. Only message to user. sad

Really, if my busybox is modified by 29 other packages, I can't just reinstall it! Because all other 28 changes will be overwritten, in conjunction with "wget" I only need...

He-he, mad idea! We can download our "busybox", then extract it to the temporary folder, and install only needed files to the system. A sort of "partial installation"! Only "/usr/bin/wget" in our case.

(Note, yes, I know that Busybox's version of /usr/bin/wget is a 7 Bytes symlink, and can be recovered without whole package re-installation, but I am thinking about common processes.)

So maybe we need to use "update" everywhere to avoid confusing the users of other Linuxes?

Maybe, maybe… But it is "a bit too much" smile we find this "upgrade": in the code, documentation, tazpkg module…

Offline

#7 2015-10-10 14:44:15

llev
Member
Registered: 2011-12-09
Posts: 568

Re: TazPkg beta: translation

So I don't see here any automatic reinstall. Only message to user. sad

Well, no need to say ":(" I just wanted to know in order to translate correctly.

This said, maybe the English message could be more explicit, what do you think of

[c]--- remove      2015-10-08 20:15:08.305541151 +0200
+++ remove.new  2015-10-10 16:40:09.655847872 +0200
@@ -190,7 +190,7 @@
        if [ "$answer" -eq 0 ]; then
                for i in $REFRESH; do
                        if [ "$(wc -l < "$INSTALLED/$i")" -gt 1 ]; then
-                               _ 'Check %s for reinstallation' "$INSTALLED/$i"
+                               _ 'Package %s was modified by %s and other packages. It will not be reinstalled, check %s for reinstallation.' "${i%/modifiers}" "$PACKAGE" "$INSTALLED/$i"
                                continue
                        fi
                        rm -r "$INSTALLED/$i"[/c]
?

Note, yes, I know that Busybox's version of /usr/bin/wget is a 7 Bytes symlink, and can be recovered without whole package re-installation

Also note that wget link is recreated by post-remove()! So maybe wget should not be recorded as modifier of busybox?

(replacing upgrade by update)

OK. For now I will just remember to translate both by the same word!

Offline

#8 2015-10-13 19:44:13

llev
Member
Registered: 2011-12-09
Posts: 568

Re: TazPkg beta: translation

Hi,

Now I'm translating the TazPkg html doc. I'm puzzled by the description of the "pack" command:

"pack an unpacked or prepared package tree", all the more since it's inconsistent with the French translation already present in the current version of the doc (roughly: "pack an unpacked package or prepare its tree"). I've looked in the code (modules/pack) and found no trace tree preparation. (In the main script there's a TODO that I don't understand, "Cook also pack packages", maybe is it related?)

So, please enlighten me: can the "pack" command do more than packing a tree?

Thanks.

Offline

#9 2015-10-13 21:38:48

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: TazPkg beta: translation

Hi llev,

Sorry for the delay. I'll put your commits soon.

pack an unpacked or prepared package tree

There are two commands: [c]unpack[/c] and [c]pack[/c]. [c]Unpack[/c] is extracted the package, and then [c]pack[/c] can make the package back. What you can see after [c]unpack[/c]ing is: folder containing "receipt", maybe "description.txt", and "fs" folder. It IS "unpacked package tree". You can make your similar folders, and this will "prepared package tree".

roughly: "pack an unpacked package or prepare its tree"

First part is matched, but "prepare its tree" not.

Maybe, "pack an unpacked package or pack already prepared filesystem tree"?

can the "pack" command do more than packing a tree?

This command makes a package. Package contains: archived filesystem tree and other "service" files (receipt, description.txt, files.list, md5sum) where "receipt" is mandatory to create package, while others are optional. Note, only meta-packages may not included any files in "fs" folder and even "fs" folder itself.

In the main script there's a TODO that I don't understand, "Cook also pack packages"

We can make packages using "tazpkg" from "tazpkg" packages, or "cook" from "cookutils" package. Second way using cookutils is "official" way to make packages. There is cooking bot on the http://cook.slitaz.org/ to make all our packages anyone can download.

Offline

#10 2015-10-15 18:32:39

llev
Member
Registered: 2011-12-09
Posts: 568

Re: TazPkg beta: translation

Hi Aleksej,

Sorry for the delay.

If all the people I work with had such "delays", I would be more than happy!

Thanks for the details.

Did you consider my rephrasing in http://forum.slitaz.org/topic/tazpkg-beta-translation#post-39326 ?

Offline

#11 2015-10-24 21:21:30

llev
Member
Registered: 2011-12-09
Posts: 568

Re: TazPkg beta: translation

Hi Aleksej,

I've updated fr.po to translate the new strings.

Here is the new tazpkg.pot I got with "make pot", please check it is correct before pushing! (I mean: if you "make pot" on your side, do you get the same tazpkg.pot?)

http://www.cjoint.com/c/EJyvlmPSlxA

And here is the corresponding fr.po:

http://www.cjoint.com/c/EJyvlImDmBA

This time I used vim to edit, to avoid the mess caused by the "old" poedit.

Please also notice my posts about tazpkg HTML doc and slitaz-forge po file, in the i18n subforum. (edit: The slitaz-forge po file may allow you to remove the crazy Google translation on top of the Packages page: "S'il vous plaît nous aider à traduire ce site dans votre langue! Utilisez le forum." :-))

Have a nice Sunday. (I hope there will be Sun!)

Offline

#12 2015-10-24 22:54:23

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: TazPkg beta: translation

Hi llev,

Thank you for translations! I'll use them soon.

As for pkgs.slitaz.org — there is too much new lines, and I don't know French even a bit to forge “old” translations into “new”. I working now on pkgs web site new design and speed optimizations. Working in progress, and there is no new sources in the Hg repos yet. “Live” sources now available at pkgs.slitaz.org/src/.

If it's not too much trouble, please take a look at this: http://hg.slitaz.org/slitaz-forge/file/fbb1408344c6/pkgs/po/fr.po Some lines translated not so correct, and some missed. [edited]

And... I removed that ugly banner smile

I want to share with you our wonderful autumn sunny weather! Have a nice day wink

Offline

#13 2015-10-24 23:57:18

az_ua
Moderator
Registered: 2014-05-02
Posts: 284

Re: TazPkg beta: translation

> As for pkgs.slitaz.org — there is too much new lines

At least half of 'new lines' is really old, for example:

'Depends' now became 'Dependencies'

'Arch' -> 'Architecture' (useless item, remove it)

'Dependency tree for:' -> 'Dependency tree for package'

What is the reason of last? It is clear to undestand that we are searching for dependency tree for 'package'. If not clear - this user don't have a right to search for anything. With such changes, you can  search for translators to all languages for a years to translate ALREADY TRANSLATED items. Just replace all original msgid strings to new ones in all *.po files.

Offline

#14 2015-10-25 00:04:04

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: TazPkg beta: translation

Just replace all original msgid strings to new ones in all *.po files.

Really great idea, thank you.

Offline

#15 2015-10-25 09:18:45

llev
Member
Registered: 2011-12-09
Posts: 568

Re: TazPkg beta: translation

Hi Aleksej,

About pkgs.slitaz.org, no problem I will wait. Just tell when it's stable enough to be translated.

Offline

#16 2015-10-25 16:45:23

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: TazPkg beta: translation

Hi Lucas,

I'll inform you in few days, it's almost "stable" as for features provided, I plan to add few smallies and to work with algorithms mainly.

Offline

#17 2015-10-25 20:42:45

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: TazPkg beta: translation

Hi again, Lucas smile

I added your documentation and translation into Hg. Now its there starting from tazpkg-test-851.

I only changed a bit your html to match other tazpkg documentation files (not using <h2>, <h3> in the <header>s; use <h3> in <article>s; use custom <x-details> to hide additional info under plus sign).

Offline

#18 2015-10-25 21:09:53

llev
Member
Registered: 2011-12-09
Posts: 568

Re: TazPkg beta: translation

OK. I used a Wysiwyg editor (Seamonkey Composer) and it probably killed the x-details tags, sorry for that. About <header> tags, they were not highlighted so I added the <hN> ones to make them bigger.

Offline

#19 2015-10-25 21:16:05

llev
Member
Registered: 2011-12-09
Posts: 568

Re: TazPkg beta: translation

Mmmh, I just opened the old, partly-French doc in tazweb, and I find no "plus" sign. So at least it's not my editor's fault if x-details tags were missing smile But it turns out my editor is not so Wysiwyg, since it doesn't use the css!

What do you use to edit HTML docs?

Offline

#20 2015-10-25 21:17:57

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: TazPkg beta: translation

Seems Seamonkey Composer kills my <x-details>. It is custom tag (started with "x") I "invent" to make inline "spoilers". Original <details> tag not worked in our TazWeb and Midori because they based on old Webkit libraries, and it worked in the relative new Qt-based web browsers and in Firefox. But it provides block-level "spoiler" and I need inline one.

Adding <h#> into headers you ended with giant headers. But, maybe it is only on my side? Maybe I haven't upload my CSS styles into Hg? Hmm. Here it is:

[c]grep header /usr/share/doc/slitaz-doc.css

h2, body section > header { font-size: 200%; font-weight: 300; margin: 1em 0 0 0; text-transform: uppercase; }
h3, article > header { font-size: 150%; font-weight: 400; margin: 1em 0 0 0; }
body > header, #header { border-bottom: 4px solid; }
h1, h2, body section > header, h3, article > header { text-align: left; }
h2, body section > header { color: hsl(210, 90%, 45%); }
h3, article > header      { color: hsl( 30, 90%, 45%); }
body > header,
#header   { background-color: hsl(  0,  0%, 15%); }[/c]

Offline

#21 2015-10-25 21:24:16

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: TazPkg beta: translation

Please, check your slitaz-base-files package version. Now it's 286. And here the styles: http://hg.slitaz.org/slitaz-base-files/file/af25e2951d08/rootfs/usr/share/doc/slitaz-doc.css

I don't like visual html editor, just like to see the sources. I use Sublime Text to edit sources.

_____

PS. Oh, I think it not uses CSS (and JS) because of relative path to it!

[c]<link rel="stylesheet" href="../slitaz-doc.css">
<script src="../slitaz-doc.js"></script>[/c]
Normally these links pointed to [c]/usr/share/doc/slitaz-doc.css[/c] and [c]/usr/share/doc/slitaz-doc.js[/c] respectively.

Offline

#22 2015-10-26 21:23:17

llev
Member
Registered: 2011-12-09
Posts: 568

Re: TazPkg beta: translation

Thanks for the tips. Don't worry, I'm sure the problem is not on your side smile

I think it not uses CSS (and JS) because of relative path to it!

You're right, I change this and SM Composer now shows the proper style! Woohoo!

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.016 seconds, 7 queries executed - Memory usage: 1.59 MiB (Peak: 1.77 MiB) ]