New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: merge all sharing methods under a single "Sharing content" page #1081

Merged
merged 7 commits into from Apr 18, 2018

Conversation

Projects
None yet
3 participants
@nodiscc
Member

nodiscc commented Feb 7, 2018

  • formatting, wording, reordering, general improvements
  • move blog/pastebin/notepad item from index.md to this page
  • add TODOs
  • update mkdocs TOC

Part of #598

@nodiscc nodiscc requested review from virtualtam and ArthurHoaro Feb 7, 2018

* You can also check the “Private” box so that the link is saved but only visible to you (the logged-in user).
* Click `Save`.
<!-- TODO Initial "Shaare" dialog should be titled "New Shaare" (consistent with "Edit Shaare" -->

This comment has been minimized.

@virtualtam

virtualtam Feb 8, 2018

Member

are these TODOs to be addressed by the present PR?

@virtualtam virtualtam added this to the 0.10.0 milestone Feb 8, 2018

## Editing Shaares
Any Shaare can edited by clicking its ![](https://raw.githubusercontent.com/shaarli/Shaarli/master/images/edit_icon.png) `Edit` button.

This comment has been minimized.

@ArthurHoaro

ArthurHoaro Feb 9, 2018

Member

Can you add it in the doc folder? It will most likely move soon.

--------------------------------------------------------------------------------
## Editing Shaares

This comment has been minimized.

@ArthurHoaro

ArthurHoaro Feb 9, 2018

Member

It would be worth mentioning that adding a link with an existent URL will in fact bring the edit view.

@@ -9,8 +9,7 @@
<div class="pure-u-lg-1-5 pure-u-1-24"></div>
<form method="post" name="linkform" class="page-form pure-u-lg-3-5 pure-u-22-24 page-form page-form-light">
<h2 class="window-title">
{if="!$link_is_new"}{'Edit'|t}{/if}
{'Shaare'|t}
{if="!$link_is_new"}{'Edit Shaare'|t}{else}{'New Shaare'|t}{/if}

This comment has been minimized.

@ArthurHoaro

ArthurHoaro Feb 9, 2018

Member

Are these keys present in the translation file?

* [Bookmarklet]
* [Firefox Share](#firefox-share)
* Third-party [apps and browser addons](Community-\&-Related-software.md#mobile-apps)

This comment has been minimized.

@ArthurHoaro

ArthurHoaro Feb 9, 2018

Member

Maybe mention the API and add a link to its documentation?

@ArthurHoaro

This comment has been minimized.

Member

ArthurHoaro commented Mar 26, 2018

Feel free to rebase and merge this when you have some free time @nodiscc :)

@nodiscc nodiscc self-assigned this Mar 27, 2018

@nodiscc

This comment has been minimized.

Member

nodiscc commented Apr 11, 2018

I havI have rebased on top of master but the tests are failing and I don't understand why:
https://travis-ci.org/shaarli/Shaarli/jobs/365319623

There were 2 failures:
1) Shaarli\LanguagesFrTest::testTranslateSingleIDGettext
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'permalien'
+'permalink'
/home/travis/build/shaarli/Shaarli/tests/languages/fr/LanguagesFrTest.php:66
2) Shaarli\LanguagesFrTest::testTranslatePluralIDGettext
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'shaare'
+'shaares'
/home/travis/build/shaarli/Shaarli/tests/languages/fr/LanguagesFrTest.php:93
@virtualtam

This comment has been minimized.

Member

virtualtam commented Apr 12, 2018

that's weird, I'll have a look at the Travis configuration as there have been issues with other builds

msgid "New Shaare"
msgstr "Nouveau Shaare"
#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16

This comment has been minimized.

@@ -764,6 +763,18 @@ msgstr "Tous les liens d'un jour sur une page."
msgid "Next day"
msgstr "Jour suivant"
#: tpl/editlink.html

This comment has been minimized.

@virtualtam

virtualtam Apr 14, 2018

Member

I think this entry is invalid as it points to a .html template file; the po file should be programatically generated/updated before translating with Poedit

nodiscc added some commits Feb 7, 2018

doc: merge all sharing methods under a single "Sharing content" page
 * formatting, wording, reordering, general improvements
 * move blog/pastebin/notepad item from index.md to this page
 * add TODOs
 * add the new page to mkdocs TOC

Part of #598
update PO strings for Edit/New Shaare
update french translation
doc: add edit_icon.png to git repository
optimize icon with optipng/pngcrush (3.30%)
@nodiscc

This comment has been minimized.

Member

nodiscc commented Apr 14, 2018

@virtualtam thank you for pointing out the duplicate translation string, I have removed it and now the tests are passing.

I did not use poedit and instead edited the file by hand, because my current environment does not allow me to run the cache generator script (https://gist.github.com/ArthurHoaro/5d0323f758ab2401ef444a53f54e9a07 - no webserver+PHP stack on my laptop, and running it from php-cli fails).

Running an update from poedit indeed detected the duplicate string. But it also messes up the whole .po file for me (it deletes a large chunk of translation strings because it cannot detect them due to the absence of cached/templated HTML files). This explains the manually added #: tpl/editlink.html. I don't think it would break anything: https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html

Comment lines starting with #: contain references to the program’s source code.
[...]
All comments, of either kind, are optional.

@virtualtam

This comment has been minimized.

Member

virtualtam commented Apr 14, 2018

@nodiscc if anything, editing translation files by hand is quite tedious, and a workaround for the PHP stack could be running it within a container so it's there only when you need it - this is exactly what I do on my laptops to avoid cluttering the distro with unused packages and services :)

@nodiscc nodiscc merged commit 3c0e27e into shaarli:master Apr 18, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment