Add translated “basic-snap-usage” tutorial #505

Merged
merged 4 commits into from Dec 4, 2017

Conversation

Projects
None yet
6 participants
Contributor

m4sk1n commented Nov 28, 2017

No description provided.

User is not a collaborator of this repo. Please start demo manually.

zyga approved these changes Nov 28, 2017

Thank you for translating this guide. I made some remarks (in English so that others can follow) and suggestions (in Polish). I'm not sure how many apply to the original rather than this translation but I focused on the text as presented here.

LGTM assuming those are sorted out.

+
+: Switch language: PL | [EN](tutorial/basic-snap-usage)
+
+Witamy w świecie snapów! W tym poradniku opisane zostaną podstawy korzystania z pakietów [snap] na Twojej dystrybucji Linuxa oraz poznasz korzyści wynikające z ich działania.
@zyga

zyga Nov 28, 2017

Maybe zostaną opisane, that sounds more natural to me. Just nitpicking.

@zyga

zyga Nov 28, 2017

nitpick: w Twojej dystrybucji, what do you think?

+**Arch**
+
+```bash
+$ sudo pacman -S snapd
@zyga

zyga Nov 28, 2017

This is actually confusing and wrong because the Arch maintainer has gone AWOL and we don't have a way to update the package. CC @bboozzoo who is both an Arch user, a snapd developer, a Canonical employee and a Polish speaker.

@bboozzoo

bboozzoo Nov 29, 2017

Not sure how to work around this. Guess we could try reaching out to the maintainer once more. FWIW there's a snapd-git package in AUR. It's also mentioned in Archwiki Snapd page right here: https://wiki.archlinux.org/index.php/snapd

The user can install the package using one of the AUR helpers (pacaur, yaourt or other) or manually by downloading the package build files.

+**Fedora**
+
+```bash
+$ sudo dnf copr enable zyga/snapcore
@zyga

zyga Nov 28, 2017

This should be dropped, Fedora ships snapd in their normal repository. (Please also ensure this is dropped in the original)

+# aktywuj usługę snapd:
+$ sudo systemctl enable --now snapd.service
+
+# wsparcie SELinux jest w fazie beta, obecnie:
@zyga

zyga Nov 28, 2017

I don't think this is something we should be recommending anymore CC @Conan-Kudo

@Conan-Kudo

Conan-Kudo Nov 29, 2017

Contributor

Yeah, this is not necessary at all, and hasn't been for a long time.

+# wsparcie SELinux jest w fazie beta, obecnie:
+$ sudo setenforce 0
+
+# aby zachować to ustawienie, edytuj plik /etc/selinux/config, dodaj ustawienia SELINUX=permissive i uruchom system ponownie.
@zyga

zyga Nov 28, 2017

If you decide to drop that please drop this paragraph as well.

+# aby zachować to ustawienie, edytuj plik /etc/selinux/config, dodaj ustawienia SELINUX=permissive i uruchom system ponownie.
+```
+
+**Gentoo**
@zyga

zyga Nov 28, 2017

Please remove gentoo. The overlay is not supported and there was no desire from the gentoo community to change that.

+**openSuSE**
+
+```bash
+$ sudo zypper addrepo http://download.opensuse.org/repositories/system:/snappy/openSUSE_Leap_42.2/ snappy
@zyga

zyga Nov 28, 2017

Actually this depends on the version of openSUSE you are using. (Leap or tumbleweed). Not sure what the perfect solution is here.

+W wersji 16.04 LTS desktop wszystko powinno być domyślnie aktywne. Na 14.04, wykonaj instalację poleceniem:
+
+```bash
+$ sudo apt install snapd
@zyga

zyga Nov 28, 2017

You have to ask the user to reboot after installing snapd because that will pull in a new kernel as a dependency.

+Ponieważ wszystko jest gotowe, zainstalujmy pierwszego snapa!
+
+negative
+: Ważne: obecnie wyłączyliśmy SELinux na niektórych dystrybucjach, ponieważ nie dostarcza ono pełnej izolacji i bezpieczeństwa na tych platformach. Ciężko pracujemy, aby wszystkie dystrybucje Linuxa mogły czerpać z tych możliwości jak najszybciej.
@zyga

zyga Nov 28, 2017

This can be dropped as this is more complex than this paragraph conveys.

+```
+
+positive
+: Informacja: kiedy zainstalujesz pierwszego snapa, snapd pobierze postawowy podsystem snapa (który zawiera niewielką liczbę aplikacji o wadze do kilku megabajtów). W rezultacie, czas pobrania pierwszego snapa może być trochę dłuższy niż w przypadku kolejnych.
@zyga

zyga Nov 28, 2017

I'd use precise language for referring to the core snap (or any base snap in general). Let's call this bazowy pakiet uruchomieniowy core. This package is around 87MB as of today. The rest in this paragraph is fine.

+: Informacja: kiedy zainstalujesz pierwszego snapa, snapd pobierze postawowy podsystem snapa (który zawiera niewielką liczbę aplikacji o wadze do kilku megabajtów). W rezultacie, czas pobrania pierwszego snapa może być trochę dłuższy niż w przypadku kolejnych.
+
+
+Aby uruchomić pakiet, wprowadź hello w wiersz poleceń (jest to polecenie dostarczone przez snap `hello`:
@zyga

zyga Nov 28, 2017

On some distributions you need to log-out and log-in to get $PATH changes that will allow you to run hello rather than snap run hello (snap is always in $PATH as it is installed in /usr/bin/snap while hello will be in either /snap/bin/hello or /var/lib/snapd/snap/bin/hello, depending on distribution used.

+Hello, world!
+```
+
+Oczywiście to tylko prosty przykład, który ma cechy wspólne dla wszystkich snapów, więc jest odizolowany i ma dostęp tylko do własnych danych.
@zyga

zyga Nov 28, 2017

Please use two sentences:

Oczywiście to tylko prosty przykład, który ma cechy wspólne dla wszystkich snapów. Aplikacja hello jest odizolowana i ma dostęp tylko do danych snapa w którym się znajduje.
+core 16.04.1 423 canonical -
+```
+
+Zauważ, że pakiet `core` zawierający podstawowy podsystem również znajduje się na liście. Zawiera on również aktualna wersję snapd, dzięki czemu będzie on zawsze aktualny.
@zyga

zyga Nov 28, 2017

Let's reuse the consistent language I suggested earlier.

@zyga

zyga Nov 28, 2017

Snapd can only keep itself up-to-date via the core snap on certain distributions. This list is altered over time, not sure how to best capture that.

+
+### Snapy mogą dodawać więcej niż jedno polecenie
+
+Nasz pierwszy przykład był prosty i zawierał tylko jedno polecenie, ale zwykle pakiety snap zawierają więcej niż jedno polecenie (na przykład zestaw narzędzi umieszczony w jednym snapie). Wszystkie te polecenia należą do przestrzeni nazw o nazwie pakietu. Wykonaj następujące kroki, aby zobaczyć przykład tego w działaniu:
@zyga

zyga Nov 28, 2017

Maybe przestrzeni nazw takej samej jak nazwa pakietu?

+
+
+positive
+: Informacja: pierwsze polecenie nie posiada przedrostka. To dlatego, że snapy mogą posiadać jedno domyślne polecenie.
@zyga

zyga Nov 28, 2017

Let's highlight that this domyślne polecenie must be exactly the same as the name of the snap itself.

+
+### Snap może również zawierać usługi
+
+Czym jest usługa? Jest to uruchomione na dłuższy czas (zwykle działające w tle) polecenie, które prawie zawsze ma na celu szybko odpowiadać na dane żądania.
@zyga

zyga Nov 28, 2017

I think the part about responding to requests quickly can be dropped as it is not the primary reason why services exist and is not helping the user to understand what they are. It's better to focus on the aspects of running in the background with the rest of the system rather than being explicitly started by the user.

+Czym jest usługa? Jest to uruchomione na dłuższy czas (zwykle działające w tle) polecenie, które prawie zawsze ma na celu szybko odpowiadać na dane żądania.
+Snapy mogą zawierać ogólnosystemowe usługi. Jeżeli zainstalujesz pakiet **shout** (webowy klient IRC), możesz wypróbować tą opcję w działaniu – po prostu przejdź do adresu [http://localhost:9000/] w przeglądarce, aby skorzystać z usługi.
+
+Usługi snapów są uruchamiane/zatrzymywane przy uruchamianiu/wyłączaniu systemu. Mogą zostać skonfigurowane, aby uruchamiały się na żądanie.
@zyga

zyga Nov 28, 2017

The aspect of being able to configure services not to start automatically is something I'd leave out as that is not a part of the design of snapd. This may work or may change in the future as snaps gain more control over their services (CC @stolowski who also speaks Polish and is working on the service parts)

+hello-world removed
+```
+
+Łatwo i przejrzyście, nic po nim nie pozostało! Kod aplikacji, jej zależności i dane użytkownika są usuwane. Jeżeli snap zawiera usługę, zostanie ona wyłączona i usunięta.
@zyga

zyga Nov 28, 2017

This is good but I would really strongly emphasize that user data belonging to that snap is automatically removed.

+### Zmiana kanału zainstalowanej aplikacji
+
+
+```bash
@zyga

zyga Nov 28, 2017

NOTE: we also have snap switch that just updates the channel that is being tracked but doesn't force a refresh. Not sure if that is something you want to document (or hint at).

+
+
+
+[snap]: http://snapcraft.io/
@zyga

zyga Nov 28, 2017

This list needs gardening based on my suggestions / remarks above.

@m4sk1n

m4sk1n Nov 28, 2017

Contributor

Corrected almost everything. The original also needs to be updated…

m4sk1n and others added some commits Nov 28, 2017

Add translated “basic-snap-usage” tutorial (Polish language)
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
Contributor

caldav commented Nov 29, 2017

Thanks @m4sk1n! I took the liberty of adding a new tag to your metadata. The rationale for that is issue #509.

zyga approved these changes Nov 29, 2017

LGTM with one more comment, sorry for not noticing earlier.

+sudo systemctl enable --now snapd.socket
+```
+
+**Debian (tylko Sid)**
@zyga

zyga Nov 29, 2017

Actually both stretch and sid :-) Sorry for not noticing earlier.

minor fix
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>

caldav approved these changes Dec 4, 2017

Thanks all for this contribution. Good job @m4sk1n! The mentioned changes will be added to the original one. 👍

+
+```bash
+$ sudo dnf install snapd
+$ sudo ln -s /var/lib/snapd/snap /snap
@Conan-Kudo

Conan-Kudo Dec 4, 2017

Contributor

This is not required, and please don't suggest it as something people should do by default.

@caldav

caldav Dec 4, 2017

Contributor

Thanks, dropping it

@caldav caldav merged commit 4198893 into canonical-websites:master Dec 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment