diff --git a/.editorconfig b/.editorconfig index ef6e90b2..7692ac78 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,27 +6,5 @@ root = true [*] charset = utf-8 end_of_line = lf +trim_trailing_whitespaces = true indent_style = tab -trim_trailing_whitespace = true -insert_final_newline = true -quote_type = single -max_line_length = off - -[*.js] -quote_type = double -ij_javascript_use_double_quotes = true - -[*.yml] -indent_style = space -indent_size = 2 - -[*.xml] -indent_style = space -indent_size = 2 - -[*.json] -indent_style = space -indent_size = 2 - -[composer.json] -indent_size = 4 diff --git a/.tx/config b/.tx/config index 8542c680..710a560e 100644 --- a/.tx/config +++ b/.tx/config @@ -1,399 +1,399 @@ [main] -host = https://api.transifex.com +host = https://www.transifex.com -[o:Friendica:p:friendica:r:addon_advancedcontentfilter_messagespo] +[friendica.addon_advancedcontentfilter_messagespo] file_filter = advancedcontentfilter/lang//messages.po source_file = advancedcontentfilter/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_blackout_messagespo] +[friendica.addon_blackout_messagespo] file_filter = blackout/lang//messages.po source_file = blackout/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_blockem_messagespo] +[friendica.addon_blockem_messagespo] file_filter = blockem/lang//messages.po source_file = blockem/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_blogger_messagespo] +[friendica.addon_blogger_messagespo] file_filter = blogger/lang//messages.po source_file = blogger/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_buffer_messagespo] +[friendica.addon_buffer_messagespo] file_filter = buffer/lang//messages.po source_file = buffer/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_buglink_messagespo] +[friendica.addon_buglink_messagespo] file_filter = buglink/lang//messages.po source_file = buglink/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_catavatar_messagespo] +[friendica.addon_catavatar_messagespo] file_filter = catavatar/lang//messages.po source_file = catavatar/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_cookienotice_messagespo] +[friendica.addon_cookienotice_messagespo] file_filter = cookienotice/lang//messages.po source_file = cookienotice/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_curweather_messagespo] +[friendica.addon_curweather_messagespo] file_filter = curweather/lang//messages.po source_file = curweather/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_diaspora_messagespo] +[friendica.addon_diaspora_messagespo] file_filter = diaspora/lang//messages.po source_file = diaspora/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_dwpost_messagespo] +[friendica.addon_dwpost_messagespo] file_filter = dwpost/lang//messages.po source_file = dwpost/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_forumdirectory_messagespo] +[friendica.addon_forumdirectory_messagespo] file_filter = forumdirectory/lang//messages.po source_file = forumdirectory/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_fromapp_messagespo] +[friendica.addon_fromapp_messagespo] file_filter = fromapp/lang//messages.po source_file = fromapp/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_fromgplus_messagespo] +[friendica.addon_fromgplus_messagespo] file_filter = fromgplus/lang//messages.po source_file = fromgplus/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_geonames_messagespo] +[friendica.addon_geonames_messagespo] file_filter = geonames/lang//messages.po source_file = geonames/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_gnot_messagespo] +[friendica.addon_gnot_messagespo] file_filter = gnot/lang//messages.po source_file = gnot/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_gravatar_messagespo] +[friendica.addon_gravatar_messagespo] file_filter = gravatar/lang//messages.po source_file = gravatar/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_group_text_messagespo] +[friendica.addon_group_text_messagespo] file_filter = group_text/lang//messages.po source_file = group_text/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_ifttt_messagespo] +[friendica.addon_ifttt_messagespo] file_filter = ifttt/lang//messages.po source_file = ifttt/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_ijpost_messagespo] +[friendica.addon_ijpost_messagespo] file_filter = ijpost/lang//messages.po source_file = ijpost/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_impressum_messagespo] +[friendica.addon_impressum_messagespo] file_filter = impressum/lang//messages.po source_file = impressum/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_infiniteimprobabilitydrive_messagespo] +[friendica.addon_infiniteimprobabilitydrive_messagespo] file_filter = infiniteimprobabilitydrive/lang//messages.po source_file = infiniteimprobabilitydrive/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_irc_messagespo] +[friendica.addon_irc_messagespo] file_filter = irc/lang//messages.po source_file = irc/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_jappixmini_messagespo] +[friendica.addon_jappixmini_messagespo] file_filter = jappixmini/lang//messages.po source_file = jappixmini/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_js_upload_messagespo] +[friendica.addon_js_upload_messagespo] file_filter = js_upload/lang//messages.po source_file = js_upload/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_krynn_messagespo] +[friendica.addon_krynn_messagespo] file_filter = krynn/lang//messages.po source_file = krynn/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_langfilter_messagespo] +[friendica.addon_langfilter_messagespo] file_filter = langfilter/lang//messages.po source_file = langfilter/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_libertree_messagespo] +[friendica.addon_libertree_messagespo] file_filter = libertree/lang//messages.po source_file = libertree/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_libravatar_messagespo] +[friendica.addon_libravatar_messagespo] file_filter = libravatar/lang//messages.po source_file = libravatar/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_ljpost_messagespo] +[friendica.addon_ljpost_messagespo] file_filter = ljpost/lang//messages.po source_file = ljpost/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_mailstream_messagespo] +[friendica.addon_mailstream_messagespo] file_filter = mailstream/lang//messages.po source_file = mailstream/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_mathjax_messagespo] +[friendica.addon_mathjax_messagespo] file_filter = mathjax/lang//messages.po source_file = mathjax/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_membersince_messagespo] +[friendica.addon_membersince_messagespo] file_filter = membersince/lang//messages.po source_file = membersince/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_morechoice_messagespo] +[friendica.addon_morechoice_messagespo] file_filter = morechoice/lang//messages.po source_file = morechoice/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_morepokes_messagespo] +[friendica.addon_morepokes_messagespo] file_filter = morepokes/lang//messages.po source_file = morepokes/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_newmemberwidget_messagespo] +[friendica.addon_newmemberwidget_messagespo] file_filter = newmemberwidget/lang//messages.po source_file = newmemberwidget/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_notifyall_messagespo] +[friendica.addon_notifyall_messagespo] file_filter = notifyall/lang//messages.po source_file = notifyall/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_notimeline_messagespo] +[friendica.addon_notimeline_messagespo] file_filter = notimeline/lang//messages.po source_file = notimeline/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_nsfw_messagespo] +[friendica.addon_nsfw_messagespo] file_filter = nsfw/lang//messages.po source_file = nsfw/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_numfriends_messagespo] +[friendica.addon_numfriends_messagespo] file_filter = numfriends/lang//messages.po source_file = numfriends/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_openstreetmap_messagespo] +[friendica.addon_openstreetmap_messagespo] file_filter = openstreetmap/lang//messages.po source_file = openstreetmap/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_pageheader_messagespo] +[friendica.addon_pageheader_messagespo] file_filter = pageheader/lang//messages.po source_file = pageheader/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_piwik_messagespo] +[friendica.addon_piwik_messagespo] file_filter = piwik/lang//messages.po source_file = piwik/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_planets_messagespo] +[friendica.addon_planets_messagespo] file_filter = planets/lang//messages.po source_file = planets/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_public_server_messagespo] +[friendica.addon_public_server_messagespo] file_filter = public_server/lang//messages.po source_file = public_server/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_pumpio_messagespo] +[friendica.addon_pumpio_messagespo] file_filter = pumpio/lang//messages.po source_file = pumpio/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_qcomment_messagespo] +[friendica.addon_qcomment_messagespo] file_filter = qcomment/lang//messages.po source_file = qcomment/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_randplace_messagespo] +[friendica.addon_randplace_messagespo] file_filter = randplace/lang//messages.po source_file = randplace/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_remote_permissions_messagespo] +[friendica.addon_remote_permissions_messagespo] file_filter = remote_permissions/lang//messages.po source_file = remote_permissions/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_rendertime_messagespo] +[friendica.addon_rendertime_messagespo] file_filter = rendertime/lang//messages.po source_file = rendertime/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_securemail_messagespo] +[friendica.addon_securemail_messagespo] file_filter = securemail/lang//messages.po source_file = securemail/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_showmore_messagespo] +[friendica.addon_showmore_messagespo] file_filter = showmore/lang//messages.po source_file = showmore/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_smileybutton_messagespo] +[friendica.addon_smileybutton_messagespo] file_filter = smileybutton/lang//messages.po source_file = smileybutton/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_startpage_messagespo] +[friendica.addon_startpage_messagespo] file_filter = startpage/lang//messages.po source_file = startpage/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_statusnet_messagespo] +[friendica.addon_statusnet_messagespo] file_filter = statusnet/lang//messages.po source_file = statusnet/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_superblock_messagespo] +[friendica.addon_superblock_messagespo] file_filter = superblock/lang//messages.po source_file = superblock/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_testdrive_messagespo] +[friendica.addon_testdrive_messagespo] file_filter = testdrive/lang//messages.po source_file = testdrive/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_tictac_messagespo] +[friendica.addon_tictac_messagespo] file_filter = tictac/lang//messages.po source_file = tictac/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_tumblr_messagespo] +[friendica.addon_tumblr_messagespo] file_filter = tumblr/lang//messages.po source_file = tumblr/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_twitter_messagespo] +[friendica.addon_twitter_messagespo] file_filter = twitter/lang//messages.po source_file = twitter/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_viewsrc_messagespo] +[friendica.addon_viewsrc_messagespo] file_filter = viewsrc/lang//messages.po source_file = viewsrc/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_webrtc_messagespo] +[friendica.addon_webrtc_messagespo] file_filter = webrtc/lang//messages.po source_file = webrtc/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_widgets_messagespo] +[friendica.addon_widgets_messagespo] file_filter = widgets/lang//messages.po source_file = widgets/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_windowsphonepush_messagespo] +[friendica.addon_windowsphonepush_messagespo] file_filter = windowsphonepush/lang//messages.po source_file = windowsphonepush/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_wppost_messagespo] +[friendica.addon_wppost_messagespo] file_filter = wppost/lang//messages.po source_file = wppost/lang/C/messages.po source_lang = en -type = PO +type = PO -[o:Friendica:p:friendica:r:addon_xmpp_messagespo] +[friendica.addon_xmpp_messagespo] file_filter = xmpp/lang//messages.po source_file = xmpp/lang/C/messages.po source_lang = en -type = PO +type = PO diff --git a/.woodpecker/.code_standards_check.yml b/.woodpecker/.code_standards_check.yml index 60a1bd2a..9d59dc08 100644 --- a/.woodpecker/.code_standards_check.yml +++ b/.woodpecker/.code_standards_check.yml @@ -1,12 +1,9 @@ skip_clone: true -steps: +pipeline: clone_friendica_base: image: alpine/git commands: - - git config --global user.email "no-reply@friendi.ca" - - git config --global user.name "Friendica" - - git config --global --add safe.directory $CI_WORKSPACE - git clone https://github.com/friendica/friendica.git . - git checkout $CI_COMMIT_BRANCH when: @@ -16,7 +13,7 @@ steps: commands: - git config --global user.email "no-reply@friendi.ca" - git config --global user.name "Friendica" - - git clone $CI_REPO_CLONE_URL addon + - git clone $CI_REPO_LINK addon - cd addon/ - git checkout $CI_COMMIT_BRANCH - git fetch origin $CI_COMMIT_REF @@ -56,10 +53,6 @@ steps: - /tmp/drone-cache:/tmp/cache when: event: pull_request - phpstan: - image: friendicaci/php8.3:php8.3.3 - commands: - - ./bin/composer.phar run phpstan; check: image: friendicaci/php-cs commands: diff --git a/.woodpecker/.continuous-deployment-allinone.yml b/.woodpecker/.continuous-deployment-allinone.yml deleted file mode 100644 index 8d608db8..00000000 --- a/.woodpecker/.continuous-deployment-allinone.yml +++ /dev/null @@ -1,115 +0,0 @@ -# This prevents executing this pipeline at other servers than ci.friendi.ca -labels: - location: friendica - type: releaser - -skip_clone: true - -steps: - clone_friendica_base: - image: alpine/git - commands: - - git config --global user.email "no-reply@friendi.ca" - - git config --global user.name "Friendica" - - git config --global --add safe.directory $CI_WORKSPACE - - git clone https://github.com/friendica/friendica.git . - - git checkout $CI_COMMIT_BRANCH - when: - repo: friendica/friendica-addons - branch: [ develop, '*-rc' ] - event: push - clone_friendica_addon: - image: alpine/git - commands: - - git config --global user.email "no-reply@friendi.ca" - - git config --global user.name "Friendica" - - git clone $CI_REPO_CLONE_URL addon - - cd addon/ - - git checkout $CI_COMMIT_BRANCH - - git fetch origin $CI_COMMIT_REF - - git merge $CI_COMMIT_SHA - when: - repo: friendica/friendica-addons - branch: [ develop, '*-rc' ] - event: push - restore_cache: - image: meltwater/drone-cache:dev - settings: - backend: "filesystem" - restore: true - cache_key: "{{ .Repo.Name }}_php7.4_{{ arch }}_{{ os }}" - archive_format: "gzip" - mount: - - '.composer' - volumes: - - /tmp/drone-cache:/tmp/cache - when: - repo: friendica/friendica-addons - branch: [ develop, '*-rc' ] - event: push - composer_install: - image: friendicaci/php8.2:php8.2.28 - commands: - - export COMPOSER_HOME=.composer - - composer validate - - composer install --no-dev --optimize-autoloader - volumes: - - /etc/hosts:/etc/hosts - when: - repo: friendica/friendica-addons - branch: [ develop, '*-rc' ] - event: push - create_artifacts: - image: debian - commands: - - apt-get update - - apt-get install bzip2 - - mkdir ./build - - export VERSION="$(cat VERSION)" - - export RELEASE="friendica-all-in-one-$VERSION" - - export ARTIFACT="$RELEASE.tar.gz" - - tar - --exclude='.tx' - --exclude='.git' - --exclude='.editorconfig' - --exclude='.gitattributes' - --exclude='.gitignore' - --exclude='.woodpecker' - --exclude='**/*/messages.po' - -cvzf ./build/$ARTIFACT / - - cd ./build - - sha256sum "$ARTIFACT" > "$ARTIFACT.sum256" - - chmod 664 ./* - - ls -lh - - cat "$ARTIFACT.sum256" - - sha256sum "$ARTIFACT" - when: - repo: friendica/friendica-addons - branch: [ develop, '*-rc' ] - event: push - sign_artifacts: - image: plugins/gpgsign - settings: - key: - from_secret: gpg_key - passphrase: - from_secret: gpg_password - files: - - build/* - exclude: - - build/*.sum256 - detach_sign: true - when: - repo: friendica/friendica-addons - branch: [ develop, '*-rc' ] - event: push - publish_artifacts: - image: alpine - commands: - - cp -fr build/* /tmp/friendica_files/ - volumes: - - files:/tmp/friendica_files - when: - repo: friendica/friendica-addons - branch: [ develop, '*-rc' ] - event: push diff --git a/.woodpecker/.continuous-deployment.yml b/.woodpecker/.continuous-deployment.yml index d6d8a22a..ab6e07e9 100644 --- a/.woodpecker/.continuous-deployment.yml +++ b/.woodpecker/.continuous-deployment.yml @@ -5,13 +5,10 @@ labels: skip_clone: true -steps: +pipeline: clone_friendica_base: image: alpine/git commands: - - git config --global user.email "no-reply@friendi.ca" - - git config --global user.name "Friendica" - - git config --global --add safe.directory $CI_WORKSPACE - git clone https://github.com/friendica/friendica.git . - git checkout $CI_COMMIT_BRANCH when: @@ -23,7 +20,7 @@ steps: commands: - git config --global user.email "no-reply@friendi.ca" - git config --global user.name "Friendica" - - git clone $CI_REPO_CLONE_URL addon + - git clone $CI_REPO_LINK addon - cd addon/ - git checkout $CI_COMMIT_BRANCH - git fetch origin $CI_COMMIT_REF @@ -48,7 +45,7 @@ steps: branch: [ develop, '*-rc' ] event: push composer_install: - image: friendicaci/php8.2:php8.2.28 + image: friendicaci/php7.4:php7.4.33 commands: - export COMPOSER_HOME=.composer - composer validate diff --git a/.woodpecker/.messages.po_check.yml b/.woodpecker/.messages.po_check.yml index e0239dcd..f5691e00 100644 --- a/.woodpecker/.messages.po_check.yml +++ b/.woodpecker/.messages.po_check.yml @@ -1,12 +1,9 @@ skip_clone: true -steps: +pipeline: clone_friendica_base: image: alpine/git commands: - - git config --global user.email "no-reply@friendi.ca" - - git config --global user.name "Friendica" - - git config --global --add safe.directory $CI_WORKSPACE - git clone https://github.com/friendica/friendica.git . - git checkout $CI_COMMIT_BRANCH when: @@ -16,7 +13,7 @@ steps: commands: - git config --global user.email "no-reply@friendi.ca" - git config --global user.name "Friendica" - - git clone $CI_REPO_CLONE_URL addon + - git clone $CI_REPO_LINK addon - cd addon/ - git checkout $CI_COMMIT_BRANCH - git fetch origin $CI_COMMIT_REF diff --git a/.woodpecker/.phpunit.yml b/.woodpecker/.phpunit.yml deleted file mode 100644 index b0745ad0..00000000 --- a/.woodpecker/.phpunit.yml +++ /dev/null @@ -1,120 +0,0 @@ -matrix: - include: - - PHP_MAJOR_VERSION: 7.4 - PHP_VERSION: 7.4.33 - - PHP_MAJOR_VERSION: 8.0 - PHP_VERSION: 8.0.30 - - PHP_MAJOR_VERSION: 8.1 - PHP_VERSION: 8.1.31 - - PHP_MAJOR_VERSION: 8.2 - PHP_VERSION: 8.2.28 - - PHP_MAJOR_VERSION: 8.3 - PHP_VERSION: 8.3.17 - - PHP_MAJOR_VERSION: 8.4 - PHP_VERSION: 8.4.5 - -# This forces PHP Unit executions at the "opensocial" labeled location (because of much more power...) -labels: - location: opensocial - -skip_clone: true - -steps: - clone_friendica_base: - image: alpine/git - commands: - - git config --global user.email "no-reply@friendi.ca" - - git config --global user.name "Friendica" - - git config --global --add safe.directory $CI_WORKSPACE - - git clone https://github.com/friendica/friendica.git . - - git checkout $CI_COMMIT_BRANCH - clone_friendica_addon: - image: alpine/git - commands: - - git config --global user.email "no-reply@friendi.ca" - - git config --global user.name "Friendica" - - git clone $CI_REPO_CLONE_URL addon - - cd addon/ - - git checkout $CI_COMMIT_BRANCH - - git fetch origin $CI_COMMIT_REF - - git merge $CI_COMMIT_SHA - restore_cache: - image: meltwater/drone-cache:dev - settings: - backend: "filesystem" - restore: true - cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}" - archive_format: "gzip" - mount: - - '.composer' - volumes: - - /tmp/drone-cache:/tmp/cache - composer_install: - image: friendicaci/php${PHP_MAJOR_VERSION}:php${PHP_VERSION} - commands: - - export COMPOSER_HOME=.composer - - ./bin/composer.phar validate - - ./bin/composer.phar install --prefer-dist - volumes: - - /etc/hosts:/etc/hosts - rebuild_cache: - image: meltwater/drone-cache:dev - settings: - backend: "filesystem" - rebuild: true - cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}" - archive_format: "gzip" - mount: - - '.composer' - volumes: - - /tmp/drone-cache:/tmp/cache - test: - image: friendicaci/php${PHP_MAJOR_VERSION}:php${PHP_VERSION} - environment: - MYSQL_HOST: "mariadb" - MYSQL_PORT: "3306" - MYSQL_DATABASE: "test" - MYSQL_PASSWORD: "test" - MYSQL_USER: "test" - REDIS_HOST: "redis" - MEMCACHED_HOST: "memcached" - MEMCACHE_HOST: "memcached" - commands: - - cp config/local-sample.config.php config/local.config.php - - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi - - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql - - if [ "${PHP_MAJOR_VERSION}" = "8.2" -a "${CI_REPO}" = "friendica/friendica-addons" ]; then - phpenmod xdebug; - export XDEBUG_MODE=coverage; - phpunit --configuration tests/phpunit-addons.xml --coverage-clover clover.xml; - else - phpunit --configuration tests/phpunit-addons.xml; - fi - codecov: - image: friendicaci/codecov - when: - matrix: - PHP_MAJOR_VERSION: 8.2 - PHP_VERSION: 8.2.16 - repo: - - friendica/friendica-addons - commands: - - codecov -R '.' -Z -f 'clover.xml' - environment: - CODECOV_TOKEN: - from_secret: codecov-token - -services: - mariadb: - image: mariadb:latest - environment: - MYSQL_ALLOW_EMPTY_PASSWORD: "true" - MYSQL_DATABASE: "test" - MYSQL_PASSWORD: "test" - MYSQL_USER: "test" - - memcached: - image: memcached - - redis: - image: redis diff --git a/.woodpecker/.releaser.yml b/.woodpecker/.releaser.yml index 7407f2bc..4a661937 100644 --- a/.woodpecker/.releaser.yml +++ b/.woodpecker/.releaser.yml @@ -5,13 +5,10 @@ labels: skip_clone: true -steps: +pipeline: clone_friendica_base: image: alpine/git commands: - - git config --global user.email "no-reply@friendi.ca" - - git config --global user.name "Friendica" - - git config --global --add safe.directory $CI_WORKSPACE - git clone https://github.com/friendica/friendica.git . - git checkout $CI_COMMIT_BRANCH when: @@ -22,7 +19,7 @@ steps: commands: - git config --global user.email "no-reply@friendi.ca" - git config --global user.name "Friendica" - - git clone $CI_REPO_CLONE_URL addon + - git clone $CI_REPO_LINK addon - cd addon/ - git checkout $CI_COMMIT_BRANCH - git fetch origin $CI_COMMIT_REF @@ -45,7 +42,7 @@ steps: repo: friendica/friendica-addons event: tag composer_install: - image: friendicaci/php8.2:php8.2.28 + image: friendicaci/php7.4:php7.4.33 commands: - export COMPOSER_HOME=.composer - composer validate diff --git a/README.md b/README.md index 82029288..6a3202bb 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,6 @@ See the [documentation](https://github.com/friendica/friendica/blob/stable/doc/A ## Translation Addons can be translated like any other part of Friendica. -Translation for addons is done at [the Transifex Friendica page](https://app.transifex.com/Friendica/friendica/dashboard/). +Translation for addons is done at [the Transifex Friendica page](https://www.transifex.com/Friendica/friendica/dashboard/). Read more about the workflow in the [Friendica translation documentation](https://github.com/friendica/friendica/blob/stable/doc/translations.md#addon). diff --git a/advancedcontentfilter/advancedcontentfilter.js b/advancedcontentfilter/advancedcontentfilter.js index a8fc1c65..fcf7b096 100644 --- a/advancedcontentfilter/advancedcontentfilter.js +++ b/advancedcontentfilter/advancedcontentfilter.js @@ -54,7 +54,7 @@ new Vue({ self.rules.push(responseJSON.rule); self.resetForm(); }, function (response) { - self.errorMessage = response.responseJSON.exception[0].message; + self.errorMessage = response.responseJSON.message; }); } }, @@ -74,7 +74,7 @@ new Vue({ self.rules[self.editedIndex] = rule; self.resetForm(); }, function (response) { - self.errorMessage = response.responseJSON.exception[0].message; + self.errorMessage = response.responseJSON.message; }); }, diff --git a/advancedcontentfilter/advancedcontentfilter.php b/advancedcontentfilter/advancedcontentfilter.php index 53cb9ebe..2254e587 100644 --- a/advancedcontentfilter/advancedcontentfilter.php +++ b/advancedcontentfilter/advancedcontentfilter.php @@ -33,13 +33,16 @@ * */ +use Friendica\App; use Friendica\BaseModule; use Friendica\Content\Text\Markdown; use Friendica\Core\Hook; +use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\Database\DBA; use Friendica\Database\DBStructure; use Friendica\DI; +use Friendica\Model\Item; use Friendica\Model\Post; use Friendica\Model\Tag; use Friendica\Model\User; @@ -61,7 +64,7 @@ function advancedcontentfilter_install() Hook::add('dbstructure_definition' , __FILE__, 'advancedcontentfilter_dbstructure_definition'); DBStructure::performUpdate(); - DI::logger()->notice('installed advancedcontentfilter'); + Logger::notice('installed advancedcontentfilter'); } /* @@ -120,22 +123,21 @@ function advancedcontentfilter_prepare_body_content_filter(&$hook_data) $expressionLanguage = new ExpressionLanguage\ExpressionLanguage(); } - $uid = $hook_data['uid'] ?? DI::userSession()->getLocalUserId(); - if (!$uid) { + if (!DI::userSession()->getLocalUserId()) { return; } $vars = advancedcontentfilter_get_filter_fields($hook_data['item']); - $rules = DI::cache()->get('rules_' . $uid); + $rules = DI::cache()->get('rules_' . DI::userSession()->getLocalUserId()); if (!isset($rules)) { $rules = DBA::toArray(DBA::select( 'advancedcontentfilter_rules', ['name', 'expression', 'serialized'], - ['uid' => $uid, 'active' => true] + ['uid' => DI::userSession()->getLocalUserId(), 'active' => true] )); - DI::cache()->set('rules_' . $uid, $rules); + DI::cache()->set('rules_' . DI::userSession()->getLocalUserId(), $rules); } if ($rules) { @@ -188,32 +190,11 @@ function advancedcontentfilter_module() {} function advancedcontentfilter_init() { if (DI::args()->getArgc() > 1 && DI::args()->getArgv()[1] == 'api') { - $slim = \Slim\Factory\AppFactory::create(); + $slim = new \Slim\App(); - /** - * The routing middleware should be added before the ErrorMiddleware - * Otherwise exceptions thrown from it will not be handled - */ - $slim->addRoutingMiddleware(); - - $slim->addErrorMiddleware(true, true, true, DI::logger()); - - // register routes - $slim->group('/advancedcontentfilter/api', function (\Slim\Routing\RouteCollectorProxy $app) { - $app->group('/rules', function (\Slim\Routing\RouteCollectorProxy $app) { - $app->get('', 'advancedcontentfilter_get_rules'); - $app->post('', 'advancedcontentfilter_post_rules'); - - $app->get('/{id}', 'advancedcontentfilter_get_rules_id'); - $app->put('/{id}', 'advancedcontentfilter_put_rules_id'); - $app->delete('/{id}', 'advancedcontentfilter_delete_rules_id'); - }); - - $app->group('/variables', function (\Slim\Routing\RouteCollectorProxy $app) { - $app->get('/{guid}', 'advancedcontentfilter_get_variables_guid'); - }); - }); + require __DIR__ . '/src/middlewares.php'; + require __DIR__ . '/src/routes.php'; $slim->run(); exit; @@ -271,8 +252,8 @@ function advancedcontentfilter_content() 'rule_expression' => DI::l10n()->t('Rule Expression'), 'cancel' => DI::l10n()->t('Cancel'), ], - '$current_theme' => DI::appHelper()->getCurrentTheme(), - '$rules' => DBA::toArray(DBA::select('advancedcontentfilter_rules', [], ['uid' => DI::userSession()->getLocalUserId()])), + '$current_theme' => DI::app()->getCurrentTheme(), + '$rules' => advancedcontentfilter_get_rules(), '$form_security_token' => BaseModule::getFormSecurityToken() ]); } @@ -324,7 +305,7 @@ function advancedcontentfilter_build_fields($data) * API */ -function advancedcontentfilter_get_rules(ServerRequestInterface $request, ResponseInterface $response): ResponseInterface +function advancedcontentfilter_get_rules() { if (!DI::userSession()->getLocalUserId()) { throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method')); @@ -332,8 +313,7 @@ function advancedcontentfilter_get_rules(ServerRequestInterface $request, Respon $rules = DBA::toArray(DBA::select('advancedcontentfilter_rules', [], ['uid' => DI::userSession()->getLocalUserId()])); - $response->getBody()->write(json_encode($rules)); - return $response->withHeader('Content-Type', 'application/json'); + return json_encode($rules); } function advancedcontentfilter_get_rules_id(ServerRequestInterface $request, ResponseInterface $response, $args) @@ -344,11 +324,10 @@ function advancedcontentfilter_get_rules_id(ServerRequestInterface $request, Res $rule = DBA::selectFirst('advancedcontentfilter_rules', [], ['id' => $args['id'], 'uid' => DI::userSession()->getLocalUserId()]); - $response->getBody()->write(json_encode($rule)); - return $response->withHeader('Content-Type', 'application/json'); + return json_encode($rule); } -function advancedcontentfilter_post_rules(ServerRequestInterface $request, ResponseInterface $response) +function advancedcontentfilter_post_rules(ServerRequestInterface $request) { if (!DI::userSession()->getLocalUserId()) { throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method')); @@ -381,8 +360,7 @@ function advancedcontentfilter_post_rules(ServerRequestInterface $request, Respo DI::cache()->delete('rules_' . DI::userSession()->getLocalUserId()); - $response->getBody()->write(json_encode(['message' => DI::l10n()->t('Rule successfully added'), 'rule' => $rule])); - return $response->withHeader('Content-Type', 'application/json'); + return json_encode(['message' => DI::l10n()->t('Rule successfully added'), 'rule' => $rule]); } function advancedcontentfilter_put_rules_id(ServerRequestInterface $request, ResponseInterface $response, $args) @@ -413,8 +391,7 @@ function advancedcontentfilter_put_rules_id(ServerRequestInterface $request, Res DI::cache()->delete('rules_' . DI::userSession()->getLocalUserId()); - $response->getBody()->write(json_encode(['message' => DI::l10n()->t('Rule successfully updated')])); - return $response->withHeader('Content-Type', 'application/json'); + return json_encode(['message' => DI::l10n()->t('Rule successfully updated')]); } function advancedcontentfilter_delete_rules_id(ServerRequestInterface $request, ResponseInterface $response, $args) @@ -437,8 +414,7 @@ function advancedcontentfilter_delete_rules_id(ServerRequestInterface $request, DI::cache()->delete('rules_' . DI::userSession()->getLocalUserId()); - $response->getBody()->write(json_encode(['message' => DI::l10n()->t('Rule successfully deleted')])); - return $response->withHeader('Content-Type', 'application/json'); + return json_encode(['message' => DI::l10n()->t('Rule successfully deleted')]); } function advancedcontentfilter_get_variables_guid(ServerRequestInterface $request, ResponseInterface $response, $args) @@ -461,8 +437,7 @@ function advancedcontentfilter_get_variables_guid(ServerRequestInterface $reques $return = advancedcontentfilter_get_filter_fields(advancedcontentfilter_prepare_item_row($item_row)); - $response->getBody()->write(json_encode(['variables' => str_replace('\\\'', '\'', var_export($return, true))])); - return $response->withHeader('Content-Type', 'application/json'); + return json_encode(['variables' => str_replace('\\\'', '\'', var_export($return, true))]); } /** @@ -480,7 +455,7 @@ function advancedcontentfilter_prepare_item_row(array $item_row): array $item_row['tags'] = $tags['tags']; $item_row['hashtags'] = $tags['hashtags']; $item_row['mentions'] = $tags['mentions']; - $item_row['attachments'] = DI::postMediaRepository()->splitAttachments($item_row['uri-id']); + $item_row['attachments'] = Post\Media::splitAttachments($item_row['uri-id']); return $item_row; } diff --git a/advancedcontentfilter/composer.json b/advancedcontentfilter/composer.json index b9ab1900..93b19cd5 100644 --- a/advancedcontentfilter/composer.json +++ b/advancedcontentfilter/composer.json @@ -1,27 +1,25 @@ { - "name": "friendica-addons/advancedcontentfilter", - "description": "Advanced Content Filter addon for Friendica", - "type": "friendica-addon", - "authors": [ - { - "name": "Hypolite Petovan", - "email": "hypolite@mrpetovan.com", - "homepage": "https://friendica.mrpetovan.com/profile/hypolite", - "role": "Developer" - } - ], - "require": { - "slim/slim": "^4", - "symfony/expression-language": "^3.4" - }, - "license": "3-clause BSD license", - "minimum-stability": "stable", - "config": { - "platform": { - "php": "7.4" - }, - "optimize-autoloader": true, - "autoloader-suffix": "AdvancedContentFilterAddon", - "preferred-install": "dist" - } + "name": "friendica-addons/advancedcontentfilter", + "description": "Advanced Content Filter addon for Friendica", + "type": "friendica-addon", + "authors": [ + { + "name": "Hypolite Petovan", + "email": "hypolite@mrpetovan.com", + "homepage": "https://friendica.mrpetovan.com/profile/hypolite", + "role": "Developer" + } + ], + "require": { + "php": ">=5.6.0", + "slim/slim": "^3.1", + "symfony/expression-language": "^3.4" + }, + "license": "3-clause BSD license", + "minimum-stability": "stable", + "config": { + "optimize-autoloader": true, + "autoloader-suffix": "AdvancedContentFilterAddon", + "preferred-install": "dist" + } } diff --git a/advancedcontentfilter/composer.lock b/advancedcontentfilter/composer.lock index 6dbd17ba..774b5ec8 100644 --- a/advancedcontentfilter/composer.lock +++ b/advancedcontentfilter/composer.lock @@ -4,8 +4,40 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a7276eb2d2108a26699f69c750d02d27", + "content-hash": "d0e3662dd9d910ffe4f71d325bc39319", "packages": [ + { + "name": "container-interop/container-interop", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/container-interop/container-interop.git", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "shasum": "" + }, + "require": { + "psr/container": "^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Interop\\Container\\": "src/Interop/Container/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", + "homepage": "https://github.com/container-interop/container-interop", + "abandoned": "psr/container", + "time": "2017-02-14T19:40:03+00:00" + }, { "name": "nikic/fast-route", "version": "v1.3.0", @@ -52,6 +84,56 @@ ], "time": "2018-02-13T20:26:39+00:00" }, + { + "name": "pimple/pimple", + "version": "v3.2.3", + "source": { + "type": "git", + "url": "https://github.com/silexphp/Pimple.git", + "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/9e403941ef9d65d20cba7d54e29fe906db42cf32", + "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/container": "^1.0" + }, + "require-dev": { + "symfony/phpunit-bridge": "^3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev" + } + }, + "autoload": { + "psr-0": { + "Pimple": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Pimple, a simple Dependency Injection Container", + "homepage": "http://pimple.sensiolabs.org", + "keywords": [ + "container", + "dependency injection" + ], + "time": "2018-01-21T07:42:36+00:00" + }, { "name": "psr/cache", "version": "1.0.1", @@ -100,22 +182,27 @@ }, { "name": "psr/container", - "version": "1.1.2", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", "shasum": "" }, "require": { - "php": ">=7.4.0" + "php": ">=5.3.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -128,7 +215,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "homepage": "http://www.php-fig.org/" } ], "description": "Common Container Interface (PHP FIG PSR-11)", @@ -140,25 +227,24 @@ "container-interop", "psr" ], - "time": "2021-11-05T16:50:12+00:00" + "time": "2017-02-14T16:28:37+00:00" }, { - "name": "psr/http-factory", - "version": "1.0.2", + "name": "psr/http-message", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0 || ^2.0" + "php": ">=5.3.0" }, "type": "library", "extra": { @@ -178,58 +264,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "time": "2023-04-10T20:10:41+00:00" - }, - { - "name": "psr/http-message", - "version": "2.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "homepage": "http://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -242,126 +277,20 @@ "request", "response" ], - "time": "2023-04-04T09:54:51+00:00" - }, - { - "name": "psr/http-server-handler", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-server-handler.git", - "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/84c4fb66179be4caaf8e97bd239203245302e7d4", - "reference": "84c4fb66179be4caaf8e97bd239203245302e7d4", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP server-side request handler", - "keywords": [ - "handler", - "http", - "http-interop", - "psr", - "psr-15", - "psr-7", - "request", - "response", - "server" - ], - "time": "2023-04-10T20:06:20+00:00" - }, - { - "name": "psr/http-server-middleware", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-server-middleware.git", - "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/c1481f747daaa6a0782775cd6a8c26a1bf4a3829", - "reference": "c1481f747daaa6a0782775cd6a8c26a1bf4a3829", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0 || ^2.0", - "psr/http-server-handler": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP server-side middleware", - "keywords": [ - "http", - "http-interop", - "middleware", - "psr", - "psr-15", - "psr-7", - "request", - "response" - ], - "time": "2023-04-11T06:14:47+00:00" + "time": "2016-08-06T14:39:51+00:00" }, { "name": "psr/log", - "version": "1.1.4", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801", + "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801", "shasum": "" }, "require": { @@ -385,7 +314,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "homepage": "http://www.php-fig.org/" } ], "description": "Common interface for logging libraries", @@ -395,55 +324,84 @@ "psr", "psr-3" ], - "time": "2021-05-03T11:20:27+00:00" + "time": "2019-11-01T11:05:21+00:00" }, { - "name": "slim/slim", - "version": "4.13.0", + "name": "psr/simple-cache", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/slimphp/Slim.git", - "reference": "038fd5713d5a41636fdff0e8dcceedecdd17fc17" + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim/zipball/038fd5713d5a41636fdff0e8dcceedecdd17fc17", - "reference": "038fd5713d5a41636fdff0e8dcceedecdd17fc17", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "shasum": "" }, "require": { - "ext-json": "*", - "nikic/fast-route": "^1.3", - "php": "^7.4 || ^8.0", - "psr/container": "^1.0 || ^2.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0", - "psr/http-server-handler": "^1.0", - "psr/http-server-middleware": "^1.0", - "psr/log": "^1.1 || ^2.0 || ^3.0" + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-10-23T01:57:42+00:00" + }, + { + "name": "slim/slim", + "version": "3.9.2", + "source": { + "type": "git", + "url": "https://github.com/slimphp/Slim.git", + "reference": "4086d0106cf5a7135c69fce4161fe355a8feb118" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/slimphp/Slim/zipball/4086d0106cf5a7135c69fce4161fe355a8feb118", + "reference": "4086d0106cf5a7135c69fce4161fe355a8feb118", + "shasum": "" + }, + "require": { + "container-interop/container-interop": "^1.2", + "nikic/fast-route": "^1.0", + "php": ">=5.5.0", + "pimple/pimple": "^3.0", + "psr/container": "^1.0", + "psr/http-message": "^1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" }, "require-dev": { - "adriansuter/php-autoload-override": "^1.4", - "ext-simplexml": "*", - "guzzlehttp/psr7": "^2.6", - "httpsoft/http-message": "^1.1", - "httpsoft/http-server-request": "^1.1", - "laminas/laminas-diactoros": "^2.17 || ^3", - "nyholm/psr7": "^1.8", - "nyholm/psr7-server": "^1.1", - "phpspec/prophecy": "^1.19", - "phpspec/prophecy-phpunit": "^2.1", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^9.6", - "slim/http": "^1.3", - "slim/psr7": "^1.6", - "squizlabs/php_codesniffer": "^3.9" - }, - "suggest": { - "ext-simplexml": "Needed to support XML format in BodyParsingMiddleware", - "ext-xml": "Needed to support XML format in BodyParsingMiddleware", - "php-di/php-di": "PHP-DI is the recommended container library to be used with Slim", - "slim/psr7": "Slim PSR-7 implementation. See https://www.slimframework.com/docs/v4/start/installation.html for more information." + "phpunit/phpunit": "^4.0", + "squizlabs/php_codesniffer": "^2.5" }, "type": "library", "autoload": { @@ -456,100 +414,77 @@ "MIT" ], "authors": [ - { - "name": "Josh Lockhart", - "email": "hello@joshlockhart.com", - "homepage": "https://joshlockhart.com" - }, - { - "name": "Andrew Smith", - "email": "a.smith@silentworks.co.uk", - "homepage": "http://silentworks.co.uk" - }, { "name": "Rob Allen", "email": "rob@akrabat.com", "homepage": "http://akrabat.com" }, { - "name": "Pierre Berube", - "email": "pierre@lgse.com", - "homepage": "http://www.lgse.com" + "name": "Josh Lockhart", + "email": "hello@joshlockhart.com", + "homepage": "https://joshlockhart.com" }, { "name": "Gabriel Manricks", "email": "gmanricks@me.com", "homepage": "http://gabrielmanricks.com" + }, + { + "name": "Andrew Smith", + "email": "a.smith@silentworks.co.uk", + "homepage": "http://silentworks.co.uk" } ], "description": "Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs", - "homepage": "https://www.slimframework.com", + "homepage": "https://slimframework.com", "keywords": [ "api", "framework", "micro", "router" ], - "funding": [ - { - "url": "https://opencollective.com/slimphp", - "type": "open_collective" - }, - { - "url": "https://tidelift.com/funding/github/packagist/slim/slim", - "type": "tidelift" - } - ], - "time": "2024-03-03T21:25:30+00:00" + "time": "2017-11-26T19:13:09+00:00" }, { "name": "symfony/cache", - "version": "v4.4.48", + "version": "v3.4.36", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "3b98ed664887ad197b8ede3da2432787212eb915" + "reference": "3d9f46a6960fd5cd7f030f86adc5b4b63bcfa4e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/3b98ed664887ad197b8ede3da2432787212eb915", - "reference": "3b98ed664887ad197b8ede3da2432787212eb915", + "url": "https://api.github.com/repos/symfony/cache/zipball/3d9f46a6960fd5cd7f030f86adc5b4b63bcfa4e3", + "reference": "3d9f46a6960fd5cd7f030f86adc5b4b63bcfa4e3", "shasum": "" }, "require": { - "php": ">=7.1.3", - "psr/cache": "^1.0|^2.0", - "psr/log": "^1|^2|^3", - "symfony/cache-contracts": "^1.1.7|^2", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.2|^5.0" + "php": "^5.5.9|>=7.0.8", + "psr/cache": "~1.0", + "psr/log": "~1.0", + "psr/simple-cache": "^1.0", + "symfony/polyfill-apcu": "~1.1" }, "conflict": { - "doctrine/dbal": "<2.7", - "symfony/dependency-injection": "<3.4", - "symfony/http-kernel": "<4.4|>=5.0", - "symfony/var-dumper": "<4.4" + "symfony/var-dumper": "<3.3" }, "provide": { - "psr/cache-implementation": "1.0|2.0", - "psr/simple-cache-implementation": "1.0|2.0", - "symfony/cache-implementation": "1.0|2.0" + "psr/cache-implementation": "1.0", + "psr/simple-cache-implementation": "1.0" }, "require-dev": { "cache/integration-tests": "dev-master", - "doctrine/cache": "^1.6|^2.0", - "doctrine/dbal": "^2.7|^3.0", - "predis/predis": "^1.1", - "psr/simple-cache": "^1.0|^2.0", - "symfony/config": "^4.2|^5.0", - "symfony/dependency-injection": "^3.4|^4.1|^5.0", - "symfony/filesystem": "^4.4|^5.0", - "symfony/http-kernel": "^4.4", - "symfony/var-dumper": "^4.4|^5.0" + "doctrine/cache": "~1.6", + "doctrine/dbal": "~2.4", + "predis/predis": "~1.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, "autoload": { "psr-4": { "Symfony\\Component\\Cache\\": "" @@ -572,188 +507,38 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Provides extended PSR-6, PSR-16 (and tags) implementations", + "description": "Symfony Cache component with PSR-6, PSR-16, and tags", "homepage": "https://symfony.com", "keywords": [ "caching", "psr6" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-10-17T20:21:54+00:00" - }, - { - "name": "symfony/cache-contracts", - "version": "v2.5.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/cache-contracts.git", - "reference": "64be4a7acb83b6f2bf6de9a02cee6dad41277ebc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/64be4a7acb83b6f2bf6de9a02cee6dad41277ebc", - "reference": "64be4a7acb83b6f2bf6de9a02cee6dad41277ebc", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/cache": "^1.0|^2.0|^3.0" - }, - "suggest": { - "symfony/cache-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Cache\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to caching", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-01-02T09:53:40+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.5.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2019-12-01T10:45:41+00:00" }, { "name": "symfony/expression-language", - "version": "v3.4.47", + "version": "v3.4.8", "source": { "type": "git", "url": "https://github.com/symfony/expression-language.git", - "reference": "de38e66398fca1fcb9c48e80279910e6889cb28f" + "reference": "867e4d1f5d4e52435a8ffff6b24fd6a801582241" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/expression-language/zipball/de38e66398fca1fcb9c48e80279910e6889cb28f", - "reference": "de38e66398fca1fcb9c48e80279910e6889cb28f", + "url": "https://api.github.com/repos/symfony/expression-language/zipball/867e4d1f5d4e52435a8ffff6b24fd6a801582241", + "reference": "867e4d1f5d4e52435a8ffff6b24fd6a801582241", "shasum": "" }, "require": { "php": "^5.5.9|>=7.0.8", - "symfony/cache": "~3.1|~4.0", - "symfony/polyfill-php70": "~1.6" + "symfony/cache": "~3.1|~4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, "autoload": { "psr-4": { "Symfony\\Component\\ExpressionLanguage\\": "" @@ -778,345 +563,37 @@ ], "description": "Symfony ExpressionLanguage Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-10-24T10:57:07+00:00" + "time": "2018-01-03T07:37:34+00:00" }, { - "name": "symfony/polyfill-php70", - "version": "v1.20.0", + "name": "symfony/polyfill-apcu", + "version": "v1.13.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" + "url": "https://github.com/symfony/polyfill-apcu.git", + "reference": "a8e961c841b9ec52927a87914f8820a1ad8f8116" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", + "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/a8e961c841b9ec52927a87914f8820a1ad8f8116", + "reference": "a8e961c841b9ec52927a87914f8820a1ad8f8116", "shasum": "" }, "require": { - "php": ">=7.1" - }, - "type": "metapackage", - "extra": { - "branch-alias": { - "dev-main": "1.20-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-10-23T14:02:19+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.29.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "21bd091060673a1177ae842c0ef8fe30893114d2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/21bd091060673a1177ae842c0ef8fe30893114d2", - "reference": "21bd091060673a1177ae842c0ef8fe30893114d2", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-01-29T20:11:03+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.29.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-01-29T20:11:03+00:00" - }, - { - "name": "symfony/service-contracts", - "version": "v2.5.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "suggest": { - "symfony/service-implementation": "" + "php": ">=5.3.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "dev-master": "1.13-dev" } }, "autoload": { "psr-4": { - "Symfony\\Contracts\\Service\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "Symfony\\Polyfill\\Apcu\\": "" }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-30T19:17:29+00:00" - }, - { - "name": "symfony/var-exporter", - "version": "v5.4.35", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-exporter.git", - "reference": "abb0a151b62d6b07e816487e20040464af96cae7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/abb0a151b62d6b07e816487e20040464af96cae7", - "reference": "abb0a151b62d6b07e816487e20040464af96cae7", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "symfony/var-dumper": "^4.4.9|^5.0.9|^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\VarExporter\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1133,31 +610,16 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Allows exporting any serializable PHP data structure to plain PHP code", + "description": "Symfony polyfill backporting apcu_* functions to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ - "clone", - "construct", - "export", - "hydrate", - "instantiate", - "serialize" + "apcu", + "compatibility", + "polyfill", + "portable", + "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-01-23T13:51:25+00:00" + "time": "2019-11-27T13:56:44+00:00" } ], "packages-dev": [], @@ -1166,10 +628,8 @@ "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, - "platform": [], - "platform-dev": [], - "platform-overrides": { - "php": "7.4" + "platform": { + "php": ">=5.6.0" }, - "plugin-api-version": "1.1.0" + "platform-dev": [] } diff --git a/advancedcontentfilter/lang/bg/messages.po b/advancedcontentfilter/lang/bg/messages.po deleted file mode 100644 index 8c65990e..00000000 --- a/advancedcontentfilter/lang/bg/messages.po +++ /dev/null @@ -1,161 +0,0 @@ -# ADDON advancedcontentfilter -# Copyright (C) -# This file is distributed under the same license as the Friendica advancedcontentfilter addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-11 08:54-0400\n" -"PO-Revision-Date: 2018-05-24 06:41+0000\n" -"Language-Team: Bulgarian (https://app.transifex.com/Friendica/teams/12172/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: advancedcontentfilter.php:154 -#, php-format -msgid "Filtered by rule: %s" -msgstr "" - -#: advancedcontentfilter.php:170 advancedcontentfilter.php:225 -msgid "Advanced Content Filter" -msgstr "" - -#: advancedcontentfilter.php:224 -msgid "Back to Addon Settings" -msgstr "" - -#: advancedcontentfilter.php:226 -msgid "Add a Rule" -msgstr "" - -#: advancedcontentfilter.php:227 -msgid "Help" -msgstr "" - -#: advancedcontentfilter.php:228 -msgid "" -"Add and manage your personal content filter rules in this screen. Rules have" -" a name and an arbitrary expression that will be matched against post data. " -"For a complete reference of the available operations and variables, check " -"the help page." -msgstr "" - -#: advancedcontentfilter.php:229 -msgid "Your rules" -msgstr "" - -#: advancedcontentfilter.php:230 -msgid "" -"You have no rules yet! Start adding one by clicking on the button above next" -" to the title." -msgstr "" - -#: advancedcontentfilter.php:231 -msgid "Disabled" -msgstr "" - -#: advancedcontentfilter.php:232 -msgid "Enabled" -msgstr "" - -#: advancedcontentfilter.php:233 -msgid "Disable this rule" -msgstr "" - -#: advancedcontentfilter.php:234 -msgid "Enable this rule" -msgstr "" - -#: advancedcontentfilter.php:235 -msgid "Edit this rule" -msgstr "" - -#: advancedcontentfilter.php:236 -msgid "Edit the rule" -msgstr "" - -#: advancedcontentfilter.php:237 -msgid "Save this rule" -msgstr "" - -#: advancedcontentfilter.php:238 -msgid "Delete this rule" -msgstr "" - -#: advancedcontentfilter.php:239 -msgid "Rule" -msgstr "" - -#: advancedcontentfilter.php:240 -msgid "Close" -msgstr "" - -#: advancedcontentfilter.php:241 -msgid "Add new rule" -msgstr "" - -#: advancedcontentfilter.php:242 -msgid "Rule Name" -msgstr "" - -#: advancedcontentfilter.php:243 -msgid "Rule Expression" -msgstr "" - -#: advancedcontentfilter.php:244 -msgid "Cancel" -msgstr "" - -#: advancedcontentfilter.php:295 -msgid "This addon requires this node having at least one post" -msgstr "" - -#: advancedcontentfilter.php:325 advancedcontentfilter.php:336 -#: advancedcontentfilter.php:347 advancedcontentfilter.php:383 -#: advancedcontentfilter.php:414 advancedcontentfilter.php:437 -msgid "You must be logged in to use this method" -msgstr "" - -#: advancedcontentfilter.php:351 advancedcontentfilter.php:387 -#: advancedcontentfilter.php:418 -msgid "Invalid form security token, please refresh the page." -msgstr "" - -#: advancedcontentfilter.php:363 -msgid "The rule name and expression are required." -msgstr "" - -#: advancedcontentfilter.php:377 -msgid "Rule successfully added" -msgstr "" - -#: advancedcontentfilter.php:391 advancedcontentfilter.php:422 -msgid "Rule doesn't exist or doesn't belong to you." -msgstr "" - -#: advancedcontentfilter.php:408 -msgid "Rule successfully updated" -msgstr "" - -#: advancedcontentfilter.php:431 -msgid "Rule successfully deleted" -msgstr "" - -#: advancedcontentfilter.php:441 -msgid "Missing argument: guid." -msgstr "" - -#: advancedcontentfilter.php:449 -#, php-format -msgid "Unknown post with guid: %s" -msgstr "" - -#: src/middlewares.php:49 -msgid "Method not found" -msgstr "" diff --git a/advancedcontentfilter/lang/bg/strings.php b/advancedcontentfilter/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/advancedcontentfilter/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -, 2022\n" -"Language-Team: German (https://app.transifex.com/Friendica/teams/12172/de/)\n" +"Language-Team: German (https://www.transifex.com/Friendica/teams/12172/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/advancedcontentfilter/lang/eo/messages.po b/advancedcontentfilter/lang/eo/messages.po deleted file mode 100644 index 7265ea19..00000000 --- a/advancedcontentfilter/lang/eo/messages.po +++ /dev/null @@ -1,161 +0,0 @@ -# ADDON advancedcontentfilter -# Copyright (C) -# This file is distributed under the same license as the Friendica advancedcontentfilter addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-11 08:54-0400\n" -"PO-Revision-Date: 2018-05-24 06:41+0000\n" -"Language-Team: Esperanto (https://app.transifex.com/Friendica/teams/12172/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: advancedcontentfilter.php:154 -#, php-format -msgid "Filtered by rule: %s" -msgstr "" - -#: advancedcontentfilter.php:170 advancedcontentfilter.php:225 -msgid "Advanced Content Filter" -msgstr "" - -#: advancedcontentfilter.php:224 -msgid "Back to Addon Settings" -msgstr "" - -#: advancedcontentfilter.php:226 -msgid "Add a Rule" -msgstr "" - -#: advancedcontentfilter.php:227 -msgid "Help" -msgstr "" - -#: advancedcontentfilter.php:228 -msgid "" -"Add and manage your personal content filter rules in this screen. Rules have" -" a name and an arbitrary expression that will be matched against post data. " -"For a complete reference of the available operations and variables, check " -"the help page." -msgstr "" - -#: advancedcontentfilter.php:229 -msgid "Your rules" -msgstr "" - -#: advancedcontentfilter.php:230 -msgid "" -"You have no rules yet! Start adding one by clicking on the button above next" -" to the title." -msgstr "" - -#: advancedcontentfilter.php:231 -msgid "Disabled" -msgstr "" - -#: advancedcontentfilter.php:232 -msgid "Enabled" -msgstr "" - -#: advancedcontentfilter.php:233 -msgid "Disable this rule" -msgstr "" - -#: advancedcontentfilter.php:234 -msgid "Enable this rule" -msgstr "" - -#: advancedcontentfilter.php:235 -msgid "Edit this rule" -msgstr "" - -#: advancedcontentfilter.php:236 -msgid "Edit the rule" -msgstr "" - -#: advancedcontentfilter.php:237 -msgid "Save this rule" -msgstr "" - -#: advancedcontentfilter.php:238 -msgid "Delete this rule" -msgstr "" - -#: advancedcontentfilter.php:239 -msgid "Rule" -msgstr "" - -#: advancedcontentfilter.php:240 -msgid "Close" -msgstr "" - -#: advancedcontentfilter.php:241 -msgid "Add new rule" -msgstr "" - -#: advancedcontentfilter.php:242 -msgid "Rule Name" -msgstr "" - -#: advancedcontentfilter.php:243 -msgid "Rule Expression" -msgstr "" - -#: advancedcontentfilter.php:244 -msgid "Cancel" -msgstr "" - -#: advancedcontentfilter.php:295 -msgid "This addon requires this node having at least one post" -msgstr "" - -#: advancedcontentfilter.php:325 advancedcontentfilter.php:336 -#: advancedcontentfilter.php:347 advancedcontentfilter.php:383 -#: advancedcontentfilter.php:414 advancedcontentfilter.php:437 -msgid "You must be logged in to use this method" -msgstr "" - -#: advancedcontentfilter.php:351 advancedcontentfilter.php:387 -#: advancedcontentfilter.php:418 -msgid "Invalid form security token, please refresh the page." -msgstr "" - -#: advancedcontentfilter.php:363 -msgid "The rule name and expression are required." -msgstr "" - -#: advancedcontentfilter.php:377 -msgid "Rule successfully added" -msgstr "" - -#: advancedcontentfilter.php:391 advancedcontentfilter.php:422 -msgid "Rule doesn't exist or doesn't belong to you." -msgstr "" - -#: advancedcontentfilter.php:408 -msgid "Rule successfully updated" -msgstr "" - -#: advancedcontentfilter.php:431 -msgid "Rule successfully deleted" -msgstr "" - -#: advancedcontentfilter.php:441 -msgid "Missing argument: guid." -msgstr "" - -#: advancedcontentfilter.php:449 -#, php-format -msgid "Unknown post with guid: %s" -msgstr "" - -#: src/middlewares.php:49 -msgid "Method not found" -msgstr "" diff --git a/advancedcontentfilter/lang/eo/strings.php b/advancedcontentfilter/lang/eo/strings.php deleted file mode 100644 index 68e8a64c..00000000 --- a/advancedcontentfilter/lang/eo/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && n < 20) ? 2 : 3;\n" - -#: advancedcontentfilter.php:154 -#, php-format -msgid "Filtered by rule: %s" -msgstr "" - -#: advancedcontentfilter.php:170 advancedcontentfilter.php:225 -msgid "Advanced Content Filter" -msgstr "" - -#: advancedcontentfilter.php:224 -msgid "Back to Addon Settings" -msgstr "" - -#: advancedcontentfilter.php:226 -msgid "Add a Rule" -msgstr "" - -#: advancedcontentfilter.php:227 -msgid "Help" -msgstr "" - -#: advancedcontentfilter.php:228 -msgid "" -"Add and manage your personal content filter rules in this screen. Rules have" -" a name and an arbitrary expression that will be matched against post data. " -"For a complete reference of the available operations and variables, check " -"the help page." -msgstr "" - -#: advancedcontentfilter.php:229 -msgid "Your rules" -msgstr "" - -#: advancedcontentfilter.php:230 -msgid "" -"You have no rules yet! Start adding one by clicking on the button above next" -" to the title." -msgstr "" - -#: advancedcontentfilter.php:231 -msgid "Disabled" -msgstr "" - -#: advancedcontentfilter.php:232 -msgid "Enabled" -msgstr "" - -#: advancedcontentfilter.php:233 -msgid "Disable this rule" -msgstr "" - -#: advancedcontentfilter.php:234 -msgid "Enable this rule" -msgstr "" - -#: advancedcontentfilter.php:235 -msgid "Edit this rule" -msgstr "" - -#: advancedcontentfilter.php:236 -msgid "Edit the rule" -msgstr "" - -#: advancedcontentfilter.php:237 -msgid "Save this rule" -msgstr "" - -#: advancedcontentfilter.php:238 -msgid "Delete this rule" -msgstr "" - -#: advancedcontentfilter.php:239 -msgid "Rule" -msgstr "" - -#: advancedcontentfilter.php:240 -msgid "Close" -msgstr "" - -#: advancedcontentfilter.php:241 -msgid "Add new rule" -msgstr "" - -#: advancedcontentfilter.php:242 -msgid "Rule Name" -msgstr "" - -#: advancedcontentfilter.php:243 -msgid "Rule Expression" -msgstr "" - -#: advancedcontentfilter.php:244 -msgid "Cancel" -msgstr "" - -#: advancedcontentfilter.php:295 -msgid "This addon requires this node having at least one post" -msgstr "" - -#: advancedcontentfilter.php:325 advancedcontentfilter.php:336 -#: advancedcontentfilter.php:347 advancedcontentfilter.php:383 -#: advancedcontentfilter.php:414 advancedcontentfilter.php:437 -msgid "You must be logged in to use this method" -msgstr "" - -#: advancedcontentfilter.php:351 advancedcontentfilter.php:387 -#: advancedcontentfilter.php:418 -msgid "Invalid form security token, please refresh the page." -msgstr "" - -#: advancedcontentfilter.php:363 -msgid "The rule name and expression are required." -msgstr "" - -#: advancedcontentfilter.php:377 -msgid "Rule successfully added" -msgstr "" - -#: advancedcontentfilter.php:391 advancedcontentfilter.php:422 -msgid "Rule doesn't exist or doesn't belong to you." -msgstr "" - -#: advancedcontentfilter.php:408 -msgid "Rule successfully updated" -msgstr "" - -#: advancedcontentfilter.php:431 -msgid "Rule successfully deleted" -msgstr "" - -#: advancedcontentfilter.php:441 -msgid "Missing argument: guid." -msgstr "" - -#: advancedcontentfilter.php:449 -#, php-format -msgid "Unknown post with guid: %s" -msgstr "" - -#: src/middlewares.php:49 -msgid "Method not found" -msgstr "" diff --git a/advancedcontentfilter/lang/gd/strings.php b/advancedcontentfilter/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/advancedcontentfilter/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/advancedcontentfilter/lang/is/messages.po b/advancedcontentfilter/lang/is/messages.po deleted file mode 100644 index 4c50158d..00000000 --- a/advancedcontentfilter/lang/is/messages.po +++ /dev/null @@ -1,161 +0,0 @@ -# ADDON advancedcontentfilter -# Copyright (C) -# This file is distributed under the same license as the Friendica advancedcontentfilter addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-11 08:54-0400\n" -"PO-Revision-Date: 2018-05-24 06:41+0000\n" -"Language-Team: Icelandic (https://app.transifex.com/Friendica/teams/12172/is/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: is\n" -"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" - -#: advancedcontentfilter.php:154 -#, php-format -msgid "Filtered by rule: %s" -msgstr "" - -#: advancedcontentfilter.php:170 advancedcontentfilter.php:225 -msgid "Advanced Content Filter" -msgstr "" - -#: advancedcontentfilter.php:224 -msgid "Back to Addon Settings" -msgstr "" - -#: advancedcontentfilter.php:226 -msgid "Add a Rule" -msgstr "" - -#: advancedcontentfilter.php:227 -msgid "Help" -msgstr "" - -#: advancedcontentfilter.php:228 -msgid "" -"Add and manage your personal content filter rules in this screen. Rules have" -" a name and an arbitrary expression that will be matched against post data. " -"For a complete reference of the available operations and variables, check " -"the help page." -msgstr "" - -#: advancedcontentfilter.php:229 -msgid "Your rules" -msgstr "" - -#: advancedcontentfilter.php:230 -msgid "" -"You have no rules yet! Start adding one by clicking on the button above next" -" to the title." -msgstr "" - -#: advancedcontentfilter.php:231 -msgid "Disabled" -msgstr "" - -#: advancedcontentfilter.php:232 -msgid "Enabled" -msgstr "" - -#: advancedcontentfilter.php:233 -msgid "Disable this rule" -msgstr "" - -#: advancedcontentfilter.php:234 -msgid "Enable this rule" -msgstr "" - -#: advancedcontentfilter.php:235 -msgid "Edit this rule" -msgstr "" - -#: advancedcontentfilter.php:236 -msgid "Edit the rule" -msgstr "" - -#: advancedcontentfilter.php:237 -msgid "Save this rule" -msgstr "" - -#: advancedcontentfilter.php:238 -msgid "Delete this rule" -msgstr "" - -#: advancedcontentfilter.php:239 -msgid "Rule" -msgstr "" - -#: advancedcontentfilter.php:240 -msgid "Close" -msgstr "" - -#: advancedcontentfilter.php:241 -msgid "Add new rule" -msgstr "" - -#: advancedcontentfilter.php:242 -msgid "Rule Name" -msgstr "" - -#: advancedcontentfilter.php:243 -msgid "Rule Expression" -msgstr "" - -#: advancedcontentfilter.php:244 -msgid "Cancel" -msgstr "" - -#: advancedcontentfilter.php:295 -msgid "This addon requires this node having at least one post" -msgstr "" - -#: advancedcontentfilter.php:325 advancedcontentfilter.php:336 -#: advancedcontentfilter.php:347 advancedcontentfilter.php:383 -#: advancedcontentfilter.php:414 advancedcontentfilter.php:437 -msgid "You must be logged in to use this method" -msgstr "" - -#: advancedcontentfilter.php:351 advancedcontentfilter.php:387 -#: advancedcontentfilter.php:418 -msgid "Invalid form security token, please refresh the page." -msgstr "" - -#: advancedcontentfilter.php:363 -msgid "The rule name and expression are required." -msgstr "" - -#: advancedcontentfilter.php:377 -msgid "Rule successfully added" -msgstr "" - -#: advancedcontentfilter.php:391 advancedcontentfilter.php:422 -msgid "Rule doesn't exist or doesn't belong to you." -msgstr "" - -#: advancedcontentfilter.php:408 -msgid "Rule successfully updated" -msgstr "" - -#: advancedcontentfilter.php:431 -msgid "Rule successfully deleted" -msgstr "" - -#: advancedcontentfilter.php:441 -msgid "Missing argument: guid." -msgstr "" - -#: advancedcontentfilter.php:449 -#, php-format -msgid "Unknown post with guid: %s" -msgstr "" - -#: src/middlewares.php:49 -msgid "Method not found" -msgstr "" diff --git a/advancedcontentfilter/lang/is/strings.php b/advancedcontentfilter/lang/is/strings.php deleted file mode 100644 index 975c341e..00000000 --- a/advancedcontentfilter/lang/is/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -, 2018 -# Sylke Vicious , 2023 -# #, fuzzy msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-05-11 08:54-0400\n" -"PO-Revision-Date: 2018-05-24 06:41+0000\n" -"Last-Translator: Sylke Vicious , 2023\n" -"Language-Team: Italian (https://app.transifex.com/Friendica/teams/12172/it/)\n" +"POT-Creation-Date: 2018-04-17 04:04+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: fabrixxm , 2018\n" +"Language-Team: Italian (https://www.transifex.com/Friendica/teams/12172/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: advancedcontentfilter.php:154 +#: advancedcontentfilter.php:134 #, php-format msgid "Filtered by rule: %s" msgstr "Filtrato dalla regola: %s" -#: advancedcontentfilter.php:170 advancedcontentfilter.php:225 +#: advancedcontentfilter.php:147 advancedcontentfilter.php:204 msgid "Advanced Content Filter" msgstr "Filtro Avanzato Contenuti" -#: advancedcontentfilter.php:224 +#: advancedcontentfilter.php:203 msgid "Back to Addon Settings" msgstr "Torna alle impostazioni del componente aggiuntivo" -#: advancedcontentfilter.php:226 +#: advancedcontentfilter.php:205 msgid "Add a Rule" msgstr "Aggiungi una regola" -#: advancedcontentfilter.php:227 +#: advancedcontentfilter.php:206 msgid "Help" msgstr "Aiuto" -#: advancedcontentfilter.php:228 +#: advancedcontentfilter.php:207 msgid "" "Add and manage your personal content filter rules in this screen. Rules have" " a name and an arbitrary expression that will be matched against post data. " "For a complete reference of the available operations and variables, check " -"the help page." +"the help page." msgstr "" "Aggiungi e gestisci le tue regole personali di filtro contenuti in questa " "schermata. Le regole hanno un nome e un'espressione arbitraria che sarà " "confrontata con i dati del messaggio. Per un elenco completo delle " -"operazioni e variabili disponibili, controlla la pagina di aiuto." +"operazioni disponibili, controlla la pagina di aiuto." -#: advancedcontentfilter.php:229 +#: advancedcontentfilter.php:208 msgid "Your rules" msgstr "Le tue regole" -#: advancedcontentfilter.php:230 +#: advancedcontentfilter.php:209 msgid "" "You have no rules yet! Start adding one by clicking on the button above next" " to the title." @@ -67,106 +64,110 @@ msgstr "" "Non hai ancora nessuna regola! Aggiungine una cliccando sul bottone qui " "sopra a fianco al titolo." -#: advancedcontentfilter.php:231 +#: advancedcontentfilter.php:210 msgid "Disabled" msgstr "Disabilitato" -#: advancedcontentfilter.php:232 +#: advancedcontentfilter.php:211 msgid "Enabled" msgstr "Abilitato" -#: advancedcontentfilter.php:233 +#: advancedcontentfilter.php:212 msgid "Disable this rule" msgstr "Diabilita questa regola" -#: advancedcontentfilter.php:234 +#: advancedcontentfilter.php:213 msgid "Enable this rule" msgstr "Abilita questa regola" -#: advancedcontentfilter.php:235 +#: advancedcontentfilter.php:214 msgid "Edit this rule" msgstr "Modifica questa regola" -#: advancedcontentfilter.php:236 +#: advancedcontentfilter.php:215 msgid "Edit the rule" msgstr "Modifica la regola" -#: advancedcontentfilter.php:237 +#: advancedcontentfilter.php:216 msgid "Save this rule" msgstr "Salva questa regola" -#: advancedcontentfilter.php:238 +#: advancedcontentfilter.php:217 msgid "Delete this rule" msgstr "Elimina questa regola" -#: advancedcontentfilter.php:239 +#: advancedcontentfilter.php:218 msgid "Rule" msgstr "Regola" -#: advancedcontentfilter.php:240 +#: advancedcontentfilter.php:219 msgid "Close" msgstr "Chiudi" -#: advancedcontentfilter.php:241 +#: advancedcontentfilter.php:220 msgid "Add new rule" msgstr "Aggiungi nuova regola" -#: advancedcontentfilter.php:242 +#: advancedcontentfilter.php:221 msgid "Rule Name" msgstr "Nome Regola" -#: advancedcontentfilter.php:243 +#: advancedcontentfilter.php:222 msgid "Rule Expression" msgstr "Espressione Regola" -#: advancedcontentfilter.php:244 +#: advancedcontentfilter.php:223 +msgid "" +"

Examples:

  • author_link == "
    +"'https://friendica.mrpetovan.com/profile/hypolite'
  • tags
" +msgstr "" +"

Esempi:

  • author_link == "
    +"'https://friendica.mrpetovan.com/profile/hypolite'
  • tags
" + +#: advancedcontentfilter.php:224 msgid "Cancel" msgstr "Annulla" -#: advancedcontentfilter.php:295 -msgid "This addon requires this node having at least one post" -msgstr "Questo addon richiede che questo nodo abbia almeno un messaggio" - -#: advancedcontentfilter.php:325 advancedcontentfilter.php:336 -#: advancedcontentfilter.php:347 advancedcontentfilter.php:383 -#: advancedcontentfilter.php:414 advancedcontentfilter.php:437 +#: advancedcontentfilter.php:290 advancedcontentfilter.php:301 +#: advancedcontentfilter.php:312 advancedcontentfilter.php:346 +#: advancedcontentfilter.php:375 advancedcontentfilter.php:396 msgid "You must be logged in to use this method" msgstr "Devi essere autenticato per usare questo metodo" -#: advancedcontentfilter.php:351 advancedcontentfilter.php:387 -#: advancedcontentfilter.php:418 +#: advancedcontentfilter.php:316 advancedcontentfilter.php:350 +#: advancedcontentfilter.php:379 msgid "Invalid form security token, please refresh the page." msgstr "Token di sicurezza invalido, aggiorna la pagina." -#: advancedcontentfilter.php:363 +#: advancedcontentfilter.php:328 msgid "The rule name and expression are required." msgstr "Il nome e l'espressione della regola sono richiesti." -#: advancedcontentfilter.php:377 +#: advancedcontentfilter.php:340 msgid "Rule successfully added" msgstr "Regola aggiunta con successo" -#: advancedcontentfilter.php:391 advancedcontentfilter.php:422 +#: advancedcontentfilter.php:354 advancedcontentfilter.php:383 msgid "Rule doesn't exist or doesn't belong to you." msgstr "La regola non esiste o non ti appartiene." -#: advancedcontentfilter.php:408 +#: advancedcontentfilter.php:369 msgid "Rule successfully updated" msgstr "Regola aggiornata con successo" -#: advancedcontentfilter.php:431 +#: advancedcontentfilter.php:390 msgid "Rule successfully deleted" msgstr "Regola eliminata con successo" -#: advancedcontentfilter.php:441 +#: advancedcontentfilter.php:400 msgid "Missing argument: guid." msgstr "Argomento mancante: guid." -#: advancedcontentfilter.php:449 +#: advancedcontentfilter.php:406 #, php-format msgid "Unknown post with guid: %s" msgstr "Messaggio con guid %s sconosciuto" -#: src/middlewares.php:49 +#: src/middlewares.php:28 msgid "Method not found" msgstr "Metodo non trovato" diff --git a/advancedcontentfilter/lang/it/strings.php b/advancedcontentfilter/lang/it/strings.php index d47d7a5a..50cde891 100644 --- a/advancedcontentfilter/lang/it/strings.php +++ b/advancedcontentfilter/lang/it/strings.php @@ -3,14 +3,14 @@ if(! function_exists("string_plural_select_it")) { function string_plural_select_it($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} $a->strings['Filtered by rule: %s'] = 'Filtrato dalla regola: %s'; $a->strings['Advanced Content Filter'] = 'Filtro Avanzato Contenuti'; $a->strings['Back to Addon Settings'] = 'Torna alle impostazioni del componente aggiuntivo'; $a->strings['Add a Rule'] = 'Aggiungi una regola'; $a->strings['Help'] = 'Aiuto'; -$a->strings['Add and manage your personal content filter rules in this screen. Rules have a name and an arbitrary expression that will be matched against post data. For a complete reference of the available operations and variables, check the help page.'] = 'Aggiungi e gestisci le tue regole personali di filtro contenuti in questa schermata. Le regole hanno un nome e un\'espressione arbitraria che sarà confrontata con i dati del messaggio. Per un elenco completo delle operazioni e variabili disponibili, controlla la pagina di aiuto.'; +$a->strings['Add and manage your personal content filter rules in this screen. Rules have a name and an arbitrary expression that will be matched against post data. For a complete reference of the available operations and variables, check the help page.'] = 'Aggiungi e gestisci le tue regole personali di filtro contenuti in questa schermata. Le regole hanno un nome e un\'espressione arbitraria che sarà confrontata con i dati del messaggio. Per un elenco completo delle operazioni disponibili, controlla la pagina di aiuto.'; $a->strings['Your rules'] = 'Le tue regole'; $a->strings['You have no rules yet! Start adding one by clicking on the button above next to the title.'] = 'Non hai ancora nessuna regola! Aggiungine una cliccando sul bottone qui sopra a fianco al titolo.'; $a->strings['Disabled'] = 'Disabilitato'; @@ -26,8 +26,8 @@ $a->strings['Close'] = 'Chiudi'; $a->strings['Add new rule'] = 'Aggiungi nuova regola'; $a->strings['Rule Name'] = 'Nome Regola'; $a->strings['Rule Expression'] = 'Espressione Regola'; +$a->strings['

Examples:

  • author_link == \'https://friendica.mrpetovan.com/profile/hypolite\'
  • tags
'] = '

Esempi:

  • author_link == \'https://friendica.mrpetovan.com/profile/hypolite\'
  • tags
'; $a->strings['Cancel'] = 'Annulla'; -$a->strings['This addon requires this node having at least one post'] = 'Questo addon richiede che questo nodo abbia almeno un messaggio'; $a->strings['You must be logged in to use this method'] = 'Devi essere autenticato per usare questo metodo'; $a->strings['Invalid form security token, please refresh the page.'] = 'Token di sicurezza invalido, aggiorna la pagina.'; $a->strings['The rule name and expression are required.'] = 'Il nome e l\'espressione della regola sono richiesti.'; diff --git a/advancedcontentfilter/lang/pl/messages.po b/advancedcontentfilter/lang/pl/messages.po index 9f0483c6..5fc9ca65 100644 --- a/advancedcontentfilter/lang/pl/messages.po +++ b/advancedcontentfilter/lang/pl/messages.po @@ -6,7 +6,7 @@ # Translators: # Waldemar Stoczkowski, 2018 # Joe Doe, 2021 -# Bartosz Kozień, 2025 +# Piotr Strębski , 2022 # #, fuzzy msgid "" @@ -15,8 +15,8 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-05-11 08:54-0400\n" "PO-Revision-Date: 2018-05-24 06:41+0000\n" -"Last-Translator: Bartosz Kozień, 2025\n" -"Language-Team: Polish (https://app.transifex.com/Friendica/teams/12172/pl/)\n" +"Last-Translator: Piotr Strębski , 2022\n" +"Language-Team: Polish (https://www.transifex.com/Friendica/teams/12172/pl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -126,7 +126,7 @@ msgstr "Anuluj" #: advancedcontentfilter.php:295 msgid "This addon requires this node having at least one post" -msgstr "Ten dodatek wymaga, aby ta instancja miała co najmniej jeden wpis" +msgstr "Ten dodatek wymaga, aby ten węzeł miał co najmniej jeden wpis" #: advancedcontentfilter.php:325 advancedcontentfilter.php:336 #: advancedcontentfilter.php:347 advancedcontentfilter.php:383 diff --git a/advancedcontentfilter/lang/pl/strings.php b/advancedcontentfilter/lang/pl/strings.php index 57215c65..625819c1 100644 --- a/advancedcontentfilter/lang/pl/strings.php +++ b/advancedcontentfilter/lang/pl/strings.php @@ -27,7 +27,7 @@ $a->strings['Add new rule'] = 'Dodaj nową regułę'; $a->strings['Rule Name'] = 'Nazwa reguły'; $a->strings['Rule Expression'] = 'Wyrażanie reguły'; $a->strings['Cancel'] = 'Anuluj'; -$a->strings['This addon requires this node having at least one post'] = 'Ten dodatek wymaga, aby ta instancja miała co najmniej jeden wpis'; +$a->strings['This addon requires this node having at least one post'] = 'Ten dodatek wymaga, aby ten węzeł miał co najmniej jeden wpis'; $a->strings['You must be logged in to use this method'] = 'Musisz być zalogowany, aby skorzystać z tej metody'; $a->strings['Invalid form security token, please refresh the page.'] = 'Nieprawidłowy token zabezpieczający formularz, odśwież stronę.'; $a->strings['The rule name and expression are required.'] = 'Nazwa reguły i wyrażenie są wymagane.'; diff --git a/advancedcontentfilter/src/middlewares.php b/advancedcontentfilter/src/middlewares.php new file mode 100644 index 00000000..dffb9363 --- /dev/null +++ b/advancedcontentfilter/src/middlewares.php @@ -0,0 +1,51 @@ +. + * + */ + +use Friendica\DI; + +$container = $slim->getContainer(); + +// Error handler based off https://stackoverflow.com/a/48135009/757392 +$container['errorHandler'] = function () { + return function(Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, Exception $exception) + { + $responseCode = 500; + + if (is_a($exception, 'Friendica\Network\HTTPException')) { + $responseCode = $exception->getCode(); + } + + $errors['message'] = $exception->getMessage(); + + $errors['responseCode'] = $responseCode; + + return $response + ->withStatus($responseCode) + ->withJson($errors); + }; +}; + +$container['notFoundHandler'] = function () { + return function () + { + throw new \Friendica\Network\HTTPException\NotFoundException(DI::l10n()->t('Method not found')); + }; +}; diff --git a/advancedcontentfilter/src/routes.php b/advancedcontentfilter/src/routes.php new file mode 100644 index 00000000..09077bda --- /dev/null +++ b/advancedcontentfilter/src/routes.php @@ -0,0 +1,39 @@ +. + * + */ + +/* @var $slim Slim\App */ +$slim->group('/advancedcontentfilter/api', function () { + /* @var $this Slim\App */ + $this->group('/rules', function () { + /* @var $this Slim\App */ + $this->get('', 'advancedcontentfilter_get_rules'); + $this->post('', 'advancedcontentfilter_post_rules'); + + $this->get('/{id}', 'advancedcontentfilter_get_rules_id'); + $this->put('/{id}', 'advancedcontentfilter_put_rules_id'); + $this->delete('/{id}', 'advancedcontentfilter_delete_rules_id'); + }); + + $this->group('/variables', function () { + /* @var $this Slim\App */ + $this->get('/{guid}', 'advancedcontentfilter_get_variables_guid'); + }); +}); diff --git a/advancedcontentfilter/templates/settings.tpl b/advancedcontentfilter/templates/settings.tpl index 8b82e595..c9dfbe3a 100644 --- a/advancedcontentfilter/templates/settings.tpl +++ b/advancedcontentfilter/templates/settings.tpl @@ -3,7 +3,7 @@
+ +EOT; +} + +function blockem_item_photo_menu(array &$b) +{ + global $blockem_words; + + if (!DI::userSession()->getLocalUserId() || $b['item']['self']) { + return; + } + + $blocked = false; + $author = $b['item']['author-link']; + + if (!empty($blockem_words)) { + foreach($blockem_words as $bloke) { + if (Strings::compareLink($bloke,$author)) { + $blocked = true; + break; + } + } + } + if ($blocked) { + $b['menu'][DI::l10n()->t('Unblock Author')] = 'javascript:blockemUnblock(\'' . $author . '\');'; + } else { + $b['menu'][DI::l10n()->t('Block Author')] = 'javascript:blockemBlock(\'' . $author . '\');'; + } +} + +/** + * This is a statement rather than an actual function definition. The simple + * existence of this method is checked to figure out if the addon offers a + * module. + */ +function blockem_module() {} + +function blockem_init() +{ + if (!DI::userSession()->getLocalUserId()) { + return; + } + + $words = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'blockem', 'words'); + + if (array_key_exists('block', $_GET) && $_GET['block']) { + if (strlen($words)) { + $words .= ','; + } + + $words .= trim($_GET['block']); + } + + if (array_key_exists('unblock', $_GET) && $_GET['unblock']) { + $arr = explode(',',$words); + $newarr = []; + + if (count($arr)) { + foreach ($arr as $x) { + if (!Strings::compareLink(trim($x), trim($_GET['unblock']))) { + $newarr[] = $x; + } + } + } + + $words = implode(',', $newarr); + } + + DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'blockem', 'words', $words); + exit(); +} diff --git a/blockem/lang/C/messages.po b/blockem/lang/C/messages.po new file mode 100644 index 00000000..64bb3fc4 --- /dev/null +++ b/blockem/lang/C/messages.po @@ -0,0 +1,45 @@ +# ADDON blockem +# Copyright (C) +# This file is distributed under the same license as the Friendica blockem addon package. +# +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:13-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: blockem.php:39 +msgid "" +"Hides user's content by collapsing posts. Also replaces their avatar with " +"generic image." +msgstr "" + +#: blockem.php:40 +msgid "Comma separated profile URLS:" +msgstr "" + +#: blockem.php:45 +msgid "Blockem" +msgstr "" + +#: blockem.php:120 +#, php-format +msgid "Filtered user: %s" +msgstr "" + +#: blockem.php:183 +msgid "Unblock Author" +msgstr "" + +#: blockem.php:185 +msgid "Block Author" +msgstr "" diff --git a/blockem/lang/ar/messages.po b/blockem/lang/ar/messages.po new file mode 100644 index 00000000..c9d6d5f9 --- /dev/null +++ b/blockem/lang/ar/messages.po @@ -0,0 +1,52 @@ +# ADDON blockem +# Copyright (C) +# This file is distributed under the same license as the Friendica blockem addon package. +# +# +# Translators: +# abidin toumi , 2021 +# Farida Khalaf , 2021 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" +"PO-Revision-Date: 2021-10-29 08:15+0000\n" +"Last-Translator: abidin toumi \n" +"Language-Team: Arabic (http://www.transifex.com/Friendica/friendica/language/ar/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ar\n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" + +#: blockem.php:42 blockem.php:46 +msgid "Blockem" +msgstr "احجبه
" + +#: blockem.php:50 +msgid "" +"Hides user's content by collapsing posts. Also replaces their avatar with " +"generic image." +msgstr "إخفاء محتوى المستخدم عن طريق تصغير المشاركات. و استبدال الصورة الرمزية الخاصة بهم بصورة عامة." + +#: blockem.php:51 +msgid "Comma separated profile URLS:" +msgstr "عناوين الملفات الشخصية مفصولة بفواصل:" + +#: blockem.php:55 +msgid "Save Settings" +msgstr "احفظ الإعدادات" + +#: blockem.php:131 +#, php-format +msgid "Filtered user: %s" +msgstr "ترشيح المستخدم :1%s" + +#: blockem.php:190 +msgid "Unblock Author" +msgstr "ألغ الحجب عن المدون" + +#: blockem.php:192 +msgid "Block Author" +msgstr "احجب المدون" diff --git a/blockem/lang/ar/strings.php b/blockem/lang/ar/strings.php new file mode 100644 index 00000000..0f58fa22 --- /dev/null +++ b/blockem/lang/ar/strings.php @@ -0,0 +1,14 @@ +=3 && $n%100<=10) { return 3; } else if ($n%100>=11 && $n%100<=99) { return 4; } else { return 5; } +}} +$a->strings['Blockem'] = 'احجبه
'; +$a->strings['Hides user\'s content by collapsing posts. Also replaces their avatar with generic image.'] = 'إخفاء محتوى المستخدم عن طريق تصغير المشاركات. و استبدال الصورة الرمزية الخاصة بهم بصورة عامة.'; +$a->strings['Comma separated profile URLS:'] = 'عناوين الملفات الشخصية مفصولة بفواصل:'; +$a->strings['Save Settings'] = 'احفظ الإعدادات'; +$a->strings['Filtered user: %s'] = 'ترشيح المستخدم :1%s'; +$a->strings['Unblock Author'] = 'ألغ الحجب عن المدون'; +$a->strings['Block Author'] = 'احجب المدون'; diff --git a/blockem/lang/ca/messages.po b/blockem/lang/ca/messages.po new file mode 100644 index 00000000..6d4c3468 --- /dev/null +++ b/blockem/lang/ca/messages.po @@ -0,0 +1,59 @@ +# ADDON blockem +# Copyright (C) +# This file is distributed under the same license as the Friendica blockem addon package. +# +# +# Translators: +# Joan Bar , 2019 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-08-17 10:23+0200\n" +"PO-Revision-Date: 2019-10-14 11:50+0000\n" +"Last-Translator: Joan Bar \n" +"Language-Team: Catalan (http://www.transifex.com/Friendica/friendica/language/ca/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: blockem.php:54 blockem.php:58 +msgid "Blockem" +msgstr "Blockem" + +#: blockem.php:62 +msgid "" +"Hides user's content by collapsing posts. Also replaces their avatar with " +"generic image." +msgstr "Amaga el contingut de l'usuari mitjançant la publicació col·lapsada. També substitueix el seu avatar per una imatge genèrica" + +#: blockem.php:63 +msgid "Comma separated profile URLS:" +msgstr "URL de perfil separats per comes:" + +#: blockem.php:67 +msgid "Save Settings" +msgstr "Desa la configuració" + +#: blockem.php:81 +msgid "BLOCKEM Settings saved." +msgstr "S'ha desat la configuració de BLOCKEM." + +#: blockem.php:143 +#, php-format +msgid "Filtered user: %s" +msgstr "Usuari filtrat:%s" + +#: blockem.php:202 +msgid "Unblock Author" +msgstr "Desbloca l'autor" + +#: blockem.php:204 +msgid "Block Author" +msgstr "Autor de bloc" + +#: blockem.php:244 +msgid "blockem settings updated" +msgstr "S'ha actualitzat la configuració de blockem" diff --git a/blockem/lang/ca/strings.php b/blockem/lang/ca/strings.php new file mode 100644 index 00000000..be4deede --- /dev/null +++ b/blockem/lang/ca/strings.php @@ -0,0 +1,16 @@ +strings['Blockem'] = 'Blockem'; +$a->strings['Hides user\'s content by collapsing posts. Also replaces their avatar with generic image.'] = 'Amaga el contingut de l\'usuari mitjançant la publicació col·lapsada. També substitueix el seu avatar per una imatge genèrica'; +$a->strings['Comma separated profile URLS:'] = 'URL de perfil separats per comes:'; +$a->strings['Save Settings'] = 'Desa la configuració'; +$a->strings['BLOCKEM Settings saved.'] = 'S\'ha desat la configuració de BLOCKEM.'; +$a->strings['Filtered user: %s'] = 'Usuari filtrat:%s'; +$a->strings['Unblock Author'] = 'Desbloca l\'autor'; +$a->strings['Block Author'] = 'Autor de bloc'; +$a->strings['blockem settings updated'] = 'S\'ha actualitzat la configuració de blockem'; diff --git a/blockem/lang/cs/messages.po b/blockem/lang/cs/messages.po new file mode 100644 index 00000000..fb90a2ca --- /dev/null +++ b/blockem/lang/cs/messages.po @@ -0,0 +1,60 @@ +# ADDON blockem +# Copyright (C) +# This file is distributed under the same license as the Friendica blockem addon package. +# +# +# Translators: +# Aditoo, 2018 +# michal_s , 2014 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-08-17 10:23+0200\n" +"PO-Revision-Date: 2018-08-18 12:25+0000\n" +"Last-Translator: Aditoo\n" +"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: cs\n" +"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" + +#: blockem.php:54 blockem.php:58 +msgid "Blockem" +msgstr "Blockem" + +#: blockem.php:62 +msgid "" +"Hides user's content by collapsing posts. Also replaces their avatar with " +"generic image." +msgstr "Skrývá uživatelský obsah zabalením příspěvků. Navíc nahrazuje avatar generickým obrázkem." + +#: blockem.php:63 +msgid "Comma separated profile URLS:" +msgstr "URL adresy profilů, oddělené čárkami:" + +#: blockem.php:67 +msgid "Save Settings" +msgstr "Uložit nastavení" + +#: blockem.php:81 +msgid "BLOCKEM Settings saved." +msgstr "Nastavení BLOCKEM uložena." + +#: blockem.php:143 +#, php-format +msgid "Filtered user: %s" +msgstr "Filtrovaný uživatel: %s" + +#: blockem.php:202 +msgid "Unblock Author" +msgstr "Odblokovat autora" + +#: blockem.php:204 +msgid "Block Author" +msgstr "Zablokovat autora" + +#: blockem.php:244 +msgid "blockem settings updated" +msgstr "nastavení blockem aktualizována" diff --git a/blockem/lang/cs/strings.php b/blockem/lang/cs/strings.php new file mode 100644 index 00000000..ac32d78f --- /dev/null +++ b/blockem/lang/cs/strings.php @@ -0,0 +1,16 @@ += 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; } +}} +$a->strings['Blockem'] = 'Blockem'; +$a->strings['Hides user\'s content by collapsing posts. Also replaces their avatar with generic image.'] = 'Skrývá uživatelský obsah zabalením příspěvků. Navíc nahrazuje avatar generickým obrázkem.'; +$a->strings['Comma separated profile URLS:'] = 'URL adresy profilů, oddělené čárkami:'; +$a->strings['Save Settings'] = 'Uložit nastavení'; +$a->strings['BLOCKEM Settings saved.'] = 'Nastavení BLOCKEM uložena.'; +$a->strings['Filtered user: %s'] = 'Filtrovaný uživatel: %s'; +$a->strings['Unblock Author'] = 'Odblokovat autora'; +$a->strings['Block Author'] = 'Zablokovat autora'; +$a->strings['blockem settings updated'] = 'nastavení blockem aktualizována'; diff --git a/blockem/lang/da-dk/messages.po b/blockem/lang/da-dk/messages.po new file mode 100644 index 00000000..e4a80bff --- /dev/null +++ b/blockem/lang/da-dk/messages.po @@ -0,0 +1,47 @@ +# ADDON blockem +# Copyright (C) +# This file is distributed under the same license as the Friendica blockem addon package. +# +# +# Translators: +# Anton , 2022 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:13-0500\n" +"PO-Revision-Date: 2014-06-22 11:20+0000\n" +"Last-Translator: Anton , 2022\n" +"Language-Team: Danish (Denmark) (http://www.transifex.com/Friendica/friendica/language/da_DK/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: da_DK\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: blockem.php:39 +msgid "" +"Hides user's content by collapsing posts. Also replaces their avatar with " +"generic image." +msgstr "Skjul brugers indhold ved at kollapse deres opslag. Erstatter også deres avatar med et generisk billede." + +#: blockem.php:40 +msgid "Comma separated profile URLS:" +msgstr "Kommasepareret liste over profil-URL's:" + +#: blockem.php:45 +msgid "Blockem" +msgstr "Blokdem" + +#: blockem.php:120 +#, php-format +msgid "Filtered user: %s" +msgstr "Filtreret bruger: %s" + +#: blockem.php:183 +msgid "Unblock Author" +msgstr "Fjern blokering af forfatter" + +#: blockem.php:185 +msgid "Block Author" +msgstr "Blokér forfatter" diff --git a/blockem/lang/da-dk/strings.php b/blockem/lang/da-dk/strings.php new file mode 100644 index 00000000..e99144ec --- /dev/null +++ b/blockem/lang/da-dk/strings.php @@ -0,0 +1,13 @@ +strings['Hides user\'s content by collapsing posts. Also replaces their avatar with generic image.'] = 'Skjul brugers indhold ved at kollapse deres opslag. Erstatter også deres avatar med et generisk billede.'; +$a->strings['Comma separated profile URLS:'] = 'Kommasepareret liste over profil-URL\'s:'; +$a->strings['Blockem'] = 'Blokdem'; +$a->strings['Filtered user: %s'] = 'Filtreret bruger: %s'; +$a->strings['Unblock Author'] = 'Fjern blokering af forfatter'; +$a->strings['Block Author'] = 'Blokér forfatter'; diff --git a/blockem/lang/de/messages.po b/blockem/lang/de/messages.po new file mode 100644 index 00000000..d1e2f704 --- /dev/null +++ b/blockem/lang/de/messages.po @@ -0,0 +1,50 @@ +# ADDON blockem +# Copyright (C) +# This file is distributed under the same license as the Friendica blockem addon package. +# +# +# Translators: +# Andreas H., 2018 +# Tobias Diekershoff , 2014 +# Tobias Diekershoff , 2018 +# Ulf Rompe , 2019 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:13-0500\n" +"PO-Revision-Date: 2021-12-22 15:27+0000\n" +"Last-Translator: Transifex Bot <>\n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: blockem.php:39 +msgid "" +"Hides user's content by collapsing posts. Also replaces their avatar with " +"generic image." +msgstr "Verbirgt Inhalte von Benutzern durch Zusammenklappen der Beiträge. Des Weiteren wird das Profilbild durch einen generischen Avatar ersetzt." + +#: blockem.php:40 +msgid "Comma separated profile URLS:" +msgstr "Komma-separierte Liste von Profil-URLs" + +#: blockem.php:45 +msgid "Blockem" +msgstr "Blockem" + +#: blockem.php:120 +#, php-format +msgid "Filtered user: %s" +msgstr "Gefilterte Person: %s" + +#: blockem.php:183 +msgid "Unblock Author" +msgstr "Autor freischalten" + +#: blockem.php:185 +msgid "Block Author" +msgstr "Autor blockieren" diff --git a/blockem/lang/de/strings.php b/blockem/lang/de/strings.php new file mode 100644 index 00000000..109af368 --- /dev/null +++ b/blockem/lang/de/strings.php @@ -0,0 +1,13 @@ +strings['Hides user\'s content by collapsing posts. Also replaces their avatar with generic image.'] = 'Verbirgt Inhalte von Benutzern durch Zusammenklappen der Beiträge. Des Weiteren wird das Profilbild durch einen generischen Avatar ersetzt.'; +$a->strings['Comma separated profile URLS:'] = 'Komma-separierte Liste von Profil-URLs'; +$a->strings['Blockem'] = 'Blockem'; +$a->strings['Filtered user: %s'] = 'Gefilterte Person: %s'; +$a->strings['Unblock Author'] = 'Autor freischalten'; +$a->strings['Block Author'] = 'Autor blockieren'; diff --git a/blockem/lang/en-gb/messages.po b/blockem/lang/en-gb/messages.po new file mode 100644 index 00000000..6bcc7b9b --- /dev/null +++ b/blockem/lang/en-gb/messages.po @@ -0,0 +1,59 @@ +# ADDON blockem +# Copyright (C) +# This file is distributed under the same license as the Friendica blockem addon package. +# +# +# Translators: +# Andy H3 , 2018 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-09 13:00+0100\n" +"PO-Revision-Date: 2018-03-15 14:10+0000\n" +"Last-Translator: Andy H3 \n" +"Language-Team: English (United Kingdom) (http://www.transifex.com/Friendica/friendica/language/en_GB/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en_GB\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: blockem.php:51 blockem.php:55 +msgid "\"Blockem\"" +msgstr "\"Blockem\"" + +#: blockem.php:59 +msgid "" +"Hides user's content by collapsing posts. Also replaces their avatar with " +"generic image." +msgstr "Hides user's content by collapsing posts. Also replaces their avatar with generic image." + +#: blockem.php:60 +msgid "Comma separated profile URLS:" +msgstr "Comma separated profile URLs:" + +#: blockem.php:64 +msgid "Save Settings" +msgstr "Save settings" + +#: blockem.php:77 +msgid "BLOCKEM Settings saved." +msgstr "Blockem settings saved." + +#: blockem.php:140 +#, php-format +msgid "Hidden content by %s - Click to open/close" +msgstr "Hidden content by %s - Reveal/hide" + +#: blockem.php:193 +msgid "Unblock Author" +msgstr "Unblock author" + +#: blockem.php:195 +msgid "Block Author" +msgstr "Block author" + +#: blockem.php:227 +msgid "blockem settings updated" +msgstr "Blockem settings updated" diff --git a/blockem/lang/en-gb/strings.php b/blockem/lang/en-gb/strings.php new file mode 100644 index 00000000..0b9d9e4b --- /dev/null +++ b/blockem/lang/en-gb/strings.php @@ -0,0 +1,16 @@ +strings['"Blockem"'] = '"Blockem"'; +$a->strings['Hides user\'s content by collapsing posts. Also replaces their avatar with generic image.'] = 'Hides user\'s content by collapsing posts. Also replaces their avatar with generic image.'; +$a->strings['Comma separated profile URLS:'] = 'Comma separated profile URLs:'; +$a->strings['Save Settings'] = 'Save settings'; +$a->strings['BLOCKEM Settings saved.'] = 'Blockem settings saved.'; +$a->strings['Hidden content by %s - Click to open/close'] = 'Hidden content by %s - Reveal/hide'; +$a->strings['Unblock Author'] = 'Unblock author'; +$a->strings['Block Author'] = 'Block author'; +$a->strings['blockem settings updated'] = 'Blockem settings updated'; diff --git a/blockem/lang/en-us/messages.po b/blockem/lang/en-us/messages.po new file mode 100644 index 00000000..1d64620b --- /dev/null +++ b/blockem/lang/en-us/messages.po @@ -0,0 +1,61 @@ +# ADDON blockem +# Copyright (C) +# This file is distributed under the same license as the Friendica blockem addon package. +# +# +# Translators: +# Adam Clark , 2018 +# Andy H3 , 2018 +# R C , 2018 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-04-01 11:11-0400\n" +"PO-Revision-Date: 2018-06-13 02:40+0000\n" +"Last-Translator: R C \n" +"Language-Team: English (United States) (http://www.transifex.com/Friendica/friendica/language/en_US/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: en_US\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: blockem.php:52 blockem.php:56 +msgid "\"Blockem\"" +msgstr "Blockem" + +#: blockem.php:60 +msgid "" +"Hides user's content by collapsing posts. Also replaces their avatar with " +"generic image." +msgstr "Hides user's content by collapsing posts. Also replaces their avatar with generic image." + +#: blockem.php:61 +msgid "Comma separated profile URLS:" +msgstr "Comma-separated profile URLs:" + +#: blockem.php:65 +msgid "Save Settings" +msgstr "Save settings" + +#: blockem.php:78 +msgid "BLOCKEM Settings saved." +msgstr "Blockem settings saved." + +#: blockem.php:136 +#, php-format +msgid "Filtered user: %s" +msgstr "Filtered user: %s" + +#: blockem.php:189 +msgid "Unblock Author" +msgstr "Unblock author" + +#: blockem.php:191 +msgid "Block Author" +msgstr "Block author" + +#: blockem.php:223 +msgid "blockem settings updated" +msgstr "Blockem settings updated" diff --git a/blockem/lang/en-us/strings.php b/blockem/lang/en-us/strings.php new file mode 100644 index 00000000..fd76a1bc --- /dev/null +++ b/blockem/lang/en-us/strings.php @@ -0,0 +1,16 @@ +strings['"Blockem"'] = 'Blockem'; +$a->strings['Hides user\'s content by collapsing posts. Also replaces their avatar with generic image.'] = 'Hides user\'s content by collapsing posts. Also replaces their avatar with generic image.'; +$a->strings['Comma separated profile URLS:'] = 'Comma-separated profile URLs:'; +$a->strings['Save Settings'] = 'Save settings'; +$a->strings['BLOCKEM Settings saved.'] = 'Blockem settings saved.'; +$a->strings['Filtered user: %s'] = 'Filtered user: %s'; +$a->strings['Unblock Author'] = 'Unblock author'; +$a->strings['Block Author'] = 'Block author'; +$a->strings['blockem settings updated'] = 'Blockem settings updated'; diff --git a/blockem/lang/eo/strings.php b/blockem/lang/eo/strings.php new file mode 100644 index 00000000..b6116507 --- /dev/null +++ b/blockem/lang/eo/strings.php @@ -0,0 +1,10 @@ +strings["\"Blockem\" Settings"] = "\"Blockem\" Agordoj"; +$a->strings["Comma separated profile URLS to block"] = "Blokotaj URL adresoj, disigita per komo"; +$a->strings["Submit"] = "Sendi"; +$a->strings["BLOCKEM Settings saved."] = "Konservis Agordojn de BLOCKEM."; +$a->strings["Blocked %s - Click to open/close"] = "%s blokita - Klaku por malfermi/fermi"; +$a->strings["Unblock Author"] = "Malbloki Aŭtoron"; +$a->strings["Block Author"] = "Bloki Aŭtoron"; +$a->strings["blockem settings updated"] = "Ĝisdatigis la blockem agordojn"; diff --git a/blockem/lang/es/messages.po b/blockem/lang/es/messages.po new file mode 100644 index 00000000..0b59921e --- /dev/null +++ b/blockem/lang/es/messages.po @@ -0,0 +1,53 @@ +# ADDON blockem +# Copyright (C) +# This file is distributed under the same license as the Friendica blockem addon package. +# +# +# Translators: +# Albert, 2018 +# Senex Petrovic , 2021 +# Tupambae.org, 2016 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" +"PO-Revision-Date: 2021-04-01 09:45+0000\n" +"Last-Translator: Senex Petrovic \n" +"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: blockem.php:42 blockem.php:46 +msgid "Blockem" +msgstr "Blockem (Bloquealos)" + +#: blockem.php:50 +msgid "" +"Hides user's content by collapsing posts. Also replaces their avatar with " +"generic image." +msgstr "Oculta el contenido del usuario al colapsar las publicaciones. También reemplaza su avatar con una imagen genérica." + +#: blockem.php:51 +msgid "Comma separated profile URLS:" +msgstr "URLs de perfil separadas por comas:" + +#: blockem.php:55 +msgid "Save Settings" +msgstr "Guardar configuración" + +#: blockem.php:131 +#, php-format +msgid "Filtered user: %s" +msgstr "Usuario filtrado: %s" + +#: blockem.php:190 +msgid "Unblock Author" +msgstr "Desbloquear autor" + +#: blockem.php:192 +msgid "Block Author" +msgstr "Bloquear autor" diff --git a/blockem/lang/es/strings.php b/blockem/lang/es/strings.php new file mode 100644 index 00000000..7d1de601 --- /dev/null +++ b/blockem/lang/es/strings.php @@ -0,0 +1,14 @@ +strings['Blockem'] = 'Blockem (Bloquealos)'; +$a->strings['Hides user\'s content by collapsing posts. Also replaces their avatar with generic image.'] = 'Oculta el contenido del usuario al colapsar las publicaciones. También reemplaza su avatar con una imagen genérica.'; +$a->strings['Comma separated profile URLS:'] = 'URLs de perfil separadas por comas:'; +$a->strings['Save Settings'] = 'Guardar configuración'; +$a->strings['Filtered user: %s'] = 'Usuario filtrado: %s'; +$a->strings['Unblock Author'] = 'Desbloquear autor'; +$a->strings['Block Author'] = 'Bloquear autor'; diff --git a/blockem/lang/fi-fi/messages.po b/blockem/lang/fi-fi/messages.po new file mode 100644 index 00000000..4fac9aa7 --- /dev/null +++ b/blockem/lang/fi-fi/messages.po @@ -0,0 +1,60 @@ +# ADDON blockem +# Copyright (C) +# This file is distributed under the same license as the Friendica blockem addon package. +# +# +# Translators: +# Kris, 2018 +# Kris, 2018 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-04-01 11:11-0400\n" +"PO-Revision-Date: 2018-04-18 14:44+0000\n" +"Last-Translator: Kris\n" +"Language-Team: Finnish (Finland) (http://www.transifex.com/Friendica/friendica/language/fi_FI/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fi_FI\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: blockem.php:52 blockem.php:56 +msgid "\"Blockem\"" +msgstr "\"Blockem\"" + +#: blockem.php:60 +msgid "" +"Hides user's content by collapsing posts. Also replaces their avatar with " +"generic image." +msgstr "" + +#: blockem.php:61 +msgid "Comma separated profile URLS:" +msgstr "Profiilien URL-osoitteet pilkulla erotettuina:" + +#: blockem.php:65 +msgid "Save Settings" +msgstr "Tallenna asetukset" + +#: blockem.php:78 +msgid "BLOCKEM Settings saved." +msgstr "Blockem -asetukset tallennettu" + +#: blockem.php:136 +#, php-format +msgid "Filtered user: %s" +msgstr "Suodatettu käyttäjä: %s" + +#: blockem.php:189 +msgid "Unblock Author" +msgstr "Poista kirjoittaja estolistalta" + +#: blockem.php:191 +msgid "Block Author" +msgstr "Lisää kirjoittaja estolistalle" + +#: blockem.php:223 +msgid "blockem settings updated" +msgstr "blockem -asetukset päivitetty" diff --git a/blockem/lang/fi-fi/strings.php b/blockem/lang/fi-fi/strings.php new file mode 100644 index 00000000..d15b4a56 --- /dev/null +++ b/blockem/lang/fi-fi/strings.php @@ -0,0 +1,15 @@ +strings['"Blockem"'] = '"Blockem"'; +$a->strings['Comma separated profile URLS:'] = 'Profiilien URL-osoitteet pilkulla erotettuina:'; +$a->strings['Save Settings'] = 'Tallenna asetukset'; +$a->strings['BLOCKEM Settings saved.'] = 'Blockem -asetukset tallennettu'; +$a->strings['Filtered user: %s'] = 'Suodatettu käyttäjä: %s'; +$a->strings['Unblock Author'] = 'Poista kirjoittaja estolistalta'; +$a->strings['Block Author'] = 'Lisää kirjoittaja estolistalle'; +$a->strings['blockem settings updated'] = 'blockem -asetukset päivitetty'; diff --git a/blockem/lang/fr/messages.po b/blockem/lang/fr/messages.po new file mode 100644 index 00000000..d3617290 --- /dev/null +++ b/blockem/lang/fr/messages.po @@ -0,0 +1,50 @@ +# ADDON blockem +# Copyright (C) +# This file is distributed under the same license as the Friendica blockem addon package. +# +# +# Translators: +# Hypolite Petovan , 2016 +# Marie Olive , 2018 +# StefOfficiel , 2015 +# Vladimir Núñez , 2018 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:13-0500\n" +"PO-Revision-Date: 2014-06-22 11:20+0000\n" +"Last-Translator: Vladimir Núñez , 2018\n" +"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fr\n" +"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" + +#: blockem.php:39 +msgid "" +"Hides user's content by collapsing posts. Also replaces their avatar with " +"generic image." +msgstr "Cache le contenu de l'utilisateur en contractant les publications. Remplace aussi leur avatar par une image générique." + +#: blockem.php:40 +msgid "Comma separated profile URLS:" +msgstr "URLs de profil séparées par des virgules:" + +#: blockem.php:45 +msgid "Blockem" +msgstr "Bloquez-les" + +#: blockem.php:120 +#, php-format +msgid "Filtered user: %s" +msgstr "Utilisateur filtré:%s" + +#: blockem.php:183 +msgid "Unblock Author" +msgstr "Débloquer l'Auteur" + +#: blockem.php:185 +msgid "Block Author" +msgstr "Bloquer l'Auteur" diff --git a/blockem/lang/fr/strings.php b/blockem/lang/fr/strings.php new file mode 100644 index 00000000..26b86f24 --- /dev/null +++ b/blockem/lang/fr/strings.php @@ -0,0 +1,13 @@ +strings['Hides user\'s content by collapsing posts. Also replaces their avatar with generic image.'] = 'Cache le contenu de l\'utilisateur en contractant les publications. Remplace aussi leur avatar par une image générique.'; +$a->strings['Comma separated profile URLS:'] = 'URLs de profil séparées par des virgules:'; +$a->strings['Blockem'] = 'Bloquez-les'; +$a->strings['Filtered user: %s'] = 'Utilisateur filtré:%s'; +$a->strings['Unblock Author'] = 'Débloquer l\'Auteur'; +$a->strings['Block Author'] = 'Bloquer l\'Auteur'; diff --git a/blockem/lang/hu/messages.po b/blockem/lang/hu/messages.po new file mode 100644 index 00000000..3a29b820 --- /dev/null +++ b/blockem/lang/hu/messages.po @@ -0,0 +1,47 @@ +# ADDON blockem +# Copyright (C) +# This file is distributed under the same license as the Friendica blockem addon package. +# +# +# Translators: +# Balázs Úr, 2020 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:13-0500\n" +"PO-Revision-Date: 2014-06-22 11:20+0000\n" +"Last-Translator: Balázs Úr, 2020\n" +"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: hu\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: blockem.php:39 +msgid "" +"Hides user's content by collapsing posts. Also replaces their avatar with " +"generic image." +msgstr "Elrejti a felhasználók tartalmát a bejegyzések összecsukásával. Ezenkívül lecseréli a profilképeiket egy általános képre." + +#: blockem.php:40 +msgid "Comma separated profile URLS:" +msgstr "Profil URL-ek vesszővel elválasztva:" + +#: blockem.php:45 +msgid "Blockem" +msgstr "Blockem" + +#: blockem.php:120 +#, php-format +msgid "Filtered user: %s" +msgstr "Kiszűrt felhasználó: %s" + +#: blockem.php:183 +msgid "Unblock Author" +msgstr "Szerző tiltásának feloldása" + +#: blockem.php:185 +msgid "Block Author" +msgstr "Szerző tiltása" diff --git a/blockem/lang/hu/strings.php b/blockem/lang/hu/strings.php new file mode 100644 index 00000000..5a3abfec --- /dev/null +++ b/blockem/lang/hu/strings.php @@ -0,0 +1,13 @@ +strings['Hides user\'s content by collapsing posts. Also replaces their avatar with generic image.'] = 'Elrejti a felhasználók tartalmát a bejegyzések összecsukásával. Ezenkívül lecseréli a profilképeiket egy általános képre.'; +$a->strings['Comma separated profile URLS:'] = 'Profil URL-ek vesszővel elválasztva:'; +$a->strings['Blockem'] = 'Blockem'; +$a->strings['Filtered user: %s'] = 'Kiszűrt felhasználó: %s'; +$a->strings['Unblock Author'] = 'Szerző tiltásának feloldása'; +$a->strings['Block Author'] = 'Szerző tiltása'; diff --git a/blockem/lang/is/strings.php b/blockem/lang/is/strings.php new file mode 100644 index 00000000..3075c457 --- /dev/null +++ b/blockem/lang/is/strings.php @@ -0,0 +1,10 @@ +strings["\"Blockem\" Settings"] = "\"Blockem\" stillingar"; +$a->strings["Comma separated profile URLS to block"] = "Banna lista af forsíðum (komma á milli)"; +$a->strings["Submit"] = "Senda inn"; +$a->strings["BLOCKEM Settings saved."] = "BLOCKEM stillingar vistaðar."; +$a->strings["Blocked %s - Click to open/close"] = "%s sett í straff - Smella til að taka úr/setja á"; +$a->strings["Unblock Author"] = "Leyfa notanda"; +$a->strings["Block Author"] = "Banna notanda"; +$a->strings["blockem settings updated"] = ""; diff --git a/blockem/lang/it/messages.po b/blockem/lang/it/messages.po new file mode 100644 index 00000000..cdf74f99 --- /dev/null +++ b/blockem/lang/it/messages.po @@ -0,0 +1,59 @@ +# ADDON blockem +# Copyright (C) +# This file is distributed under the same license as the Friendica blockem addon package. +# +# +# Translators: +# fabrixxm , 2014,2018-2019 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-08-17 10:23+0200\n" +"PO-Revision-Date: 2019-03-11 14:21+0000\n" +"Last-Translator: fabrixxm \n" +"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: blockem.php:54 blockem.php:58 +msgid "Blockem" +msgstr "Blockem" + +#: blockem.php:62 +msgid "" +"Hides user's content by collapsing posts. Also replaces their avatar with " +"generic image." +msgstr "Nascondi il contenuto degli utenti collassando i messaggi. Sostituisce anche gli avatar con un'immagine generica." + +#: blockem.php:63 +msgid "Comma separated profile URLS:" +msgstr "URL profili separati da virgola:" + +#: blockem.php:67 +msgid "Save Settings" +msgstr "Salva Impostazioni" + +#: blockem.php:81 +msgid "BLOCKEM Settings saved." +msgstr "Impostazioni BLOCKEM salvate." + +#: blockem.php:143 +#, php-format +msgid "Filtered user: %s" +msgstr "Utente filtrato: %s" + +#: blockem.php:202 +msgid "Unblock Author" +msgstr "Sblocca autore" + +#: blockem.php:204 +msgid "Block Author" +msgstr "Blocca autore" + +#: blockem.php:244 +msgid "blockem settings updated" +msgstr "Impostazioni 'blockem' aggiornate." diff --git a/blockem/lang/it/strings.php b/blockem/lang/it/strings.php new file mode 100644 index 00000000..aa73286a --- /dev/null +++ b/blockem/lang/it/strings.php @@ -0,0 +1,16 @@ +strings['Blockem'] = 'Blockem'; +$a->strings['Hides user\'s content by collapsing posts. Also replaces their avatar with generic image.'] = 'Nascondi il contenuto degli utenti collassando i messaggi. Sostituisce anche gli avatar con un\'immagine generica.'; +$a->strings['Comma separated profile URLS:'] = 'URL profili separati da virgola:'; +$a->strings['Save Settings'] = 'Salva Impostazioni'; +$a->strings['BLOCKEM Settings saved.'] = 'Impostazioni BLOCKEM salvate.'; +$a->strings['Filtered user: %s'] = 'Utente filtrato: %s'; +$a->strings['Unblock Author'] = 'Sblocca autore'; +$a->strings['Block Author'] = 'Blocca autore'; +$a->strings['blockem settings updated'] = 'Impostazioni \'blockem\' aggiornate.'; diff --git a/blockem/lang/nb-no/strings.php b/blockem/lang/nb-no/strings.php new file mode 100644 index 00000000..0dd6660d --- /dev/null +++ b/blockem/lang/nb-no/strings.php @@ -0,0 +1,10 @@ +strings["\"Blockem\" Settings"] = ""; +$a->strings["Comma separated profile URLS to block"] = ""; +$a->strings["Submit"] = "Lagre"; +$a->strings["BLOCKEM Settings saved."] = ""; +$a->strings["Blocked %s - Click to open/close"] = ""; +$a->strings["Unblock Author"] = ""; +$a->strings["Block Author"] = ""; +$a->strings["blockem settings updated"] = ""; diff --git a/blockem/lang/nl/messages.po b/blockem/lang/nl/messages.po new file mode 100644 index 00000000..f8bde25c --- /dev/null +++ b/blockem/lang/nl/messages.po @@ -0,0 +1,60 @@ +# ADDON blockem +# Copyright (C) +# This file is distributed under the same license as the Friendica blockem addon package. +# +# +# Translators: +# AgnesElisa , 2018 +# Jeroen De Meerleer , 2018 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-08-17 10:23+0200\n" +"PO-Revision-Date: 2018-08-24 13:49+0000\n" +"Last-Translator: Jeroen De Meerleer \n" +"Language-Team: Dutch (http://www.transifex.com/Friendica/friendica/language/nl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: nl\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: blockem.php:54 blockem.php:58 +msgid "Blockem" +msgstr "Blockem" + +#: blockem.php:62 +msgid "" +"Hides user's content by collapsing posts. Also replaces their avatar with " +"generic image." +msgstr "Verbergt de inhoud van het bericht van de gebruiker. Daarnaast vervangt het de avatar door een standaardafbeelding." + +#: blockem.php:63 +msgid "Comma separated profile URLS:" +msgstr "Profiel URLs (kommagescheiden):" + +#: blockem.php:67 +msgid "Save Settings" +msgstr "Instellingen opslaan" + +#: blockem.php:81 +msgid "BLOCKEM Settings saved." +msgstr "BLOCKEM instellingen opgeslagen." + +#: blockem.php:143 +#, php-format +msgid "Filtered user: %s" +msgstr "Gefilterde gebruiker: %s" + +#: blockem.php:202 +msgid "Unblock Author" +msgstr "Deblokkeer Auteur" + +#: blockem.php:204 +msgid "Block Author" +msgstr "Auteur blokkeren" + +#: blockem.php:244 +msgid "blockem settings updated" +msgstr "blockem instellingen opgeslagen" diff --git a/blockem/lang/nl/strings.php b/blockem/lang/nl/strings.php new file mode 100644 index 00000000..b523cdc4 --- /dev/null +++ b/blockem/lang/nl/strings.php @@ -0,0 +1,16 @@ +strings['Blockem'] = 'Blockem'; +$a->strings['Hides user\'s content by collapsing posts. Also replaces their avatar with generic image.'] = 'Verbergt de inhoud van het bericht van de gebruiker. Daarnaast vervangt het de avatar door een standaardafbeelding.'; +$a->strings['Comma separated profile URLS:'] = 'Profiel URLs (kommagescheiden):'; +$a->strings['Save Settings'] = 'Instellingen opslaan'; +$a->strings['BLOCKEM Settings saved.'] = 'BLOCKEM instellingen opgeslagen.'; +$a->strings['Filtered user: %s'] = 'Gefilterde gebruiker: %s'; +$a->strings['Unblock Author'] = 'Deblokkeer Auteur'; +$a->strings['Block Author'] = 'Auteur blokkeren'; +$a->strings['blockem settings updated'] = 'blockem instellingen opgeslagen'; diff --git a/blockem/lang/pl/messages.po b/blockem/lang/pl/messages.po new file mode 100644 index 00000000..8e70e0b5 --- /dev/null +++ b/blockem/lang/pl/messages.po @@ -0,0 +1,47 @@ +# ADDON blockem +# Copyright (C) +# This file is distributed under the same license as the Friendica blockem addon package. +# +# +# Translators: +# Waldemar Stoczkowski, 2018 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:13-0500\n" +"PO-Revision-Date: 2014-06-22 11:20+0000\n" +"Last-Translator: Waldemar Stoczkowski, 2018\n" +"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: pl\n" +"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" + +#: blockem.php:39 +msgid "" +"Hides user's content by collapsing posts. Also replaces their avatar with " +"generic image." +msgstr "Ukrywa zawartość użytkownika, zwijając posty. Zastępuje również awatar wygenerowanym obrazem." + +#: blockem.php:40 +msgid "Comma separated profile URLS:" +msgstr "Rozdzielone przecinkami adresy URL profilu:" + +#: blockem.php:45 +msgid "Blockem" +msgstr "Zablokowanie" + +#: blockem.php:120 +#, php-format +msgid "Filtered user: %s" +msgstr "Użytkownik filtrowany: %s" + +#: blockem.php:183 +msgid "Unblock Author" +msgstr "Odblokuj autora" + +#: blockem.php:185 +msgid "Block Author" +msgstr "Zablokuj autora" diff --git a/blockem/lang/pl/strings.php b/blockem/lang/pl/strings.php new file mode 100644 index 00000000..49951a68 --- /dev/null +++ b/blockem/lang/pl/strings.php @@ -0,0 +1,13 @@ +=2 && $n%10<=4) && ($n%100<12 || $n%100>14)) { return 1; } else if ($n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14)) { return 2; } else { return 3; } +}} +$a->strings['Hides user\'s content by collapsing posts. Also replaces their avatar with generic image.'] = 'Ukrywa zawartość użytkownika, zwijając posty. Zastępuje również awatar wygenerowanym obrazem.'; +$a->strings['Comma separated profile URLS:'] = 'Rozdzielone przecinkami adresy URL profilu:'; +$a->strings['Blockem'] = 'Zablokowanie'; +$a->strings['Filtered user: %s'] = 'Użytkownik filtrowany: %s'; +$a->strings['Unblock Author'] = 'Odblokuj autora'; +$a->strings['Block Author'] = 'Zablokuj autora'; diff --git a/blockem/lang/pt-br/strings.php b/blockem/lang/pt-br/strings.php new file mode 100644 index 00000000..49f69cc3 --- /dev/null +++ b/blockem/lang/pt-br/strings.php @@ -0,0 +1,10 @@ +strings["\"Blockem\" Settings"] = "Configurações \"Blockem\""; +$a->strings["Comma separated profile URLS to block"] = "URLS de perfis separados por vírgulas a serem bloqueados"; +$a->strings["Submit"] = "Enviar"; +$a->strings["BLOCKEM Settings saved."] = "Configurações BLOCKEM armazenadas."; +$a->strings["Blocked %s - Click to open/close"] = "Bloqueado %s - Clique para abrir/fechar"; +$a->strings["Unblock Author"] = "Desbloqueie Autor"; +$a->strings["Block Author"] = "Bloqueie Autor"; +$a->strings["blockem settings updated"] = "configurações blockem atualizadas"; diff --git a/blockem/lang/ro/messages.po b/blockem/lang/ro/messages.po new file mode 100644 index 00000000..a74e5757 --- /dev/null +++ b/blockem/lang/ro/messages.po @@ -0,0 +1,52 @@ +# ADDON blockem +# Copyright (C) +# This file is distributed under the same license as the Friendica blockem addon package. +# +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-06-22 13:18+0200\n" +"PO-Revision-Date: 2014-07-08 11:43+0000\n" +"Last-Translator: Arian - Cazare Muncitori \n" +"Language-Team: Romanian (Romania) (http://www.transifex.com/projects/p/friendica/language/ro_RO/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ro_RO\n" +"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" + +#: blockem.php:53 blockem.php:57 +msgid "\"Blockem\"" +msgstr "\"Blockem\"" + +#: blockem.php:61 +msgid "Comma separated profile URLS to block" +msgstr "Adresele URL de profil, de blocat, separate prin virgulă" + +#: blockem.php:65 +msgid "Save Settings" +msgstr "Salvare Configurări" + +#: blockem.php:78 +msgid "BLOCKEM Settings saved." +msgstr "Configurările BLOCKEM au fost salvate." + +#: blockem.php:142 +#, php-format +msgid "Blocked %s - Click to open/close" +msgstr "%s Blocate - Apăsați pentru a deschide/închide" + +#: blockem.php:197 +msgid "Unblock Author" +msgstr "Deblocare Autor" + +#: blockem.php:199 +msgid "Block Author" +msgstr "Blocare Autor" + +#: blockem.php:231 +msgid "blockem settings updated" +msgstr "Configurările blockem au fost actualizate" diff --git a/blockem/lang/ro/strings.php b/blockem/lang/ro/strings.php new file mode 100644 index 00000000..6fc8a094 --- /dev/null +++ b/blockem/lang/ro/strings.php @@ -0,0 +1,15 @@ +19)||(($n%100==0)&&($n!=0)))) { return 2; } else { return 1; } +}} +$a->strings['"Blockem"'] = '"Blockem"'; +$a->strings['Comma separated profile URLS to block'] = 'Adresele URL de profil, de blocat, separate prin virgulă'; +$a->strings['Save Settings'] = 'Salvare Configurări'; +$a->strings['BLOCKEM Settings saved.'] = 'Configurările BLOCKEM au fost salvate.'; +$a->strings['Blocked %s - Click to open/close'] = '%s Blocate - Apăsați pentru a deschide/închide'; +$a->strings['Unblock Author'] = 'Deblocare Autor'; +$a->strings['Block Author'] = 'Blocare Autor'; +$a->strings['blockem settings updated'] = 'Configurările blockem au fost actualizate'; diff --git a/blockem/lang/ru/messages.po b/blockem/lang/ru/messages.po new file mode 100644 index 00000000..22427327 --- /dev/null +++ b/blockem/lang/ru/messages.po @@ -0,0 +1,60 @@ +# ADDON blockem +# Copyright (C) +# This file is distributed under the same license as the Friendica blockem addon package. +# +# +# Translators: +# Alexander An , 2020 +# Stanislav N. , 2017-2018 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-08-17 10:23+0200\n" +"PO-Revision-Date: 2020-04-23 14:13+0000\n" +"Last-Translator: Alexander An \n" +"Language-Team: Russian (http://www.transifex.com/Friendica/friendica/language/ru/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ru\n" +"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" + +#: blockem.php:54 blockem.php:58 +msgid "Blockem" +msgstr "Blockem" + +#: blockem.php:62 +msgid "" +"Hides user's content by collapsing posts. Also replaces their avatar with " +"generic image." +msgstr "Скрыть контент пользователя. Также заменяет его аватар изображением по-умолчанию." + +#: blockem.php:63 +msgid "Comma separated profile URLS:" +msgstr "URL профилей, разделенные запятыми:" + +#: blockem.php:67 +msgid "Save Settings" +msgstr "Сохранить настройки" + +#: blockem.php:81 +msgid "BLOCKEM Settings saved." +msgstr "BLOCKEM Настройки сохранены." + +#: blockem.php:143 +#, php-format +msgid "Filtered user: %s" +msgstr "Отфильтрованный пользователь: %s" + +#: blockem.php:202 +msgid "Unblock Author" +msgstr "Разблокировать автора" + +#: blockem.php:204 +msgid "Block Author" +msgstr "Блокировать автора" + +#: blockem.php:244 +msgid "blockem settings updated" +msgstr "Настройки Blockem обновлены" diff --git a/blockem/lang/ru/strings.php b/blockem/lang/ru/strings.php new file mode 100644 index 00000000..ef586740 --- /dev/null +++ b/blockem/lang/ru/strings.php @@ -0,0 +1,16 @@ +=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; } +}} +$a->strings['Blockem'] = 'Blockem'; +$a->strings['Hides user\'s content by collapsing posts. Also replaces their avatar with generic image.'] = 'Скрыть контент пользователя. Также заменяет его аватар изображением по-умолчанию.'; +$a->strings['Comma separated profile URLS:'] = 'URL профилей, разделенные запятыми:'; +$a->strings['Save Settings'] = 'Сохранить настройки'; +$a->strings['BLOCKEM Settings saved.'] = 'BLOCKEM Настройки сохранены.'; +$a->strings['Filtered user: %s'] = 'Отфильтрованный пользователь: %s'; +$a->strings['Unblock Author'] = 'Разблокировать автора'; +$a->strings['Block Author'] = 'Блокировать автора'; +$a->strings['blockem settings updated'] = 'Настройки Blockem обновлены'; diff --git a/blockem/lang/sv/messages.po b/blockem/lang/sv/messages.po new file mode 100644 index 00000000..ede8ee94 --- /dev/null +++ b/blockem/lang/sv/messages.po @@ -0,0 +1,47 @@ +# ADDON blockem +# Copyright (C) +# This file is distributed under the same license as the Friendica blockem addon package. +# +# +# Translators: +# Bjoessi , 2019 +msgid "" +msgstr "" +"Project-Id-Version: friendica\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-21 19:13-0500\n" +"PO-Revision-Date: 2021-12-22 15:27+0000\n" +"Last-Translator: Transifex Bot <>\n" +"Language-Team: Swedish (http://www.transifex.com/Friendica/friendica/language/sv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: sv\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: blockem.php:39 +msgid "" +"Hides user's content by collapsing posts. Also replaces their avatar with " +"generic image." +msgstr "Döljer användares inlägg genom sammanslagning nedåt. Användarens profilbild ersätts med en standardbild." + +#: blockem.php:40 +msgid "Comma separated profile URLS:" +msgstr "Kommaseparerade profiladresser:" + +#: blockem.php:45 +msgid "Blockem" +msgstr "BLOCKEM" + +#: blockem.php:120 +#, php-format +msgid "Filtered user: %s" +msgstr "Filtrerat på användare:%s" + +#: blockem.php:183 +msgid "Unblock Author" +msgstr "Avblockera författare" + +#: blockem.php:185 +msgid "Block Author" +msgstr "Blockera författare" diff --git a/blockem/lang/sv/strings.php b/blockem/lang/sv/strings.php new file mode 100644 index 00000000..724e2d23 --- /dev/null +++ b/blockem/lang/sv/strings.php @@ -0,0 +1,13 @@ +strings['Hides user\'s content by collapsing posts. Also replaces their avatar with generic image.'] = 'Döljer användares inlägg genom sammanslagning nedåt. Användarens profilbild ersätts med en standardbild.'; +$a->strings['Comma separated profile URLS:'] = 'Kommaseparerade profiladresser:'; +$a->strings['Blockem'] = 'BLOCKEM'; +$a->strings['Filtered user: %s'] = 'Filtrerat på användare:%s'; +$a->strings['Unblock Author'] = 'Avblockera författare'; +$a->strings['Block Author'] = 'Blockera författare'; diff --git a/blockem/lang/zh-cn/strings.php b/blockem/lang/zh-cn/strings.php new file mode 100644 index 00000000..3a3dfaeb --- /dev/null +++ b/blockem/lang/zh-cn/strings.php @@ -0,0 +1,10 @@ +strings["\"Blockem\" Settings"] = "「Blockem」配置"; +$a->strings["Comma separated profile URLS to block"] = "逗号分简介URL为栏"; +$a->strings["Submit"] = "提交"; +$a->strings["BLOCKEM Settings saved."] = "「Blockem」配置保存了。"; +$a->strings["Blocked %s - Click to open/close"] = "%s拦了-点击为开关"; +$a->strings["Unblock Author"] = "不拦作家"; +$a->strings["Block Author"] = "拦作家"; +$a->strings["blockem settings updated"] = "blockem设置更新了"; diff --git a/blockem/templates/settings.tpl b/blockem/templates/settings.tpl new file mode 100644 index 00000000..67398400 --- /dev/null +++ b/blockem/templates/settings.tpl @@ -0,0 +1 @@ +{{include file="field_textarea.tpl" field=$words}} diff --git a/bluesky/README.md b/bluesky/README.md deleted file mode 100644 index bf900fcd..00000000 --- a/bluesky/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Bluesky Addon -============== - -This addon supports posting to and receiving posts from Bluesky. - -No setup is needed for the admins to make it work for their users. - -Bluesky itself is under development as well. It is planned to make it decentral. -The addon is prepared to support different servers. But it isn't enabled yet. \ No newline at end of file diff --git a/bluesky/bluesky.php b/bluesky/bluesky.php deleted file mode 100644 index e1f096c7..00000000 --- a/bluesky/bluesky.php +++ /dev/null @@ -1,1209 +0,0 @@ - - * - * @todo - * Currently technical issues in the core: - * - Outgoing mentions - * - * At some point in time: - * - post videos - * - direct messages - * - Sending Quote shares https://atproto.com/lexicons/app-bsky-embed#appbskyembedrecord and https://atproto.com/lexicons/app-bsky-embed#appbskyembedrecordwithmedia - * - * Possibly not possible: - * - only fetch new posts - * - * Currently not possible, due to limitations in Friendica - * - mute contacts https://atproto.com/lexicons/app-bsky-graph#appbskygraphmuteactor - * - unmute contacts https://atproto.com/lexicons/app-bsky-graph#appbskygraphunmuteactor - * - * Possibly interesting: - * - https://atproto.com/lexicons/com-atproto-label#comatprotolabelsubscribelabels - */ - -use Friendica\Content\Text\BBCode; -use Friendica\Content\Text\Plaintext; -use Friendica\Core\Cache\Enum\Duration; -use Friendica\Core\Config\Util\ConfigFileManager; -use Friendica\Core\Hook; -use Friendica\Core\Protocol; -use Friendica\Core\Renderer; -use Friendica\Core\Worker; -use Friendica\Database\DBA; -use Friendica\DI; -use Friendica\Model\Contact; -use Friendica\Model\Conversation; -use Friendica\Model\Item; -use Friendica\Model\Photo; -use Friendica\Model\Post; -use Friendica\Model\User; -use Friendica\Object\Image; -use Friendica\Protocol\Activity; -use Friendica\Protocol\ATProtocol; -use Friendica\Protocol\Relay; -use Friendica\Util\DateTimeFormat; -use Friendica\Util\Strings; - -const BLUESKY_DEFAULT_POLL_INTERVAL = 10; // given in minutes -const BLUESKY_IMAGE_SIZE = [1000000, 500000, 100000, 50000]; - -function bluesky_install() -{ - Hook::register('load_config', __FILE__, 'bluesky_load_config'); - Hook::register('hook_fork', __FILE__, 'bluesky_hook_fork'); - Hook::register('post_local', __FILE__, 'bluesky_post_local'); - Hook::register('notifier_normal', __FILE__, 'bluesky_send'); - Hook::register('jot_networks', __FILE__, 'bluesky_jot_nets'); - Hook::register('connector_settings', __FILE__, 'bluesky_settings'); - Hook::register('connector_settings_post', __FILE__, 'bluesky_settings_post'); - Hook::register('cron', __FILE__, 'bluesky_cron'); - Hook::register('support_follow', __FILE__, 'bluesky_support_follow'); - Hook::register('follow', __FILE__, 'bluesky_follow'); - Hook::register('unfollow', __FILE__, 'bluesky_unfollow'); - Hook::register('block', __FILE__, 'bluesky_block'); - Hook::register('unblock', __FILE__, 'bluesky_unblock'); - Hook::register('check_item_notification', __FILE__, 'bluesky_check_item_notification'); - Hook::register('item_by_link', __FILE__, 'bluesky_item_by_link'); -} - -function bluesky_load_config(ConfigFileManager $loader) -{ - DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('bluesky'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); -} - -function bluesky_check_item_notification(array &$notification_data) -{ - if (empty($notification_data['uid'])) { - return; - } - - $did = DI::atProtocol()->getUserDid($notification_data['uid']); - if (empty($did)) { - return; - } - - $notification_data['profiles'][] = $did; -} - -function bluesky_item_by_link(array &$hookData) -{ - // Don't overwrite an existing result - if (isset($hookData['item_id'])) { - return; - } - - if (substr($hookData['uri'], 0, 5) != 'at://') { - if (!preg_match('#^' . ATProtocol::WEB . '/profile/(.+)/post/(.+)#', $hookData['uri'], $matches)) { - return; - } - - $did = DI::atProtocol()->getDid($matches[1]); - if (empty($did)) { - return; - } - - DI::logger()->debug('Found bluesky post', ['uri' => $hookData['uri'], 'did' => $did, 'cid' => $matches[2]]); - - $uri = 'at://' . $did . '/app.bsky.feed.post/' . $matches[2]; - } else { - $uri = $hookData['uri']; - } - - $uri = DI::atpProcessor()->fetchMissingPost($uri, $hookData['uid'], Item::PR_FETCHED, 0, 0); - DI::logger()->debug('Got post', ['uri' => $uri]); - if (!empty($uri)) { - $item = Post::selectFirst(['id'], ['uri' => $uri, 'uid' => $hookData['uid']]); - if (!empty($item['id'])) { - $hookData['item_id'] = $item['id']; - } - } -} - -function bluesky_support_follow(array &$data) -{ - if ($data['protocol'] == Protocol::BLUESKY) { - $data['result'] = true; - } -} - -function bluesky_follow(array &$hook_data) -{ - $token = DI::atProtocol()->getUserToken($hook_data['uid']); - if (empty($token)) { - return; - } - - DI::logger()->debug('Check if contact is bluesky', ['data' => $hook_data]); - $contact = DBA::selectFirst('contact', [], ['network' => Protocol::BLUESKY, 'nurl' => Strings::normaliseLink($hook_data['url']), 'uid' => [0, $hook_data['uid']]]); - if (empty($contact)) { - return; - } - - $record = [ - 'subject' => $contact['url'], - 'createdAt' => DateTimeFormat::utcNow(DateTimeFormat::ATOM), - '$type' => 'app.bsky.graph.follow' - ]; - - $post = [ - 'collection' => 'app.bsky.graph.follow', - 'repo' => DI::atProtocol()->getUserDid($hook_data['uid']), - 'record' => $record - ]; - - $activity = DI::atProtocol()->XRPCPost($hook_data['uid'], 'com.atproto.repo.createRecord', $post); - if (!empty($activity->uri)) { - $hook_data['contact'] = $contact; - DI::logger()->debug('Successfully start following', ['url' => $contact['url'], 'uri' => $activity->uri]); - } -} - -function bluesky_unfollow(array &$hook_data) -{ - $token = DI::atProtocol()->getUserToken($hook_data['uid']); - if (empty($token)) { - return; - } - - if ($hook_data['contact']['network'] != Protocol::BLUESKY) { - return; - } - - $data = DI::atProtocol()->XRPCGet('app.bsky.actor.getProfile', ['actor' => $hook_data['contact']['url']], $hook_data['uid']); - if (empty($data->viewer) || empty($data->viewer->following)) { - return; - } - - bluesky_delete_post($data->viewer->following, $hook_data['uid']); - - $hook_data['result'] = true; -} - -function bluesky_block(array &$hook_data) -{ - $token = DI::atProtocol()->getUserToken($hook_data['uid']); - if (empty($token)) { - return; - } - - if ($hook_data['contact']['network'] != Protocol::BLUESKY) { - return; - } - - $record = [ - 'subject' => $hook_data['contact']['url'], - 'createdAt' => DateTimeFormat::utcNow(DateTimeFormat::ATOM), - '$type' => 'app.bsky.graph.block' - ]; - - $post = [ - 'collection' => 'app.bsky.graph.block', - 'repo' => DI::atProtocol()->getUserDid($hook_data['uid']), - 'record' => $record - ]; - - $activity = DI::atProtocol()->XRPCPost($hook_data['uid'], 'com.atproto.repo.createRecord', $post); - if (!empty($activity->uri)) { - $ucid = Contact::getUserContactId($hook_data['contact']['id'], $hook_data['uid']); - if ($ucid) { - Contact::remove($ucid); - } - DI::logger()->debug('Successfully blocked contact', ['url' => $hook_data['contact']['url'], 'uri' => $activity->uri]); - } -} - -function bluesky_unblock(array &$hook_data) -{ - $token = DI::atProtocol()->getUserToken($hook_data['uid']); - if (empty($token)) { - return; - } - - if ($hook_data['contact']['network'] != Protocol::BLUESKY) { - return; - } - - $data = DI::atProtocol()->XRPCGet('app.bsky.actor.getProfile', ['actor' => $hook_data['contact']['url']], $hook_data['uid']); - if (empty($data->viewer) || empty($data->viewer->blocking)) { - return; - } - - bluesky_delete_post($data->viewer->blocking, $hook_data['uid']); - - $hook_data['result'] = true; -} - -function bluesky_addon_admin(string &$o) -{ - $t = Renderer::getMarkupTemplate('admin.tpl', 'addon/bluesky/'); - - $o = Renderer::replaceMacros($t, [ - '$submit' => DI::l10n()->t('Save Settings'), - '$friendica_handles' => ['friendica_handles', DI::l10n()->t('Allow your users to use your hostname for their Bluesky handles'), DI::config()->get('bluesky', 'friendica_handles'), DI::l10n()->t('Before enabling this option, you have to setup a wildcard domain configuration and you have to enable wildcard requests in your webserver configuration. On Apache this is done by adding "ServerAlias *.%s" to your HTTP configuration. You don\'t need to change the HTTPS configuration.', DI::baseUrl()->getHost())], - ]); -} - -function bluesky_addon_admin_post() -{ - DI::config()->set('bluesky', 'friendica_handles', (bool)$_POST['friendica_handles']); -} - -function bluesky_settings(array &$data) -{ - if (!DI::userSession()->getLocalUserId()) { - return; - } - - $enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'post') ?? false; - $def_enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'post_by_default') ?? false; - $pds = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'pds'); - $handle = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'handle'); - $did = DI::atProtocol()->getUserDid(DI::userSession()->getLocalUserId()); - $token = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'access_token'); - $import = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'import') ?? false; - $import_feeds = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'import_feeds') ?? false; - $complete_threads = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'complete_threads') ?? false; - $custom_handle = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'friendica_handle') ?? false; - - if (DI::config()->get('bluesky', 'friendica_handles')) { - $self = User::getById(DI::userSession()->getLocalUserId(), ['nickname']); - $host_handle = $self['nickname'] . '.' . DI::baseUrl()->getHost(); - $friendica_handle = ['bluesky_friendica_handle', DI::l10n()->t('Allow to use %s as your Bluesky handle.', $host_handle), $custom_handle, DI::l10n()->t('When enabled, you can use %s as your Bluesky handle. After you enabled this option, please go to https://bsky.app/settings and select to change your handle. Select that you have got your own domain. Then enter %s and select "No DNS Panel". Then select "Verify Text File".', $host_handle, $host_handle)]; - if ($custom_handle) { - $handle = $host_handle; - } - } else { - $friendica_handle = []; - } - - $t = Renderer::getMarkupTemplate('connector_settings.tpl', 'addon/bluesky/'); - $html = Renderer::replaceMacros($t, [ - '$enable' => ['bluesky', DI::l10n()->t('Enable Bluesky Post Addon'), $enabled], - '$bydefault' => ['bluesky_bydefault', DI::l10n()->t('Post to Bluesky by default'), $def_enabled], - '$import' => ['bluesky_import', DI::l10n()->t('Import the remote timeline'), $import], - '$import_feeds' => ['bluesky_import_feeds', DI::l10n()->t('Import the pinned feeds'), $import_feeds, DI::l10n()->t('When activated, Posts will be imported from all the feeds that you pinned in Bluesky.')], - '$complete_threads' => ['bluesky_complete_threads', DI::l10n()->t('Complete the threads'), $complete_threads, DI::l10n()->t('When activated, the system fetches additional replies for the posts in the timeline. This leads to more complete threads.')], - '$custom_handle' => $friendica_handle, - '$pds' => ['bluesky_pds', DI::l10n()->t('Personal Data Server'), $pds, DI::l10n()->t('The personal data server (PDS) is the system that hosts your profile.'), '', 'readonly'], - '$handle' => ['bluesky_handle', DI::l10n()->t('Bluesky handle'), $handle, '', '', $custom_handle ? 'readonly' : ''], - '$did' => ['bluesky_did', DI::l10n()->t('Bluesky DID'), $did, DI::l10n()->t('This is the unique identifier. It will be fetched automatically, when the handle is entered.'), '', 'readonly'], - '$password' => ['bluesky_password', DI::l10n()->t('Bluesky app password'), '', DI::l10n()->t("Please don't add your real password here, but instead create a specific app password in the Bluesky settings.")], - '$status' => bluesky_get_status($handle, $did, $pds, $token), - ]); - - $data = [ - 'connector' => 'bluesky', - 'title' => DI::l10n()->t('Bluesky Import/Export'), - 'image' => 'images/bluesky.jpg', - 'enabled' => $enabled, - 'html' => $html, - ]; -} - -function bluesky_get_status(string $handle = null, string $did = null, string $pds = null, string $token = null): string -{ - if (empty($handle)) { - return DI::l10n()->t('You are not authenticated. Please enter your handle and the app password.'); - } - - $status = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'status') ?? ATProtocol::STATUS_UNKNOWN; - $message = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'status-message') ?? ''; - - // Fallback mechanism for connection that had been established before the introduction of the status - if ($status == ATProtocol::STATUS_UNKNOWN) { - if (empty($did)) { - $status = ATProtocol::STATUS_DID_FAIL; - } elseif (empty($pds)) { - $status = ATProtocol::STATUS_PDS_FAIL; - } elseif (!empty($token)) { - $status = ATProtocol::STATUS_TOKEN_OK; - } else { - $status = ATProtocol::STATUS_TOKEN_FAIL; - } - } - - switch ($status) { - case ATProtocol::STATUS_TOKEN_OK: - return DI::l10n()->t("You are authenticated to Bluesky. For security reasons the password isn't stored."); - case ATProtocol::STATUS_SUCCESS: - return DI::l10n()->t('The communication with the personal data server service (PDS) is established.'); - case ATProtocol::STATUS_API_FAIL; - return DI::l10n()->t('Communication issues with the personal data server service (PDS): %s', $message); - case ATProtocol::STATUS_DID_FAIL: - return DI::l10n()->t('The DID for the provided handle could not be detected. Please check if you entered the correct handle.'); - case ATProtocol::STATUS_PDS_FAIL: - return DI::l10n()->t('The personal data server service (PDS) could not be detected.'); - case ATProtocol::STATUS_TOKEN_FAIL: - return DI::l10n()->t('The authentication with the provided handle and password failed. Please check if you entered the correct password.'); - default: - return ''; - } -} - -function bluesky_settings_post(array &$b) -{ - if (empty($_POST['bluesky-submit'])) { - return; - } - - $old_pds = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'pds'); - $old_handle = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'handle'); - $old_did = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'did'); - - $handle = trim($_POST['bluesky_handle'], ' @'); - - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'bluesky', 'post', intval($_POST['bluesky'])); - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'bluesky', 'post_by_default', intval($_POST['bluesky_bydefault'])); - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'bluesky', 'handle', $handle); - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'bluesky', 'import', intval($_POST['bluesky_import'])); - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'bluesky', 'import_feeds', intval($_POST['bluesky_import_feeds'])); - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'bluesky', 'complete_threads', intval($_POST['bluesky_complete_threads'])); - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'bluesky', 'friendica_handle', intval($_POST['bluesky_friendica_handle'] ?? false)); - - if (!empty($handle)) { - $did = DI::atProtocol()->getUserDid(DI::userSession()->getLocalUserId(), empty($old_did) || $old_handle != $handle); - if (!empty($did) && (empty($old_pds) || $old_handle != $handle)) { - $pds = DI::atProtocol()->getPdsOfDid($did); - if (empty($pds)) { - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'bluesky', 'status', ATProtocol::STATUS_PDS_FAIL); - } - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'bluesky', 'pds', $pds); - } else { - $pds = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'pds'); - } - } else { - DI::pConfig()->delete(DI::userSession()->getLocalUserId(), 'bluesky', 'did'); - DI::pConfig()->delete(DI::userSession()->getLocalUserId(), 'bluesky', 'pds'); - DI::pConfig()->delete(DI::userSession()->getLocalUserId(), 'bluesky', 'password'); - DI::pConfig()->delete(DI::userSession()->getLocalUserId(), 'bluesky', 'access_token'); - DI::pConfig()->delete(DI::userSession()->getLocalUserId(), 'bluesky', 'refresh_token'); - DI::pConfig()->delete(DI::userSession()->getLocalUserId(), 'bluesky', 'token_created'); - DI::pConfig()->delete(DI::userSession()->getLocalUserId(), 'bluesky', 'status'); - } - - if (!empty($did) && !empty($pds) && !empty($_POST['bluesky_password'])) { - DI::atProtocol()->createUserToken(DI::userSession()->getLocalUserId(), $_POST['bluesky_password']); - } -} - -function bluesky_jot_nets(array &$jotnets_fields) -{ - if (!DI::userSession()->getLocalUserId()) { - return; - } - - if (DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'post')) { - $jotnets_fields[] = [ - 'type' => 'checkbox', - 'field' => [ - 'bluesky_enable', - DI::l10n()->t('Post to Bluesky'), - DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'post_by_default') - ] - ]; - } -} - -function bluesky_cron() -{ - $last = (int)DI::keyValue()->get('bluesky_last_poll'); - - $poll_interval = intval(DI::config()->get('bluesky', 'poll_interval')); - if (!$poll_interval) { - $poll_interval = BLUESKY_DEFAULT_POLL_INTERVAL; - } - - if ($last) { - $next = $last + ($poll_interval * 60); - if ($next > time()) { - DI::logger()->notice('poll interval not reached'); - return; - } - } - DI::logger()->notice('cron_start'); - - $abandon_days = intval(DI::config()->get('system', 'account_abandon_days')); - if ($abandon_days < 1) { - $abandon_days = 0; - } - - $abandon_limit = date(DateTimeFormat::MYSQL, time() - $abandon_days * 86400); - - $pconfigs = DBA::selectToArray('pconfig', [], ["`cat` = ? AND `k` IN (?, ?) AND `v`", 'bluesky', 'import', 'import_feeds']); - foreach ($pconfigs as $pconfig) { - if (empty(DI::atProtocol()->getUserDid($pconfig['uid']))) { - DI::logger()->debug('User has got no valid DID', ['uid' => $pconfig['uid']]); - continue; - } - - if ($abandon_days != 0) { - if (!DBA::exists('user', ["`uid` = ? AND `login_date` >= ?", $pconfig['uid'], $abandon_limit])) { - DI::logger()->notice('abandoned account: timeline from user will not be imported', ['user' => $pconfig['uid']]); - continue; - } - } - - // Refresh the token now, so that it doesn't need to be refreshed in parallel by the following workers - DI::logger()->debug('Refresh the token', ['uid' => $pconfig['uid']]); - DI::atProtocol()->getUserToken($pconfig['uid']); - - $last_sync = DI::pConfig()->get($pconfig['uid'], 'bluesky', 'last_contact_sync'); - if ($last_sync < (time() - 86400)) { - DI::atpActor()->syncContacts($pconfig['uid']); - DI::pConfig()->set($pconfig['uid'], 'bluesky', 'last_contact_sync', time()); - } - - Worker::add(['priority' => Worker::PRIORITY_MEDIUM, 'force_priority' => true], 'addon/bluesky/bluesky_notifications.php', $pconfig['uid']); - if (DI::pConfig()->get($pconfig['uid'], 'bluesky', 'import')) { - Worker::add(['priority' => Worker::PRIORITY_MEDIUM, 'force_priority' => true], 'addon/bluesky/bluesky_timeline.php', $pconfig['uid']); - } - if (DI::pConfig()->get($pconfig['uid'], 'bluesky', 'import_feeds')) { - DI::logger()->debug('Fetch feeds for user', ['uid' => $pconfig['uid']]); - $feeds = bluesky_get_feeds($pconfig['uid']); - foreach ($feeds as $feed) { - Worker::add(['priority' => Worker::PRIORITY_MEDIUM, 'force_priority' => true], 'addon/bluesky/bluesky_feed.php', $pconfig['uid'], $feed); - } - } - DI::logger()->debug('Polling done for user', ['uid' => $pconfig['uid']]); - } - - DI::logger()->notice('Polling done for all users'); - - DI::keyValue()->set('bluesky_last_poll', time()); - - $last_clean = DI::keyValue()->get('bluesky_last_clean'); - if (empty($last_clean) || ($last_clean + 86400 < time())) { - DI::logger()->notice('Start contact cleanup'); - $contacts = DBA::select('account-user-view', ['id', 'pid'], ["`network` = ? AND `uid` != ? AND `rel` = ?", Protocol::BLUESKY, 0, Contact::NOTHING]); - while ($contact = DBA::fetch($contacts)) { - Worker::add(Worker::PRIORITY_LOW, 'MergeContact', $contact['pid'], $contact['id'], 0); - } - DBA::close($contacts); - DI::keyValue()->set('bluesky_last_clean', time()); - DI::logger()->notice('Contact cleanup done'); - } - - DI::logger()->notice('cron_end'); -} - -function bluesky_hook_fork(array &$b) -{ - if ($b['name'] != 'notifier_normal') { - return; - } - - $post = $b['data']; - - if (($post['created'] !== $post['edited']) && !$post['deleted']) { - DI::logger()->info('Editing is not supported by the addon'); - $b['execute'] = false; - return; - } - - if (DI::pConfig()->get($post['uid'], 'bluesky', 'import')) { - // Don't post if it isn't a reply to a bluesky post - if (($post['gravity'] != Item::GRAVITY_PARENT) && !Post::exists(['id' => $post['parent'], 'network' => Protocol::BLUESKY])) { - DI::logger()->notice('No bluesky parent found', ['item' => $post['id']]); - $b['execute'] = false; - return; - } - } elseif (!strstr($post['postopts'] ?? '', 'bluesky') || ($post['gravity'] != Item::GRAVITY_PARENT) || ($post['private'] == Item::PRIVATE)) { - DI::logger()->info('Post will not be exported', ['uid' => $post['uid'], 'postopts' => $post['postopts'], 'gravity' => $post['gravity'], 'private' => $post['private']]); - $b['execute'] = false; - return; - } -} - -function bluesky_post_local(array &$b) -{ - if (!DI::userSession()->getLocalUserId() || (DI::userSession()->getLocalUserId() != $b['uid'])) { - return; - } - - if ($b['edit'] || ($b['private'] == Item::PRIVATE) || ($b['gravity'] != Item::GRAVITY_PARENT)) { - return; - } - - $bluesky_post = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'post')); - $bluesky_enable = (($bluesky_post && !empty($_REQUEST['bluesky_enable'])) ? intval($_REQUEST['bluesky_enable']) : 0); - - // if API is used, default to the chosen settings - if ($b['api_source'] && intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'bluesky', 'post_by_default'))) { - $bluesky_enable = 1; - } - - if (!$bluesky_enable) { - return; - } - - if (strlen($b['postopts'])) { - $b['postopts'] .= ','; - } - - $b['postopts'] .= 'bluesky'; -} - -function bluesky_send(array &$b) -{ - if (($b['created'] !== $b['edited']) && !$b['deleted']) { - return; - } - - if (Item::isGroupPost($b['uri-id'])) { - return; - } - - if ($b['gravity'] != Item::GRAVITY_PARENT) { - DI::logger()->debug('Got comment', ['item' => $b]); - - if ($b['deleted']) { - $uri = DI::atpProcessor()->getUriClass($b['uri']); - if (empty($uri)) { - DI::logger()->debug('Not a bluesky post', ['uri' => $b['uri']]); - return; - } - bluesky_delete_post($b['uri'], $b['uid']); - return; - } - - $root = DI::atpProcessor()->getUriClass($b['parent-uri']); - $parent = DI::atpProcessor()->getUriClass($b['thr-parent']); - - if (empty($root) || empty($parent)) { - DI::logger()->debug('No bluesky post', ['parent' => $b['parent'], 'thr-parent' => $b['thr-parent']]); - return; - } - - if ($b['gravity'] == Item::GRAVITY_COMMENT) { - DI::logger()->debug('Posting comment', ['root' => $root, 'parent' => $parent]); - bluesky_create_post($b, $root, $parent); - return; - } elseif (in_array($b['verb'], [Activity::LIKE, Activity::ANNOUNCE])) { - bluesky_create_activity($b, $parent); - } - return; - } elseif (($b['private'] == Item::PRIVATE) || !strstr($b['postopts'], 'bluesky')) { - return; - } - - bluesky_create_post($b); -} - -function bluesky_create_activity(array $item, stdClass $parent = null) -{ - $uid = $item['uid']; - $token = DI::atProtocol()->getUserToken($uid); - if (empty($token)) { - return; - } - - $did = DI::atProtocol()->getUserDid($uid); - if (empty($did)) { - return; - } - - $post = []; - - if ($item['verb'] == Activity::LIKE) { - $record = [ - 'subject' => $parent, - 'createdAt' => DateTimeFormat::utcNow(DateTimeFormat::ATOM), - '$type' => 'app.bsky.feed.like' - ]; - - $post = [ - 'collection' => 'app.bsky.feed.like', - 'repo' => $did, - 'record' => $record - ]; - } elseif ($item['verb'] == Activity::ANNOUNCE) { - $record = [ - 'subject' => $parent, - 'createdAt' => DateTimeFormat::utcNow(DateTimeFormat::ATOM), - '$type' => 'app.bsky.feed.repost' - ]; - - $post = [ - 'collection' => 'app.bsky.feed.repost', - 'repo' => $did, - 'record' => $record - ]; - } - - $activity = DI::atProtocol()->XRPCPost($uid, 'com.atproto.repo.createRecord', $post); - if (empty($activity->uri)) { - return; - } - DI::logger()->debug('Activity done', ['return' => $activity]); - $uri = DI::atpProcessor()->getUri($activity); - Item::update(['extid' => $uri], ['guid' => $item['guid']]); - DI::logger()->debug('Set extid', ['id' => $item['id'], 'extid' => $activity]); -} - -function bluesky_create_post(array $item, stdClass $root = null, stdClass $parent = null) -{ - $uid = $item['uid']; - $token = DI::atProtocol()->getUserToken($uid); - if (empty($token)) { - return; - } - - // Try to fetch the language from the post itself - if (!empty($item['language'])) { - $language = array_key_first(json_decode($item['language'], true)); - } else { - $language = ''; - } - - $item['body'] = Post\Media::removeFromBody($item['body']); - - foreach (Post\Media::getByURIId($item['uri-id'], [Post\Media::AUDIO, Post\Media::VIDEO, Post\Media::ACTIVITY]) as $media) { - if (strpos($item['body'], $media['url']) === false) { - $item['body'] .= "\n[url]" . $media['url'] . "[/url]\n"; - } - } - - if (!empty($item['quote-uri-id'])) { - $quote = Post::selectFirstPost(['uri', 'plink'], ['uri-id' => $item['quote-uri-id']]); - if (!empty($quote)) { - if ((strpos($item['body'], $quote['plink'] ?: $quote['uri']) === false) && (strpos($item['body'], $quote['uri']) === false)) { - $item['body'] .= "\n[url]" . ($quote['plink'] ?: $quote['uri']) . "[/url]\n"; - } - } - } - - $item['body'] = bluesky_set_mentions($item['body']); - - $urls = bluesky_get_urls($item['body']); - $item['body'] = $urls['body']; - - $msg = Plaintext::getPost($item, 300, false, BBCode::BLUESKY); - foreach ($msg['parts'] as $key => $part) { - - $facets = bluesky_get_facets($part, $urls['urls']); - - $record = [ - 'text' => $facets['body'], - '$type' => 'app.bsky.feed.post', - 'createdAt' => DateTimeFormat::utcNow(DateTimeFormat::ATOM), - ]; - - if (!empty($language)) { - $record['langs'] = [$language]; - } - - if (!empty($facets['facets'])) { - $record['facets'] = $facets['facets']; - } - - if (!empty($root)) { - $record['reply'] = ['root' => $root, 'parent' => $parent]; - } - - if ($key == count($msg['parts']) - 1) { - $record = bluesky_add_embed($uid, $msg, $record); - if (empty($record)) { - if (Worker::getRetrial() < 3) { - Worker::defer(); - } - return; - } - } - - $post = [ - 'collection' => 'app.bsky.feed.post', - 'repo' => DI::atProtocol()->getUserDid($uid), - 'record' => $record - ]; - - $parent = DI::atProtocol()->XRPCPost($uid, 'com.atproto.repo.createRecord', $post); - if (empty($parent->uri)) { - if ($part == 0) { - Worker::defer(); - } - return; - } - DI::logger()->debug('Posting done', ['return' => $parent]); - if (empty($root)) { - $root = $parent; - } - if (($key == 0) && ($item['gravity'] != Item::GRAVITY_PARENT)) { - $uri = DI::atpProcessor()->getUri($parent); - Item::update(['extid' => $uri], ['guid' => $item['guid']]); - DI::logger()->debug('Set extid', ['id' => $item['id'], 'extid' => $uri]); - } - } -} - -function bluesky_set_mentions(string $body): string -{ - // Remove all url based mention links - $body = preg_replace("/([@!])\[url\=(.*?)\](.*?)\[\/url\]/ism", '$1$3', $body); - - if (!preg_match_all("/[@!]\[url\=(did:.*?)\](.*?)\[\/url\]/ism", $body, $matches, PREG_SET_ORDER)) { - return $body; - } - - foreach ($matches as $match) { - $contact = Contact::selectFirst(['addr'], ['nurl' => $match[1]]); - if (!empty($contact['addr'])) { - $body = str_replace($match[0], '@[url=' . $match[1] . ']' . $contact['addr'] . '[/url]', $body); - } else { - $body = str_replace($match[0], '@' . $match[2], $body); - } - } - - return $body; -} - -function bluesky_get_urls(string $body): array -{ - $body = BBCode::expandVideoLinks($body); - $urls = []; - - // Search for Mentions - if (preg_match_all("/[@!]\[url\=(did:.*?)\](.*?)\[\/url\]/ism", $body, $matches, PREG_SET_ORDER)) { - foreach ($matches as $match) { - $text = '@' . $match[2]; - $urls[strpos($body, $match[0])] = ['mention' => $match[1], 'text' => $text, 'hash' => $text]; - $body = str_replace($match[0], $text, $body); - } - } - - // Search for hash tags - if (preg_match_all("/#\[url\=(https?:.*?)\](.*?)\[\/url\]/ism", $body, $matches, PREG_SET_ORDER)) { - foreach ($matches as $match) { - $text = '#' . $match[2]; - $urls[strpos($body, $match[0])] = ['tag' => $match[2], 'text' => $text, 'hash' => $text]; - $body = str_replace($match[0], $text, $body); - } - } - - // Search for pure links - if (preg_match_all("/\[url\](https?:.*?)\[\/url\]/ism", $body, $matches, PREG_SET_ORDER)) { - foreach ($matches as $match) { - $text = Strings::getStyledURL($match[1]); - $hash = bluesky_get_hash_for_url($match[0], mb_strlen($text)); - $urls[strpos($body, $match[0])] = ['url' => $match[1], 'text' => $text, 'hash' => $hash]; - $body = str_replace($match[0], $hash, $body); - } - } - - // Search for links with descriptions - if (preg_match_all("/\[url\=(https?:.*?)\](.*?)\[\/url\]/ism", $body, $matches, PREG_SET_ORDER)) { - foreach ($matches as $match) { - if ($match[1] == $match[2]) { - $text = Strings::getStyledURL($match[1]); - } else { - $text = $match[2]; - } - if (mb_strlen($text) < 100) { - $hash = bluesky_get_hash_for_url($match[0], mb_strlen($text)); - $urls[strpos($body, $match[0])] = ['url' => $match[1], 'text' => $text, 'hash' => $hash]; - $body = str_replace($match[0], $hash, $body); - } else { - $text = Strings::getStyledURL($match[1]); - $hash = bluesky_get_hash_for_url($match[0], mb_strlen($text)); - $urls[strpos($body, $match[0])] = ['url' => $match[1], 'text' => $text, 'hash' => $hash]; - $body = str_replace($match[0], $text . ' ' . $hash, $body); - } - } - } - - asort($urls); - - return ['body' => $body, 'urls' => $urls]; -} - -function bluesky_get_hash_for_url(string $text, int $linklength): string -{ - if ($linklength <= 10) { - return '|' . hash('crc32', $text) . '|'; - } - return substr('|' . hash('crc32', $text) . base64_encode($text), 0, $linklength - 2) . '|'; -} - -function bluesky_get_facets(string $body, array $urls): array -{ - $facets = []; - - foreach ($urls as $url) { - $pos = strpos($body, $url['hash']); - if ($pos === false) { - continue; - } - if ($pos > 0) { - $prefix = substr($body, 0, $pos); - } else { - $prefix = ''; - } - - $body = $prefix . $url['text'] . substr($body, $pos + strlen($url['hash'])); - - $facet = new stdClass; - $facet->index = new stdClass; - $facet->index->byteEnd = $pos + strlen($url['text']); - $facet->index->byteStart = $pos; - - $feature = new stdClass; - - $type = '$type'; - if (!empty($url['tag'])) { - $feature->tag = $url['tag']; - $feature->$type = 'app.bsky.richtext.facet#tag'; - } elseif (!empty($url['url'])) { - $feature->uri = $url['url']; - $feature->$type = 'app.bsky.richtext.facet#link'; - } elseif (!empty($url['mention'])) { - $feature->did = $url['mention']; - $feature->$type = 'app.bsky.richtext.facet#mention'; - } else { - continue; - } - - $facet->features = [$feature]; - $facets[] = $facet; - } - - return ['facets' => $facets, 'body' => $body]; -} - -function bluesky_add_embed(int $uid, array $msg, array $record): array -{ - if (($msg['type'] != 'link') && !empty($msg['images'])) { - $images = []; - foreach ($msg['images'] as $image) { - if (count($images) == 4) { - continue; - } - $photo = Photo::selectFirst([], ['id' => $image['id']]); - $blob = bluesky_upload_blob($uid, $photo); - if (empty($blob)) { - return []; - } - $images[] = [ - 'alt' => $image['description'] ?? '', - 'image' => $blob, - 'aspectRatio' => [ - 'width' => $photo['width'], - 'height' => $photo['height'], - ] - ]; - } - if (!empty($images)) { - $record['embed'] = ['$type' => 'app.bsky.embed.images', 'images' => $images]; - } - } elseif ($msg['type'] == 'link') { - $record['embed'] = [ - '$type' => 'app.bsky.embed.external', - 'external' => [ - 'uri' => $msg['url'], - 'title' => $msg['title'] ?? '', - 'description' => $msg['description'] ?? '', - ] - ]; - if (!empty($msg['image'])) { - $photo = Photo::createPhotoForExternalResource($msg['image']); - $blob = bluesky_upload_blob($uid, $photo); - if (!empty($blob)) { - $record['embed']['external']['thumb'] = $blob; - } - } - } - return $record; -} - -function bluesky_upload_blob(int $uid, array $photo): ?stdClass -{ - $retrial = Worker::getRetrial(); - $content = Photo::getImageForPhoto($photo); - - $picture = new Image($content, $photo['type'], $photo['filename']); - $height = $picture->getHeight(); - $width = $picture->getWidth(); - $size = strlen($content); - - $picture = Photo::resizeToFileSize($picture, BLUESKY_IMAGE_SIZE[$retrial]); - $new_height = $picture->getHeight(); - $new_width = $picture->getWidth(); - $content = (string)$picture->asString(); - $new_size = strlen($content); - - if (($size != 0) && ($new_size == 0) && ($retrial == 0)) { - DI::logger()->warning('Size is empty after resize, uploading original file', ['uid' => $uid, 'retrial' => $retrial, 'height' => $new_height, 'width' => $new_width, 'size' => $new_size, 'orig-height' => $height, 'orig-width' => $width, 'orig-size' => $size]); - $content = Photo::getImageForPhoto($photo); - } else { - DI::logger()->info('Uploading', ['uid' => $uid, 'retrial' => $retrial, 'height' => $new_height, 'width' => $new_width, 'size' => $new_size, 'orig-height' => $height, 'orig-width' => $width, 'orig-size' => $size]); - } - - $data = DI::atProtocol()->post($uid, '/xrpc/com.atproto.repo.uploadBlob', $content, ['Content-type' => $photo['type'], 'Authorization' => ['Bearer ' . DI::atProtocol()->getUserToken($uid)]]); - if (empty($data) || empty($data->blob)) { - DI::logger()->info('Uploading failed', ['uid' => $uid, 'retrial' => $retrial, 'height' => $new_height, 'width' => $new_width, 'size' => $new_size, 'orig-height' => $height, 'orig-width' => $width, 'orig-size' => $size]); - return null; - } - - Item::incrementOutbound(Protocol::BLUESKY); - DI::logger()->debug('Uploaded blob', ['return' => $data, 'uid' => $uid, 'retrial' => $retrial, 'height' => $new_height, 'width' => $new_width, 'size' => $new_size, 'orig-height' => $height, 'orig-width' => $width, 'orig-size' => $size]); - return $data->blob; -} - -function bluesky_delete_post(string $uri, int $uid) -{ - $parts = DI::atpProcessor()->getUriParts($uri); - if (empty($parts)) { - DI::logger()->debug('No uri delected', ['uri' => $uri]); - return; - } - DI::atProtocol()->XRPCPost($uid, 'com.atproto.repo.deleteRecord', $parts); - DI::logger()->debug('Deleted', ['parts' => $parts]); -} - -function bluesky_fetch_timeline(int $uid) -{ - $data = DI::atProtocol()->XRPCGet('app.bsky.feed.getTimeline', [], $uid); - if (empty($data)) { - return; - } - - if (empty($data->feed)) { - return; - } - - foreach (array_reverse($data->feed) as $entry) { - $causer = DI::atpActor()->getContactByDID($entry->post->author->did, $uid, 0, true); - if (!empty($entry->reply)) { - if (!empty($entry->reply->root)) { - bluesky_complete_post($entry->reply->root, $uid, Item::PR_COMMENT, $causer['id'], Conversation::PARCEL_CONNECTOR); - } - if (!empty($entry->reply->parent)) { - bluesky_complete_post($entry->reply->parent, $uid, Item::PR_COMMENT, $causer['id'], Conversation::PARCEL_CONNECTOR); - } - } - DI::atpProcessor()->processPost($entry->post, $uid, Item::PR_NONE, 0, 0, Conversation::PARCEL_CONNECTOR); - if (!empty($entry->reason)) { - bluesky_process_reason($entry->reason, DI::atpProcessor()->getUri($entry->post), $uid); - } - } -} - -function bluesky_complete_post(stdClass $post, int $uid, int $post_reason, int $causer, int $protocol): int -{ - $complete = DI::pConfig()->get($uid, 'bluesky', 'complete_threads'); - $existing_uri = DI::atpProcessor()->getPostUri(DI::atpProcessor()->getUri($post), $uid); - if (!empty($existing_uri)) { - $comments = Post::countPosts(['thr-parent' => $existing_uri, 'gravity' => Item::GRAVITY_COMMENT]); - if (($post->replyCount <= $comments) || !$complete) { - return DI::atpProcessor()->fetchUriId($existing_uri, $uid); - } - } - - if ($complete) { - $uri = DI::atpProcessor()->fetchMissingPost(DI::atpProcessor()->getUri($post), $uid, $post_reason, $causer, 0, '', true, $protocol); - $uri_id = DI::atpProcessor()->fetchUriId($uri, $uid); - } else { - $uri_id = DI::atpProcessor()->processPost($post, $uid, $post_reason, $causer, 0, $protocol); - } - return $uri_id; -} - -function bluesky_process_reason(stdClass $reason, string $uri, int $uid) -{ - $type = '$type'; - if ($reason->$type != 'app.bsky.feed.defs#reasonRepost') { - return; - } - - $contact = DI::atpActor()->getContactByDID($reason->by->did, $uid, 0); - - $item = [ - 'network' => Protocol::BLUESKY, - 'protocol' => Conversation::PARCEL_CONNECTOR, - 'uid' => $uid, - 'wall' => false, - 'uri' => $reason->by->did . '/app.bsky.feed.repost/' . $reason->indexedAt, - 'private' => Item::UNLISTED, - 'contact-id' => $contact['id'], - 'author-name' => $contact['name'], - 'author-link' => $contact['url'], - 'author-avatar' => $contact['avatar'], - 'verb' => Activity::ANNOUNCE, - 'body' => Activity::ANNOUNCE, - 'gravity' => Item::GRAVITY_ACTIVITY, - 'object-type' => Activity\ObjectType::NOTE, - 'thr-parent' => $uri, - ]; - - if (Post::exists(['uri' => $item['uri'], 'uid' => $uid])) { - return; - } - - if (Post::exists(['uid' => $item['uid'], 'thr-parent' => $item['thr-parent'], 'verb' => $item['verb'], 'contact-id' => $item['contact-id']])) { - return; - } - - $item['guid'] = Item::guidFromUri($item['uri'], $contact['alias']); - $item['owner-name'] = $item['author-name']; - $item['owner-link'] = $item['author-link']; - $item['owner-avatar'] = $item['author-avatar']; - if (Item::insert($item)) { - $pcid = Contact::getPublicContactId($contact['id'], $uid); - Item::update(['post-reason' => Item::PR_ANNOUNCEMENT, 'causer-id' => $pcid], ['uri' => $uri, 'uid' => $uid]); - } -} - -function bluesky_fetch_notifications(int $uid) -{ - $data = DI::atProtocol()->XRPCGet('app.bsky.notification.listNotifications', [], $uid); - if (empty($data->notifications)) { - return; - } - - foreach ($data->notifications as $notification) { - $uri = DI::atpProcessor()->getUri($notification); - if (Post::exists(['uri' => $uri, 'uid' => $uid]) || Post::exists(['extid' => $uri, 'uid' => $uid])) { - DI::logger()->debug('Notification already processed', ['uid' => $uid, 'reason' => $notification->reason, 'uri' => $uri, 'indexedAt' => $notification->indexedAt]); - continue; - } - DI::logger()->debug('Process notification', ['uid' => $uid, 'reason' => $notification->reason, 'uri' => $uri, 'indexedAt' => $notification->indexedAt]); - switch ($notification->reason) { - case 'like': - $item = DI::atpProcessor()->getHeaderFromPost($notification, $uri, $uid, Conversation::PARCEL_CONNECTOR); - $item['gravity'] = Item::GRAVITY_ACTIVITY; - $item['body'] = $item['verb'] = Activity::LIKE; - $item['thr-parent'] = DI::atpProcessor()->getUri($notification->record->subject); - $item['thr-parent'] = DI::atpProcessor()->fetchMissingPost($item['thr-parent'], $uid, Item::PR_FETCHED, $item['contact-id'], 0); - if (!empty($item['thr-parent'])) { - $data = Item::insert($item); - DI::logger()->debug('Got like', ['uid' => $uid, 'result' => $data, 'uri' => $uri]); - } else { - DI::logger()->info('Thread parent not found', ['uid' => $uid, 'parent' => $item['thr-parent'], 'uri' => $uri]); - } - break; - - case 'repost': - $item = DI::atpProcessor()->getHeaderFromPost($notification, $uri, $uid, Conversation::PARCEL_CONNECTOR); - $item['gravity'] = Item::GRAVITY_ACTIVITY; - $item['body'] = $item['verb'] = Activity::ANNOUNCE; - $item['thr-parent'] = DI::atpProcessor()->getUri($notification->record->subject); - $item['thr-parent'] = DI::atpProcessor()->fetchMissingPost($item['thr-parent'], $uid, Item::PR_FETCHED, $item['contact-id'], 0); - if (!empty($item['thr-parent'])) { - $data = Item::insert($item); - DI::logger()->debug('Got repost', ['uid' => $uid, 'result' => $data, 'uri' => $uri]); - } else { - DI::logger()->info('Thread parent not found', ['uid' => $uid, 'parent' => $item['thr-parent'], 'uri' => $uri]); - } - break; - - case 'follow': - $contact = DI::atpActor()->getContactByDID($notification->author->did, $uid, $uid); - DI::logger()->debug('New follower', ['uid' => $uid, 'nick' => $contact['nick'], 'uri' => $uri]); - break; - - case 'mention': - $contact = DI::atpActor()->getContactByDID($notification->author->did, $uid, 0); - $result = DI::atpProcessor()->fetchMissingPost($uri, $uid, Item::PR_TO, $contact['id'], 0); - DI::logger()->debug('Got mention', ['uid' => $uid, 'nick' => $contact['nick'], 'result' => $result, 'uri' => $uri]); - break; - - case 'reply': - $contact = DI::atpActor()->getContactByDID($notification->author->did, $uid, 0); - $result = DI::atpProcessor()->fetchMissingPost($uri, $uid, Item::PR_COMMENT, $contact['id'], 0); - DI::logger()->debug('Got reply', ['uid' => $uid, 'nick' => $contact['nick'], 'result' => $result, 'uri' => $uri]); - break; - - case 'quote': - $contact = DI::atpActor()->getContactByDID($notification->author->did, $uid, 0); - $result = DI::atpProcessor()->fetchMissingPost($uri, $uid, Item::PR_PUSHED, $contact['id'], 0); - DI::logger()->debug('Got quote', ['uid' => $uid, 'nick' => $contact['nick'], 'result' => $result, 'uri' => $uri]); - break; - - default: - DI::logger()->notice('Unhandled reason', ['reason' => $notification->reason, 'uri' => $uri]); - break; - } - } -} - -function bluesky_fetch_feed(int $uid, string $feed) -{ - $data = DI::atProtocol()->XRPCGet('app.bsky.feed.getFeed', ['feed' => $feed], $uid); - if (empty($data)) { - return; - } - - if (empty($data->feed)) { - return; - } - - $feeddata = DI::atProtocol()->XRPCGet('app.bsky.feed.getFeedGenerator', ['feed' => $feed], $uid); - if (!empty($feeddata) && !empty($feeddata->view)) { - $feedurl = $feeddata->view->uri; - $feedname = $feeddata->view->displayName; - } else { - $feedurl = $feed; - $feedname = $feed; - } - - foreach (array_reverse($data->feed) as $entry) { - $contact = DI::atpActor()->getContactByDID($entry->post->author->did, $uid, 0); - $languages = $entry->post->record->langs ?? []; - - if (!Relay::isWantedLanguage($entry->post->record->text, 0, $contact['id'] ?? 0, $languages)) { - DI::logger()->debug('Unwanted language detected', ['languages' => $languages, 'text' => $entry->post->record->text]); - continue; - } - $causer = DI::atpActor()->getContactByDID($entry->post->author->did, $uid, 0); - $uri_id = bluesky_complete_post($entry->post, $uid, Item::PR_TAG, $causer['id'], Conversation::PARCEL_CONNECTOR); - if (!empty($uri_id)) { - $stored = Post\Category::storeFileByURIId($uri_id, $uid, Post\Category::SUBCRIPTION, $feedname, $feedurl); - DI::logger()->debug('Stored tag subscription for user', ['uri-id' => $uri_id, 'uid' => $uid, 'name' => $feedname, 'url' => $feedurl, 'stored' => $stored]); - } else { - DI::logger()->notice('Post not found', ['entry' => $entry]); - } - if (!empty($entry->reason)) { - bluesky_process_reason($entry->reason, DI::atpProcessor()->getUri($entry->post), $uid); - } - } -} - -function bluesky_get_feeds(int $uid): array -{ - $type = '$type'; - $preferences = bluesky_get_preferences($uid); - if (empty($preferences) || empty($preferences->preferences)) { - return []; - } - foreach ($preferences->preferences as $preference) { - if ($preference->$type == 'app.bsky.actor.defs#savedFeedsPrefV2') { - $pinned = []; - foreach ($preference->items as $item) { - if (($item->type == 'feed') && $item->pinned) { - $pinned[] = $item->value; - } - } - return $pinned; - } - } - return []; -} - -function bluesky_get_preferences(int $uid): ?stdClass -{ - $cachekey = 'bluesky:preferences:' . $uid; - $data = DI::cache()->get($cachekey); - if (!is_null($data)) { - return $data; - } - - $data = DI::atProtocol()->XRPCGet('app.bsky.actor.getPreferences', [], $uid); - if (empty($data)) { - return null; - } - - DI::cache()->set($cachekey, $data, Duration::HOUR); - return $data; -} diff --git a/bluesky/bluesky_feed.php b/bluesky/bluesky_feed.php deleted file mode 100644 index e4aa3fdc..00000000 --- a/bluesky/bluesky_feed.php +++ /dev/null @@ -1,16 +0,0 @@ -debug('Importing feed - start', ['user' => $argv[1], 'feed' => $argv[2]]); - bluesky_fetch_feed($argv[1], $argv[2]); - DI::logger()->debug('Importing feed - done', ['user' => $argv[1], 'feed' => $argv[2]]); -} diff --git a/bluesky/bluesky_notifications.php b/bluesky/bluesky_notifications.php deleted file mode 100644 index e1bf2047..00000000 --- a/bluesky/bluesky_notifications.php +++ /dev/null @@ -1,16 +0,0 @@ -notice('importing notifications - start', ['user' => $argv[1]]); - bluesky_fetch_notifications($argv[1]); - DI::logger()->notice('importing notifications - done', ['user' => $argv[1]]); -} diff --git a/bluesky/bluesky_timeline.php b/bluesky/bluesky_timeline.php deleted file mode 100644 index 37b22d99..00000000 --- a/bluesky/bluesky_timeline.php +++ /dev/null @@ -1,16 +0,0 @@ -notice('importing timeline - start', ['user' => $argv[1]]); - bluesky_fetch_timeline($argv[1]); - DI::logger()->notice('importing timeline - done', ['user' => $argv[1]]); -} diff --git a/bluesky/lang/C/messages.po b/bluesky/lang/C/messages.po deleted file mode 100644 index d573972c..00000000 --- a/bluesky/lang/C/messages.po +++ /dev/null @@ -1,133 +0,0 @@ -# ADDON bluesky -# Copyright (C) -# This file is distributed under the same license as the Friendica bluesky addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-29 18:16+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: bluesky.php:335 -msgid "Save Settings" -msgstr "" - -#: bluesky.php:336 -msgid "Allow your users to use your hostname for their Bluesky handles" -msgstr "" - -#: bluesky.php:336 -#, php-format -msgid "Before enabling this option, you have to setup a wildcard domain configuration and you have to enable wildcard requests in your webserver configuration. On Apache this is done by adding \"ServerAlias *.%s\" to your HTTP configuration. You don't need to change the HTTPS configuration." -msgstr "" - -#: bluesky.php:365 -#, php-format -msgid "Allow to use %s as your Bluesky handle." -msgstr "" - -#: bluesky.php:365 -#, php-format -msgid "When enabled, you can use %s as your Bluesky handle. After you enabled this option, please go to https://bsky.app/settings and select to change your handle. Select that you have got your own domain. Then enter %s and select \"No DNS Panel\". Then select \"Verify Text File\"." -msgstr "" - -#: bluesky.php:375 -msgid "Enable Bluesky Post Addon" -msgstr "" - -#: bluesky.php:376 -msgid "Post to Bluesky by default" -msgstr "" - -#: bluesky.php:377 -msgid "Import the remote timeline" -msgstr "" - -#: bluesky.php:378 -msgid "Import the pinned feeds" -msgstr "" - -#: bluesky.php:378 -msgid "When activated, Posts will be imported from all the feeds that you pinned in Bluesky." -msgstr "" - -#: bluesky.php:379 -msgid "Complete the threads" -msgstr "" - -#: bluesky.php:379 -msgid "When activated, the system fetches additional replies for the posts in the timeline. This leads to more complete threads." -msgstr "" - -#: bluesky.php:381 -msgid "Personal Data Server" -msgstr "" - -#: bluesky.php:381 -msgid "The personal data server (PDS) is the system that hosts your profile." -msgstr "" - -#: bluesky.php:382 -msgid "Bluesky handle" -msgstr "" - -#: bluesky.php:383 -msgid "Bluesky DID" -msgstr "" - -#: bluesky.php:383 -msgid "This is the unique identifier. It will be fetched automatically, when the handle is entered." -msgstr "" - -#: bluesky.php:384 -msgid "Bluesky app password" -msgstr "" - -#: bluesky.php:384 -msgid "Please don't add your real password here, but instead create a specific app password in the Bluesky settings." -msgstr "" - -#: bluesky.php:390 -msgid "Bluesky Import/Export" -msgstr "" - -#: bluesky.php:400 -msgid "You are not authenticated. Please enter your handle and the app password." -msgstr "" - -#: bluesky.php:420 -msgid "You are authenticated to Bluesky. For security reasons the password isn't stored." -msgstr "" - -#: bluesky.php:422 -msgid "The communication with the personal data server service (PDS) is established." -msgstr "" - -#: bluesky.php:424 -msgid "Communication issues with the personal data server service (PDS)." -msgstr "" - -#: bluesky.php:426 -msgid "The DID for the provided handle could not be detected. Please check if you entered the correct handle." -msgstr "" - -#: bluesky.php:428 -msgid "The personal data server service (PDS) could not be detected." -msgstr "" - -#: bluesky.php:430 -msgid "The authentication with the provided handle and password failed. Please check if you entered the correct password." -msgstr "" - -#: bluesky.php:492 -msgid "Post to Bluesky" -msgstr "" diff --git a/bluesky/lang/de/messages.po b/bluesky/lang/de/messages.po deleted file mode 100644 index 13ea8e96..00000000 --- a/bluesky/lang/de/messages.po +++ /dev/null @@ -1,89 +0,0 @@ -# ADDON bluesky -# Copyright (C) -# This file is distributed under the same license as the Friendica bluesky addon package. -# -# -# Translators: -# Tobias Diekershoff , 2023 -# haheute , 2023 -# Raroun, 2023 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-24 05:52+0000\n" -"PO-Revision-Date: 2023-05-24 06:02+0000\n" -"Last-Translator: Raroun, 2023\n" -"Language-Team: German (https://app.transifex.com/Friendica/teams/12172/de/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: de\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: bluesky.php:100 -msgid "" -"You are authenticated to Bluesky. For security reasons the password isn't " -"stored." -msgstr "" -"Du bist auf Bluesky authentifiziert. Aus Sicherheitsgründen wird das " -"Passwort nicht gespeichert." - -#: bluesky.php:100 -msgid "You are not authenticated. Please enter the app password." -msgstr "" -"Du bist derzeit nicht authentifiziert. Bitte gib dein App Passwort ein." - -#: bluesky.php:104 -msgid "Enable Bluesky Post Addon" -msgstr "Bluesky Post Addon aktivieren" - -#: bluesky.php:105 -msgid "Post to Bluesky by default" -msgstr "Standardmäßig auf Bluesky veröffentlichen" - -#: bluesky.php:106 -msgid "Import the remote timeline" -msgstr "Importiere die entfernte Timeline" - -#: bluesky.php:107 -msgid "Bluesky host" -msgstr "Bluesky Host" - -#: bluesky.php:108 -msgid "Bluesky handle" -msgstr "Bluesky Handle" - -#: bluesky.php:109 -msgid "Bluesky DID" -msgstr "Bluesky DID" - -#: bluesky.php:109 -msgid "" -"This is the unique identifier. It will be fetched automatically, when the " -"handle is entered." -msgstr "" -"Sobald das Handle eingegeben ist, wird diese einzigartige Kennung " -"automatisch abgerufen." - -#: bluesky.php:110 -msgid "Bluesky app password" -msgstr "Bluesky App Passwort" - -#: bluesky.php:110 -msgid "" -"Please don't add your real password here, but instead create a specific app " -"password in the Bluesky settings." -msgstr "" -"Bitte verwende hier nicht dein echtes Passwort, sondern stattdessen ein " -"speziell für diese App in den Bluesky Einstellungen festgelegtes Passwort." - -#: bluesky.php:116 -msgid "Bluesky Import/Export" -msgstr "Bluesky Import/Export" - -#: bluesky.php:167 -msgid "Post to Bluesky" -msgstr "Auf Bluesky veröffentlichen" diff --git a/bluesky/lang/de/strings.php b/bluesky/lang/de/strings.php deleted file mode 100644 index 8e3c9421..00000000 --- a/bluesky/lang/de/strings.php +++ /dev/null @@ -1,20 +0,0 @@ -strings['You are authenticated to Bluesky. For security reasons the password isn\'t stored.'] = 'Du bist auf Bluesky authentifiziert. Aus Sicherheitsgründen wird das Passwort nicht gespeichert.'; -$a->strings['You are not authenticated. Please enter the app password.'] = 'Du bist derzeit nicht authentifiziert. Bitte gib dein App Passwort ein.'; -$a->strings['Enable Bluesky Post Addon'] = 'Bluesky Post Addon aktivieren'; -$a->strings['Post to Bluesky by default'] = 'Standardmäßig auf Bluesky veröffentlichen'; -$a->strings['Import the remote timeline'] = 'Importiere die entfernte Timeline'; -$a->strings['Bluesky host'] = 'Bluesky Host'; -$a->strings['Bluesky handle'] = 'Bluesky Handle'; -$a->strings['Bluesky DID'] = 'Bluesky DID'; -$a->strings['This is the unique identifier. It will be fetched automatically, when the handle is entered.'] = 'Sobald das Handle eingegeben ist, wird diese einzigartige Kennung automatisch abgerufen.'; -$a->strings['Bluesky app password'] = 'Bluesky App Passwort'; -$a->strings['Please don\'t add your real password here, but instead create a specific app password in the Bluesky settings.'] = 'Bitte verwende hier nicht dein echtes Passwort, sondern stattdessen ein speziell für diese App in den Bluesky Einstellungen festgelegtes Passwort.'; -$a->strings['Bluesky Import/Export'] = 'Bluesky Import/Export'; -$a->strings['Post to Bluesky'] = 'Auf Bluesky veröffentlichen'; diff --git a/bluesky/lang/zh-cn/messages.po b/bluesky/lang/zh-cn/messages.po deleted file mode 100644 index 9074ce34..00000000 --- a/bluesky/lang/zh-cn/messages.po +++ /dev/null @@ -1,80 +0,0 @@ -# ADDON bluesky -# Copyright (C) -# This file is distributed under the same license as the Friendica bluesky addon package. -# -# -# Translators: -# tslmuun, 2023 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-24 05:52+0000\n" -"PO-Revision-Date: 2023-05-24 06:02+0000\n" -"Last-Translator: tslmuun, 2023\n" -"Language-Team: Chinese (China) (https://app.transifex.com/Friendica/teams/12172/zh_CN/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: zh_CN\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: bluesky.php:100 -msgid "" -"You are authenticated to Bluesky. For security reasons the password isn't " -"stored." -msgstr "您已通过 Bluesky 的身份验证。 出于安全原因,不存储密码。" - -#: bluesky.php:100 -msgid "You are not authenticated. Please enter the app password." -msgstr "您未通过身份验证。 请输入应用密码。" - -#: bluesky.php:104 -msgid "Enable Bluesky Post Addon" -msgstr "启用Bluesky插件" - -#: bluesky.php:105 -msgid "Post to Bluesky by default" -msgstr "默认发布到Bluesky" - -#: bluesky.php:106 -msgid "Import the remote timeline" -msgstr "导入远程时间线" - -#: bluesky.php:107 -msgid "Bluesky host" -msgstr "Bluesky地址" - -#: bluesky.php:108 -msgid "Bluesky handle" -msgstr "Bluesky handle" - -#: bluesky.php:109 -msgid "Bluesky DID" -msgstr "Bluesky DID" - -#: bluesky.php:109 -msgid "" -"This is the unique identifier. It will be fetched automatically, when the " -"handle is entered." -msgstr "这是唯一标识符。 输入句柄时,它将自动获取。" - -#: bluesky.php:110 -msgid "Bluesky app password" -msgstr "Bluesky 应用密码" - -#: bluesky.php:110 -msgid "" -"Please don't add your real password here, but instead create a specific app " -"password in the Bluesky settings." -msgstr "请不要在此处填写您的真实密码,而是在 Bluesky 设置中创建一个特定的应用程序密码。" - -#: bluesky.php:116 -msgid "Bluesky Import/Export" -msgstr "Bluesky 导入/导出" - -#: bluesky.php:167 -msgid "Post to Bluesky" -msgstr "发布到Bluesky" diff --git a/bluesky/lang/zh-cn/strings.php b/bluesky/lang/zh-cn/strings.php deleted file mode 100644 index 9c71d974..00000000 --- a/bluesky/lang/zh-cn/strings.php +++ /dev/null @@ -1,20 +0,0 @@ -strings['You are authenticated to Bluesky. For security reasons the password isn\'t stored.'] = '您已通过 Bluesky 的身份验证。 出于安全原因,不存储密码。'; -$a->strings['You are not authenticated. Please enter the app password.'] = '您未通过身份验证。 请输入应用密码。'; -$a->strings['Enable Bluesky Post Addon'] = '启用Bluesky插件'; -$a->strings['Post to Bluesky by default'] = '默认发布到Bluesky'; -$a->strings['Import the remote timeline'] = '导入远程时间线'; -$a->strings['Bluesky host'] = 'Bluesky地址'; -$a->strings['Bluesky handle'] = 'Bluesky handle'; -$a->strings['Bluesky DID'] = 'Bluesky DID'; -$a->strings['This is the unique identifier. It will be fetched automatically, when the handle is entered.'] = '这是唯一标识符。 输入句柄时,它将自动获取。'; -$a->strings['Bluesky app password'] = 'Bluesky 应用密码'; -$a->strings['Please don\'t add your real password here, but instead create a specific app password in the Bluesky settings.'] = '请不要在此处填写您的真实密码,而是在 Bluesky 设置中创建一个特定的应用程序密码。'; -$a->strings['Bluesky Import/Export'] = 'Bluesky 导入/导出'; -$a->strings['Post to Bluesky'] = '发布到Bluesky'; diff --git a/bluesky/templates/admin.tpl b/bluesky/templates/admin.tpl deleted file mode 100644 index 7b752a88..00000000 --- a/bluesky/templates/admin.tpl +++ /dev/null @@ -1,2 +0,0 @@ -{{include file="field_checkbox.tpl" field=$friendica_handles}} -
diff --git a/bluesky/templates/connector_settings.tpl b/bluesky/templates/connector_settings.tpl deleted file mode 100644 index a85bcd89..00000000 --- a/bluesky/templates/connector_settings.tpl +++ /dev/null @@ -1,13 +0,0 @@ -

{{$status}}

-{{include file="field_checkbox.tpl" field=$enable}} -{{include file="field_checkbox.tpl" field=$bydefault}} -{{include file="field_checkbox.tpl" field=$import}} -{{include file="field_checkbox.tpl" field=$import_feeds}} -{{include file="field_checkbox.tpl" field=$complete_threads}} -{{if $custom_handle}} - {{include file="field_checkbox.tpl" field=$custom_handle}} -{{/if}} -{{include file="field_input.tpl" field=$pds}} -{{include file="field_input.tpl" field=$handle}} -{{include file="field_input.tpl" field=$did}} -{{include file="field_input.tpl" field=$password}} \ No newline at end of file diff --git a/buglink/buglink.php b/buglink/buglink.php index b7dd6504..78fb8bef 100644 --- a/buglink/buglink.php +++ b/buglink/buglink.php @@ -6,6 +6,7 @@ * Author: Mike Macgirvin */ +use Friendica\App; use Friendica\Core\Hook; use Friendica\DI; diff --git a/buglink/lang/bg/messages.po b/buglink/lang/bg/messages.po deleted file mode 100644 index d3a60344..00000000 --- a/buglink/lang/bg/messages.po +++ /dev/null @@ -1,23 +0,0 @@ -# ADDON buglink -# Copyright (C) -# This file is distributed under the same license as the Friendica buglink addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-22 11:27+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: buglink.php:20 -msgid "Report Bug" -msgstr "" diff --git a/buglink/lang/bg/strings.php b/buglink/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/buglink/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -, 2014 +# Michal Šupler , 2014 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-22 11:27+0000\n" -"Last-Translator: michal_s , 2014\n" -"Language-Team: Czech (http://app.transifex.com/Friendica/friendica/language/cs/)\n" +"POT-Creation-Date: 2014-06-22 13:18+0200\n" +"PO-Revision-Date: 2014-07-07 18:27+0000\n" +"Last-Translator: Michal Šupler \n" +"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" -"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: buglink.php:20 +#: buglink.php:15 msgid "Report Bug" msgstr "Nahlásit chybu" diff --git a/buglink/lang/cs/strings.php b/buglink/lang/cs/strings.php index ae45ea37..048b8334 100644 --- a/buglink/lang/cs/strings.php +++ b/buglink/lang/cs/strings.php @@ -3,6 +3,6 @@ if(! function_exists("string_plural_select_cs")) { function string_plural_select_cs($n){ $n = intval($n); - if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; } + if (($n==1)) { return 0; } else if (($n>=2 && $n<=4)) { return 1; } else { return 2; } }} $a->strings['Report Bug'] = 'Nahlásit chybu'; diff --git a/buglink/lang/de/messages.po b/buglink/lang/de/messages.po index 4858bc77..0e8d02d5 100644 --- a/buglink/lang/de/messages.po +++ b/buglink/lang/de/messages.po @@ -10,16 +10,16 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-22 11:27+0000\n" -"Last-Translator: René Wagner , 2019\n" -"Language-Team: German (http://app.transifex.com/Friendica/friendica/language/de/)\n" +"POT-Creation-Date: 2014-06-22 13:18+0200\n" +"PO-Revision-Date: 2019-11-10 20:12+0000\n" +"Last-Translator: René Wagner \n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: buglink.php:20 +#: buglink.php:15 msgid "Report Bug" msgstr "Fehler melden" diff --git a/buglink/lang/eo/messages.po b/buglink/lang/eo/messages.po deleted file mode 100644 index ff4589b6..00000000 --- a/buglink/lang/eo/messages.po +++ /dev/null @@ -1,23 +0,0 @@ -# ADDON buglink -# Copyright (C) -# This file is distributed under the same license as the Friendica buglink addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-22 11:27+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: buglink.php:20 -msgid "Report Bug" -msgstr "" diff --git a/buglink/lang/eo/strings.php b/buglink/lang/eo/strings.php index 68e8a64c..00d95a40 100644 --- a/buglink/lang/eo/strings.php +++ b/buglink/lang/eo/strings.php @@ -1,7 +1,3 @@ -strings["Report Bug"] = "Skribi cimraporton"; diff --git a/buglink/lang/et/messages.po b/buglink/lang/et/messages.po deleted file mode 100644 index db854464..00000000 --- a/buglink/lang/et/messages.po +++ /dev/null @@ -1,23 +0,0 @@ -# ADDON buglink -# Copyright (C) -# This file is distributed under the same license as the Friendica buglink addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-22 11:27+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: et\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: buglink.php:20 -msgid "Report Bug" -msgstr "" diff --git a/buglink/lang/et/strings.php b/buglink/lang/et/strings.php deleted file mode 100644 index dfe78358..00000000 --- a/buglink/lang/et/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - */ +use Friendica\App; use Friendica\Core\Hook; use Friendica\DI; @@ -15,7 +16,7 @@ function calc_install() { function calc_app_menu(array &$b) { - $b['app_menu'][] = ''; + $b['app_menu'][] = ''; } /** @@ -295,7 +296,7 @@ $o .= <<< EOT

Calculator



-
+
La Libravatar kromprogramo retropaŝos al Gravatar se neniu troveblis ĉe Libravatar."; +$a->strings["Submit"] = "Sendi"; +$a->strings["Default avatar image"] = "Defaŭlta avatarbildo"; +$a->strings["Select default avatar image if none was found. See README"] = "Elektu la defaŭltan avatar bildon sen neniu troveblis. Legu README."; +$a->strings["Libravatar settings updated."] = "Ĝisdatigis Libravatar agordojn."; diff --git a/libravatar/lang/et/messages.po b/libravatar/lang/et/messages.po deleted file mode 100644 index d25028a3..00000000 --- a/libravatar/lang/et/messages.po +++ /dev/null @@ -1,71 +0,0 @@ -# ADDON libravatar -# Copyright (C) -# This file is distributed under the same license as the Friendica libravatar addon package. -# -# -# Translators: -# Rain Hawk, 2020 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 09:49+0000\n" -"Last-Translator: Rain Hawk, 2020\n" -"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: et\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: libravatar.php:68 -msgid "generic profile image" -msgstr "" - -#: libravatar.php:69 -msgid "random geometric pattern" -msgstr "" - -#: libravatar.php:70 -msgid "monster face" -msgstr "" - -#: libravatar.php:71 -msgid "computer generated face" -msgstr "" - -#: libravatar.php:72 -msgid "retro arcade style face" -msgstr "" - -#: libravatar.php:73 -msgid "roboter face" -msgstr "" - -#: libravatar.php:74 -msgid "retro adventure game character" -msgstr "" - -#: libravatar.php:78 -msgid "Information" -msgstr "" - -#: libravatar.php:78 -msgid "" -"Gravatar addon is installed. Please disable the Gravatar addon.
The " -"Libravatar addon will fall back to Gravatar if nothing was found at " -"Libravatar." -msgstr "" - -#: libravatar.php:83 -msgid "Save Settings" -msgstr "" - -#: libravatar.php:84 -msgid "Default avatar image" -msgstr "" - -#: libravatar.php:84 -msgid "Select default avatar image if none was found. See README" -msgstr "" diff --git a/libravatar/lang/et/strings.php b/libravatar/lang/et/strings.php deleted file mode 100644 index dfe78358..00000000 --- a/libravatar/lang/et/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -, 2022 # Hypolite Petovan , 2016 # ea1cd8241cb389ffb6f92bc6891eff5d_dc12308 <70dced5587d47e18d88f9298024d96f8_93383>, 2015 @@ -14,8 +13,8 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-02-01 18:15+0100\n" "PO-Revision-Date: 2014-06-23 09:49+0000\n" -"Last-Translator: cracrayol, 2025\n" -"Language-Team: French (http://app.transifex.com/Friendica/friendica/language/fr/)\n" +"Last-Translator: Hypolite Petovan , 2022\n" +"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -63,7 +62,7 @@ msgstr "L'extension Gravatar est installée. Veuillez la désactiver.
L'exte #: libravatar.php:83 msgid "Save Settings" -msgstr "Sauvegarder les paramètres" +msgstr "Enregistrer les paramètres" #: libravatar.php:84 msgid "Default avatar image" diff --git a/libravatar/lang/fr/strings.php b/libravatar/lang/fr/strings.php index 87a3a9ab..dd3cbe2c 100644 --- a/libravatar/lang/fr/strings.php +++ b/libravatar/lang/fr/strings.php @@ -14,6 +14,6 @@ $a->strings['roboter face'] = 'Tête de robot'; $a->strings['retro adventure game character'] = 'Personnage de jeu d\'aventure rétro'; $a->strings['Information'] = 'Information'; $a->strings['Gravatar addon is installed. Please disable the Gravatar addon.
The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar.'] = 'L\'extension Gravatar est installée. Veuillez la désactiver.
L\'extension Libravatar se repose sur Gravatar si l\'avatar n\'a pas été trouvé sur Libravatar.'; -$a->strings['Save Settings'] = 'Sauvegarder les paramètres'; +$a->strings['Save Settings'] = 'Enregistrer les paramètres'; $a->strings['Default avatar image'] = 'Avatar par défaut'; $a->strings['Select default avatar image if none was found. See README'] = 'Sélectionnez un avatar par défaut si rien n\'a été trouvé. Voir le README'; diff --git a/libravatar/lang/gd/messages.po b/libravatar/lang/gd/messages.po deleted file mode 100644 index 95c88e99..00000000 --- a/libravatar/lang/gd/messages.po +++ /dev/null @@ -1,70 +0,0 @@ -# ADDON libravatar -# Copyright (C) -# This file is distributed under the same license as the Friendica libravatar addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 09:49+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gd\n" -"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" - -#: libravatar.php:68 -msgid "generic profile image" -msgstr "" - -#: libravatar.php:69 -msgid "random geometric pattern" -msgstr "" - -#: libravatar.php:70 -msgid "monster face" -msgstr "" - -#: libravatar.php:71 -msgid "computer generated face" -msgstr "" - -#: libravatar.php:72 -msgid "retro arcade style face" -msgstr "" - -#: libravatar.php:73 -msgid "roboter face" -msgstr "" - -#: libravatar.php:74 -msgid "retro adventure game character" -msgstr "" - -#: libravatar.php:78 -msgid "Information" -msgstr "" - -#: libravatar.php:78 -msgid "" -"Gravatar addon is installed. Please disable the Gravatar addon.
The " -"Libravatar addon will fall back to Gravatar if nothing was found at " -"Libravatar." -msgstr "" - -#: libravatar.php:83 -msgid "Save Settings" -msgstr "" - -#: libravatar.php:84 -msgid "Default avatar image" -msgstr "" - -#: libravatar.php:84 -msgid "Select default avatar image if none was found. See README" -msgstr "" diff --git a/libravatar/lang/gd/strings.php b/libravatar/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/libravatar/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/libravatar/lang/is/messages.po b/libravatar/lang/is/messages.po deleted file mode 100644 index 75746e3d..00000000 --- a/libravatar/lang/is/messages.po +++ /dev/null @@ -1,70 +0,0 @@ -# ADDON libravatar -# Copyright (C) -# This file is distributed under the same license as the Friendica libravatar addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 09:49+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: is\n" -"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" - -#: libravatar.php:68 -msgid "generic profile image" -msgstr "" - -#: libravatar.php:69 -msgid "random geometric pattern" -msgstr "" - -#: libravatar.php:70 -msgid "monster face" -msgstr "" - -#: libravatar.php:71 -msgid "computer generated face" -msgstr "" - -#: libravatar.php:72 -msgid "retro arcade style face" -msgstr "" - -#: libravatar.php:73 -msgid "roboter face" -msgstr "" - -#: libravatar.php:74 -msgid "retro adventure game character" -msgstr "" - -#: libravatar.php:78 -msgid "Information" -msgstr "" - -#: libravatar.php:78 -msgid "" -"Gravatar addon is installed. Please disable the Gravatar addon.
The " -"Libravatar addon will fall back to Gravatar if nothing was found at " -"Libravatar." -msgstr "" - -#: libravatar.php:83 -msgid "Save Settings" -msgstr "" - -#: libravatar.php:84 -msgid "Default avatar image" -msgstr "" - -#: libravatar.php:84 -msgid "Select default avatar image if none was found. See README" -msgstr "" diff --git a/libravatar/lang/is/strings.php b/libravatar/lang/is/strings.php index 975c341e..25de0e53 100644 --- a/libravatar/lang/is/strings.php +++ b/libravatar/lang/is/strings.php @@ -1,7 +1,17 @@ -strings["Could NOT install Libravatar successfully.
It requires PHP >= 5.3"] = ""; +$a->strings["generic profile image"] = ""; +$a->strings["random geometric pattern"] = ""; +$a->strings["monster face"] = ""; +$a->strings["computer generated face"] = ""; +$a->strings["retro arcade style face"] = ""; +$a->strings["Warning"] = ""; +$a->strings["Your PHP version %s is lower than the required PHP >= 5.3."] = ""; +$a->strings["This addon is not functional on your server."] = ""; +$a->strings["Information"] = ""; +$a->strings["Gravatar addon is installed. Please disable the Gravatar addon.
The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar."] = ""; +$a->strings["Submit"] = "Senda inn"; +$a->strings["Default avatar image"] = ""; +$a->strings["Select default avatar image if none was found. See README"] = ""; +$a->strings["Libravatar settings updated."] = ""; diff --git a/libravatar/lang/it/messages.po b/libravatar/lang/it/messages.po index 931fefb8..7036dc1c 100644 --- a/libravatar/lang/it/messages.po +++ b/libravatar/lang/it/messages.po @@ -11,14 +11,14 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 09:49+0000\n" -"Last-Translator: Sylke Vicious , 2021\n" -"Language-Team: Italian (http://app.transifex.com/Friendica/friendica/language/it/)\n" +"PO-Revision-Date: 2021-05-05 11:06+0000\n" +"Last-Translator: Sylke Vicious \n" +"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: libravatar.php:68 msgid "generic profile image" diff --git a/libravatar/lang/it/strings.php b/libravatar/lang/it/strings.php index 75fa4190..08b1503b 100644 --- a/libravatar/lang/it/strings.php +++ b/libravatar/lang/it/strings.php @@ -3,7 +3,7 @@ if(! function_exists("string_plural_select_it")) { function string_plural_select_it($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} $a->strings['generic profile image'] = 'immagine generica del profilo'; $a->strings['random geometric pattern'] = 'schema geometrico casuale'; diff --git a/libravatar/lang/ru/messages.po b/libravatar/lang/ru/messages.po deleted file mode 100644 index 6723eed2..00000000 --- a/libravatar/lang/ru/messages.po +++ /dev/null @@ -1,70 +0,0 @@ -# ADDON libravatar -# Copyright (C) -# This file is distributed under the same license as the Friendica libravatar addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 09:49+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Russian (http://app.transifex.com/Friendica/friendica/language/ru/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" - -#: libravatar.php:68 -msgid "generic profile image" -msgstr "" - -#: libravatar.php:69 -msgid "random geometric pattern" -msgstr "" - -#: libravatar.php:70 -msgid "monster face" -msgstr "" - -#: libravatar.php:71 -msgid "computer generated face" -msgstr "" - -#: libravatar.php:72 -msgid "retro arcade style face" -msgstr "" - -#: libravatar.php:73 -msgid "roboter face" -msgstr "" - -#: libravatar.php:74 -msgid "retro adventure game character" -msgstr "" - -#: libravatar.php:78 -msgid "Information" -msgstr "Информация" - -#: libravatar.php:78 -msgid "" -"Gravatar addon is installed. Please disable the Gravatar addon.
The " -"Libravatar addon will fall back to Gravatar if nothing was found at " -"Libravatar." -msgstr "" - -#: libravatar.php:83 -msgid "Save Settings" -msgstr "" - -#: libravatar.php:84 -msgid "Default avatar image" -msgstr "" - -#: libravatar.php:84 -msgid "Select default avatar image if none was found. See README" -msgstr "" diff --git a/libravatar/lang/ru/strings.php b/libravatar/lang/ru/strings.php index 053d0249..6414c889 100644 --- a/libravatar/lang/ru/strings.php +++ b/libravatar/lang/ru/strings.php @@ -1,8 +1,17 @@ -=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; } -}} -$a->strings['Information'] = 'Информация'; +strings["Could NOT install Libravatar successfully.
It requires PHP >= 5.3"] = ""; +$a->strings["generic profile image"] = ""; +$a->strings["random geometric pattern"] = ""; +$a->strings["monster face"] = ""; +$a->strings["computer generated face"] = ""; +$a->strings["retro arcade style face"] = ""; +$a->strings["Warning"] = ""; +$a->strings["Your PHP version %s is lower than the required PHP >= 5.3."] = ""; +$a->strings["This addon is not functional on your server."] = ""; +$a->strings["Information"] = ""; +$a->strings["Gravatar addon is installed. Please disable the Gravatar addon.
The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar."] = ""; +$a->strings["Submit"] = "Подтвердить"; +$a->strings["Default avatar image"] = ""; +$a->strings["Select default avatar image if none was found. See README"] = ""; +$a->strings["Libravatar settings updated."] = ""; diff --git a/libravatar/libravatar.php b/libravatar/libravatar.php index 6f47bf51..54594b88 100644 --- a/libravatar/libravatar.php +++ b/libravatar/libravatar.php @@ -6,7 +6,10 @@ * Author: Klaus Weidenbach */ +use Friendica\App; +use Friendica\Core\Addon; use Friendica\Core\Hook; +use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; use Friendica\Core\Config\Util\ConfigFileManager; @@ -18,12 +21,12 @@ function libravatar_install() { Hook::register('load_config', 'addon/libravatar/libravatar.php', 'libravatar_load_config'); Hook::register('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup'); - DI::logger()->notice("registered libravatar in avatar_lookup hook"); + Logger::notice("registered libravatar in avatar_lookup hook"); } function libravatar_load_config(ConfigFileManager $loader) { - DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('libravatar'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); + DI::app()->getConfigCache()->load($loader->loadAddonConfig('libravatar'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } /** @@ -70,9 +73,7 @@ function libravatar_addon_admin(string &$o) 'pagan' => DI::l10n()->t('retro adventure game character'), ]; - $addonHelper = DI::addonHelper(); - - if ($addonHelper->isAddonEnabled('gravatar')) { + if (Addon::isEnabled('gravatar')) { $o = '
' .DI::l10n()->t('Information') .'

' .DI::l10n()->t('Gravatar addon is installed. Please disable the Gravatar addon.
The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar.') .'



'; } diff --git a/ljpost/lang/bg/messages.po b/ljpost/lang/bg/messages.po deleted file mode 100644 index 344ae537..00000000 --- a/ljpost/lang/bg/messages.po +++ /dev/null @@ -1,43 +0,0 @@ -# ADDON ljpost -# Copyright (C) -# This file is distributed under the same license as the Friendica ljpost addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:17-0500\n" -"PO-Revision-Date: 2014-06-23 09:51+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ljpost.php:43 -msgid "Post to LiveJournal" -msgstr "" - -#: ljpost.php:63 -msgid "Enable LiveJournal Post Addon" -msgstr "" - -#: ljpost.php:64 -msgid "LiveJournal username" -msgstr "" - -#: ljpost.php:65 -msgid "LiveJournal password" -msgstr "" - -#: ljpost.php:66 -msgid "Post to LiveJournal by default" -msgstr "" - -#: ljpost.php:71 -msgid "LiveJournal Export" -msgstr "" diff --git a/ljpost/lang/bg/strings.php b/ljpost/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/ljpost/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ljpost.php:43 -msgid "Post to LiveJournal" -msgstr "" - -#: ljpost.php:63 -msgid "Enable LiveJournal Post Addon" -msgstr "" - -#: ljpost.php:64 -msgid "LiveJournal username" -msgstr "" - -#: ljpost.php:65 -msgid "LiveJournal password" -msgstr "" - -#: ljpost.php:66 -msgid "Post to LiveJournal by default" -msgstr "" - -#: ljpost.php:71 -msgid "LiveJournal Export" -msgstr "" diff --git a/ljpost/lang/ca/strings.php b/ljpost/lang/ca/strings.php index d34874f6..ec370df8 100644 --- a/ljpost/lang/ca/strings.php +++ b/ljpost/lang/ca/strings.php @@ -1,7 +1,9 @@ -strings["Post to LiveJournal"] = "Missatge a Livejournal"; +$a->strings["LiveJournal Post Settings"] = "Configuració d'enviaments a Livejournal"; +$a->strings["Enable LiveJournal Post Addon"] = "Habilitat el addon d'enviaments a Livejournal"; +$a->strings["LiveJournal username"] = "Nom d'usuari a Livejournal"; +$a->strings["LiveJournal password"] = "Contrasenya a Livejournal"; +$a->strings["Post to LiveJournal by default"] = "Enviar per defecte a Livejournal"; +$a->strings["Submit"] = "Enviar"; diff --git a/ljpost/lang/cs/messages.po b/ljpost/lang/cs/messages.po index 1578bf38..74a88433 100644 --- a/ljpost/lang/cs/messages.po +++ b/ljpost/lang/cs/messages.po @@ -4,42 +4,45 @@ # # # Translators: -# Aditoo, 2018 -# michal_s , 2014-2015 +# Michal Šupler , 2014-2015 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:17-0500\n" -"PO-Revision-Date: 2014-06-23 09:51+0000\n" -"Last-Translator: Aditoo, 2018\n" -"Language-Team: Czech (http://app.transifex.com/Friendica/friendica/language/cs/)\n" +"POT-Creation-Date: 2013-02-27 05:01-0500\n" +"PO-Revision-Date: 2015-02-11 19:38+0000\n" +"Last-Translator: Michal Šupler \n" +"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" -"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: ljpost.php:43 +#: ljpost.php:39 msgid "Post to LiveJournal" -msgstr "Odeslat na LiveJournal" +msgstr "Poslat na LiveJournal" -#: ljpost.php:63 +#: ljpost.php:70 +msgid "LiveJournal Post Settings" +msgstr "Nastavení LiveJournal Post" + +#: ljpost.php:72 msgid "Enable LiveJournal Post Addon" -msgstr "Povolit doplněk LiveJournal Post" +msgstr "Povolit LiveJournal Post addon" -#: ljpost.php:64 +#: ljpost.php:77 msgid "LiveJournal username" msgstr "LiveJournal uživatelské jméno" -#: ljpost.php:65 +#: ljpost.php:82 msgid "LiveJournal password" msgstr "LiveJournal heslo" -#: ljpost.php:66 +#: ljpost.php:87 msgid "Post to LiveJournal by default" msgstr "Defaultně umístit na LiveJournal" -#: ljpost.php:71 -msgid "LiveJournal Export" -msgstr "" +#: ljpost.php:93 +msgid "Submit" +msgstr "Odeslat" diff --git a/ljpost/lang/cs/strings.php b/ljpost/lang/cs/strings.php index 2430efbd..76721b77 100644 --- a/ljpost/lang/cs/strings.php +++ b/ljpost/lang/cs/strings.php @@ -3,10 +3,12 @@ if(! function_exists("string_plural_select_cs")) { function string_plural_select_cs($n){ $n = intval($n); - if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; } + if (($n==1)) { return 0; } else if (($n>=2 && $n<=4)) { return 1; } else { return 2; } }} -$a->strings['Post to LiveJournal'] = 'Odeslat na LiveJournal'; -$a->strings['Enable LiveJournal Post Addon'] = 'Povolit doplněk LiveJournal Post'; +$a->strings['Post to LiveJournal'] = 'Poslat na LiveJournal'; +$a->strings['LiveJournal Post Settings'] = 'Nastavení LiveJournal Post'; +$a->strings['Enable LiveJournal Post Addon'] = 'Povolit LiveJournal Post addon'; $a->strings['LiveJournal username'] = 'LiveJournal uživatelské jméno'; $a->strings['LiveJournal password'] = 'LiveJournal heslo'; $a->strings['Post to LiveJournal by default'] = 'Defaultně umístit na LiveJournal'; +$a->strings['Submit'] = 'Odeslat'; diff --git a/ljpost/lang/de/messages.po b/ljpost/lang/de/messages.po index 7a41438f..13d7d6c7 100644 --- a/ljpost/lang/de/messages.po +++ b/ljpost/lang/de/messages.po @@ -6,16 +6,16 @@ # Translators: # Andreas H., 2014 # Tobias Diekershoff , 2014 -# Tobias Diekershoff , 2018,2021-2022 +# Tobias Diekershoff , 2018,2021 # Ulf Rompe , 2019 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-11-21 19:17-0500\n" -"PO-Revision-Date: 2014-06-23 09:51+0000\n" -"Last-Translator: Tobias Diekershoff , 2018,2021-2022\n" -"Language-Team: German (http://app.transifex.com/Friendica/friendica/language/de/)\n" +"PO-Revision-Date: 2021-12-22 17:23+0000\n" +"Last-Translator: Transifex Bot <>\n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -44,4 +44,4 @@ msgstr "Standardmäßig bei LiveJournal veröffentlichen" #: ljpost.php:71 msgid "LiveJournal Export" -msgstr "LiveJournal Export" +msgstr "" diff --git a/ljpost/lang/de/strings.php b/ljpost/lang/de/strings.php index 88c98dd0..99641213 100644 --- a/ljpost/lang/de/strings.php +++ b/ljpost/lang/de/strings.php @@ -10,4 +10,3 @@ $a->strings['Enable LiveJournal Post Addon'] = 'LiveJournal-Post-Addon aktiviere $a->strings['LiveJournal username'] = 'LiveJournal-Benutzername'; $a->strings['LiveJournal password'] = 'LiveJournal-Passwort'; $a->strings['Post to LiveJournal by default'] = 'Standardmäßig bei LiveJournal veröffentlichen'; -$a->strings['LiveJournal Export'] = 'LiveJournal Export'; diff --git a/ljpost/lang/eo/messages.po b/ljpost/lang/eo/messages.po deleted file mode 100644 index 3334207b..00000000 --- a/ljpost/lang/eo/messages.po +++ /dev/null @@ -1,43 +0,0 @@ -# ADDON ljpost -# Copyright (C) -# This file is distributed under the same license as the Friendica ljpost addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:17-0500\n" -"PO-Revision-Date: 2014-06-23 09:51+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ljpost.php:43 -msgid "Post to LiveJournal" -msgstr "" - -#: ljpost.php:63 -msgid "Enable LiveJournal Post Addon" -msgstr "" - -#: ljpost.php:64 -msgid "LiveJournal username" -msgstr "" - -#: ljpost.php:65 -msgid "LiveJournal password" -msgstr "" - -#: ljpost.php:66 -msgid "Post to LiveJournal by default" -msgstr "" - -#: ljpost.php:71 -msgid "LiveJournal Export" -msgstr "" diff --git a/ljpost/lang/eo/strings.php b/ljpost/lang/eo/strings.php index 68e8a64c..1bd09a6f 100644 --- a/ljpost/lang/eo/strings.php +++ b/ljpost/lang/eo/strings.php @@ -1,7 +1,9 @@ -strings["Post to LiveJournal"] = "Afiŝi ĉe LiveJournal"; +$a->strings["LiveJournal Post Settings"] = "Agordoj pri afiŝoj ĉe LiveJournal"; +$a->strings["Enable LiveJournal Post Addon"] = "Ŝalti la LiveJournal-afiŝo kromprogramon."; +$a->strings["LiveJournal username"] = "LiveJournal Salutnomo"; +$a->strings["LiveJournal password"] = "LiveJournal pasvorto"; +$a->strings["Post to LiveJournal by default"] = "Defaŭlte afiŝi al LiveJournal"; +$a->strings["Submit"] = "Sendi"; diff --git a/ljpost/lang/et/messages.po b/ljpost/lang/et/messages.po deleted file mode 100644 index e5caa42f..00000000 --- a/ljpost/lang/et/messages.po +++ /dev/null @@ -1,44 +0,0 @@ -# ADDON ljpost -# Copyright (C) -# This file is distributed under the same license as the Friendica ljpost addon package. -# -# -# Translators: -# Rain Hawk, 2020 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:17-0500\n" -"PO-Revision-Date: 2014-06-23 09:51+0000\n" -"Last-Translator: Rain Hawk, 2020\n" -"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: et\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: ljpost.php:43 -msgid "Post to LiveJournal" -msgstr "" - -#: ljpost.php:63 -msgid "Enable LiveJournal Post Addon" -msgstr "" - -#: ljpost.php:64 -msgid "LiveJournal username" -msgstr "" - -#: ljpost.php:65 -msgid "LiveJournal password" -msgstr "" - -#: ljpost.php:66 -msgid "Post to LiveJournal by default" -msgstr "" - -#: ljpost.php:71 -msgid "LiveJournal Export" -msgstr "" diff --git a/ljpost/lang/et/strings.php b/ljpost/lang/et/strings.php deleted file mode 100644 index dfe78358..00000000 --- a/ljpost/lang/et/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gd\n" -"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" - -#: ljpost.php:43 -msgid "Post to LiveJournal" -msgstr "" - -#: ljpost.php:63 -msgid "Enable LiveJournal Post Addon" -msgstr "" - -#: ljpost.php:64 -msgid "LiveJournal username" -msgstr "" - -#: ljpost.php:65 -msgid "LiveJournal password" -msgstr "" - -#: ljpost.php:66 -msgid "Post to LiveJournal by default" -msgstr "" - -#: ljpost.php:71 -msgid "LiveJournal Export" -msgstr "" diff --git a/ljpost/lang/gd/strings.php b/ljpost/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/ljpost/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/ljpost/lang/is/messages.po b/ljpost/lang/is/messages.po deleted file mode 100644 index 73e10103..00000000 --- a/ljpost/lang/is/messages.po +++ /dev/null @@ -1,43 +0,0 @@ -# ADDON ljpost -# Copyright (C) -# This file is distributed under the same license as the Friendica ljpost addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:17-0500\n" -"PO-Revision-Date: 2014-06-23 09:51+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: is\n" -"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" - -#: ljpost.php:43 -msgid "Post to LiveJournal" -msgstr "" - -#: ljpost.php:63 -msgid "Enable LiveJournal Post Addon" -msgstr "" - -#: ljpost.php:64 -msgid "LiveJournal username" -msgstr "" - -#: ljpost.php:65 -msgid "LiveJournal password" -msgstr "" - -#: ljpost.php:66 -msgid "Post to LiveJournal by default" -msgstr "" - -#: ljpost.php:71 -msgid "LiveJournal Export" -msgstr "" diff --git a/ljpost/lang/is/strings.php b/ljpost/lang/is/strings.php index 975c341e..164dc441 100644 --- a/ljpost/lang/is/strings.php +++ b/ljpost/lang/is/strings.php @@ -1,7 +1,9 @@ -strings["Post to LiveJournal"] = ""; +$a->strings["LiveJournal Post Settings"] = ""; +$a->strings["Enable LiveJournal Post Addon"] = ""; +$a->strings["LiveJournal username"] = ""; +$a->strings["LiveJournal password"] = ""; +$a->strings["Post to LiveJournal by default"] = ""; +$a->strings["Submit"] = "Senda inn"; diff --git a/ljpost/lang/it/messages.po b/ljpost/lang/it/messages.po index f24ca580..c7a8c3cb 100644 --- a/ljpost/lang/it/messages.po +++ b/ljpost/lang/it/messages.po @@ -5,41 +5,45 @@ # # Translators: # fabrixxm , 2014-2015,2018 -# Sylke Vicious , 2021,2023 +# Sylke Vicious , 2021 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:17-0500\n" -"PO-Revision-Date: 2014-06-23 09:51+0000\n" -"Last-Translator: Sylke Vicious , 2021,2023\n" -"Language-Team: Italian (http://app.transifex.com/Friendica/friendica/language/it/)\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" +"PO-Revision-Date: 2021-02-16 12:57+0000\n" +"Last-Translator: Sylke Vicious \n" +"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ljpost.php:43 +#: ljpost.php:39 msgid "Post to LiveJournal" msgstr "Invia a LiveJournal" -#: ljpost.php:63 +#: ljpost.php:73 +msgid "LiveJournal Post Settings" +msgstr "Impostazioni invio a LiveJournal" + +#: ljpost.php:75 msgid "Enable LiveJournal Post Addon" msgstr "Abilita il componente aggiuntivo di invio a LiveJournal" -#: ljpost.php:64 +#: ljpost.php:80 msgid "LiveJournal username" msgstr "Nome utente LiveJournal" -#: ljpost.php:65 +#: ljpost.php:85 msgid "LiveJournal password" msgstr "Password LiveJournal" -#: ljpost.php:66 +#: ljpost.php:90 msgid "Post to LiveJournal by default" msgstr "Invia sempre a LiveJournal" -#: ljpost.php:71 -msgid "LiveJournal Export" -msgstr "Esporta LiveJournal" +#: ljpost.php:96 +msgid "Save Settings" +msgstr "Salva Impostazioni" diff --git a/ljpost/lang/it/strings.php b/ljpost/lang/it/strings.php index 3f857ed8..c52326e0 100644 --- a/ljpost/lang/it/strings.php +++ b/ljpost/lang/it/strings.php @@ -3,11 +3,12 @@ if(! function_exists("string_plural_select_it")) { function string_plural_select_it($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} $a->strings['Post to LiveJournal'] = 'Invia a LiveJournal'; +$a->strings['LiveJournal Post Settings'] = 'Impostazioni invio a LiveJournal'; $a->strings['Enable LiveJournal Post Addon'] = 'Abilita il componente aggiuntivo di invio a LiveJournal'; $a->strings['LiveJournal username'] = 'Nome utente LiveJournal'; $a->strings['LiveJournal password'] = 'Password LiveJournal'; $a->strings['Post to LiveJournal by default'] = 'Invia sempre a LiveJournal'; -$a->strings['LiveJournal Export'] = 'Esporta LiveJournal'; +$a->strings['Save Settings'] = 'Salva Impostazioni'; diff --git a/ljpost/ljpost.php b/ljpost/ljpost.php index c865ddc3..f6f2b79a 100644 --- a/ljpost/ljpost.php +++ b/ljpost/ljpost.php @@ -8,11 +8,12 @@ * Author: Cat Gray */ +use Friendica\App; use Friendica\Content\Text\BBCode; use Friendica\Core\Hook; +use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; -use Friendica\Model\Item; use Friendica\Model\Post; use Friendica\Model\Tag; use Friendica\Model\User; @@ -34,7 +35,7 @@ function ljpost_jot_nets(array &$jotnets_fields) return; } - if (DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'ljpost', 'post')) { + if (DI::pConfig()->get(DI::userSession()->getLocalUserId(),'ljpost','post')) { $jotnets_fields[] = [ 'type' => 'checkbox', 'field' => [ @@ -56,7 +57,7 @@ function ljpost_settings(array &$data) $ij_username = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'ljpost', 'ij_username'); $def_enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'ljpost', 'post_by_default'); - $t = Renderer::getMarkupTemplate('connector_settings.tpl', 'addon/ljpost/'); + $t= Renderer::getMarkupTemplate('connector_settings.tpl', 'addon/ljpost/'); $html = Renderer::replaceMacros($t, [ '$enabled' => ['ljpost', DI::l10n()->t('Enable LiveJournal Post Addon'), $enabled], '$username' => ['ij_username', DI::l10n()->t('LiveJournal username'), $ij_username], @@ -85,16 +86,20 @@ function ljpost_settings_post(array &$b) function ljpost_post_local(array &$b) { + // This can probably be changed to allow editing by pointing to a different API endpoint + if ($b['edit']) { + return; + } + if (!DI::userSession()->getLocalUserId() || (DI::userSession()->getLocalUserId() != $b['uid'])) { return; } - // This can probably be changed to allow editing by pointing to a different API endpoint - if ($b['edit'] || ($b['private'] == Item::PRIVATE) || ($b['gravity'] != Item::GRAVITY_PARENT)) { + if ($b['private'] || $b['parent']) { return; } - $lj_post = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'ljpost', 'post')); + $lj_post = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(),'ljpost','post')); $lj_enable = (($lj_post && !empty($_REQUEST['ljpost_enable'])) ? intval($_REQUEST['ljpost_enable']) : 0); if ($b['api_source'] && intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'ljpost', 'post_by_default'))) { @@ -113,15 +118,11 @@ function ljpost_post_local(array &$b) function ljpost_send(array &$b) { - if ($b['deleted'] || ($b['private'] == Item::PRIVATE) || ($b['created'] !== $b['edited'])) { + if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) { return; } - if (!strstr($b['postopts'], 'ljpost')) { - return; - } - - if (Item::isGroupPost($b['uri-id'])) { + if (!strstr($b['postopts'],'ljpost')) { return; } @@ -138,13 +139,13 @@ function ljpost_send(array &$b) $user = User::getById($b['uid']); $tz = $user['timezone'] ?: 'UTC'; - $lj_username = XML::escape(DI::pConfig()->get($b['uid'], 'ljpost', 'lj_username')); - $lj_password = XML::escape(DI::pConfig()->get($b['uid'], 'ljpost', 'lj_password')); - $lj_journal = XML::escape(DI::pConfig()->get($b['uid'], 'ljpost', 'lj_journal')); - // if(! $lj_journal) - // $lj_journal = $lj_username; + $lj_username = XML::escape(DI::pConfig()->get($b['uid'],'ljpost','lj_username')); + $lj_password = XML::escape(DI::pConfig()->get($b['uid'],'ljpost','lj_password')); + $lj_journal = XML::escape(DI::pConfig()->get($b['uid'],'ljpost','lj_journal')); +// if(! $lj_journal) +// $lj_journal = $lj_username; - $lj_blog = XML::escape(DI::pConfig()->get($b['uid'], 'ljpost', 'lj_blog')); + $lj_blog = XML::escape(DI::pConfig()->get($b['uid'],'ljpost','lj_blog')); if (!strlen($lj_blog)) { $lj_blog = XML::escape('http://www.livejournal.com/interface/xmlrpc'); } @@ -156,11 +157,11 @@ function ljpost_send(array &$b) $tags = Tag::getCSVByURIId($b['uri-id'], [Tag::HASHTAG]); $date = DateTimeFormat::convert($b['created'], $tz); - $year = intval(substr($date, 0, 4)); - $mon = intval(substr($date, 5, 2)); - $day = intval(substr($date, 8, 2)); - $hour = intval(substr($date, 11, 2)); - $min = intval(substr($date, 14, 2)); + $year = intval(substr($date,0,4)); + $mon = intval(substr($date,5,2)); + $day = intval(substr($date,8,2)); + $hour = intval(substr($date,11,2)); + $min = intval(substr($date,14,2)); $xml = <<< EOT @@ -203,14 +204,12 @@ function ljpost_send(array &$b) EOT; - DI::logger()->debug('ljpost: data: ' . $xml); - - $x = ''; + Logger::debug('ljpost: data: ' . $xml); if ($lj_blog !== 'test') { - $x = DI::httpClient()->post($lj_blog, $xml, ['Content-Type' => 'text/xml'])->getBodyString(); + $x = DI::httpClient()->post($lj_blog, $xml, ['Content-Type' => 'text/xml'])->getBody(); } - DI::logger()->info('posted to livejournal: ' . $x); + Logger::info('posted to livejournal: ' . ($x) ? $x : ''); } } diff --git a/mailstream/lang/C/messages.po b/mailstream/lang/C/messages.po index 666181b8..5115d8cb 100644 --- a/mailstream/lang/C/messages.po +++ b/mailstream/lang/C/messages.po @@ -29,72 +29,68 @@ msgstr "" msgid "Save Settings" msgstr "" -#: mailstream.php:311 +#: mailstream.php:301 msgid "Re:" msgstr "" -#: mailstream.php:324 mailstream.php:327 +#: mailstream.php:314 mailstream.php:317 msgid "Friendica post" msgstr "" -#: mailstream.php:330 +#: mailstream.php:320 msgid "Diaspora post" msgstr "" -#: mailstream.php:340 +#: mailstream.php:330 msgid "Feed item" msgstr "" -#: mailstream.php:343 +#: mailstream.php:333 msgid "Email" msgstr "" -#: mailstream.php:345 +#: mailstream.php:335 msgid "Friendica Item" msgstr "" -#: mailstream.php:419 +#: mailstream.php:404 msgid "Upstream" msgstr "" -#: mailstream.php:420 -msgid "URI" -msgstr "" - -#: mailstream.php:421 +#: mailstream.php:405 msgid "Local" msgstr "" -#: mailstream.php:499 +#: mailstream.php:481 msgid "Enabled" msgstr "" -#: mailstream.php:504 +#: mailstream.php:486 msgid "Email Address" msgstr "" -#: mailstream.php:506 +#: mailstream.php:488 msgid "Leave blank to use your account email address" msgstr "" -#: mailstream.php:510 +#: mailstream.php:492 msgid "Exclude Likes" msgstr "" -#: mailstream.php:512 +#: mailstream.php:494 msgid "Check this to omit mailing \"Like\" notifications" msgstr "" -#: mailstream.php:516 +#: mailstream.php:498 msgid "Attach Images" msgstr "" -#: mailstream.php:518 +#: mailstream.php:500 msgid "" "Download images in posts and attach them to the email. Useful for reading " "email while offline." msgstr "" -#: mailstream.php:525 +#: mailstream.php:507 msgid "Mail Stream Settings" msgstr "" diff --git a/mailstream/lang/bg/messages.po b/mailstream/lang/bg/messages.po deleted file mode 100644 index 8d39dfa6..00000000 --- a/mailstream/lang/bg/messages.po +++ /dev/null @@ -1,101 +0,0 @@ -# ADDON mailstream -# Copyright (C) -# This file is distributed under the same license as the Friendica mailstream addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 09:54+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: mailstream.php:77 -msgid "From Address" -msgstr "" - -#: mailstream.php:79 -msgid "Email address that stream items will appear to be from." -msgstr "" - -#: mailstream.php:82 -msgid "Save Settings" -msgstr "" - -#: mailstream.php:311 -msgid "Re:" -msgstr "" - -#: mailstream.php:324 mailstream.php:327 -msgid "Friendica post" -msgstr "" - -#: mailstream.php:330 -msgid "Diaspora post" -msgstr "" - -#: mailstream.php:340 -msgid "Feed item" -msgstr "" - -#: mailstream.php:343 -msgid "Email" -msgstr "" - -#: mailstream.php:345 -msgid "Friendica Item" -msgstr "" - -#: mailstream.php:419 -msgid "Upstream" -msgstr "" - -#: mailstream.php:420 -msgid "URI" -msgstr "" - -#: mailstream.php:421 -msgid "Local" -msgstr "" - -#: mailstream.php:499 -msgid "Enabled" -msgstr "" - -#: mailstream.php:504 -msgid "Email Address" -msgstr "" - -#: mailstream.php:506 -msgid "Leave blank to use your account email address" -msgstr "" - -#: mailstream.php:510 -msgid "Exclude Likes" -msgstr "" - -#: mailstream.php:512 -msgid "Check this to omit mailing \"Like\" notifications" -msgstr "" - -#: mailstream.php:516 -msgid "Attach Images" -msgstr "" - -#: mailstream.php:518 -msgid "" -"Download images in posts and attach them to the email. Useful for reading " -"email while offline." -msgstr "" - -#: mailstream.php:525 -msgid "Mail Stream Settings" -msgstr "" diff --git a/mailstream/lang/bg/strings.php b/mailstream/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/mailstream/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: mailstream.php:77 -msgid "From Address" -msgstr "" - -#: mailstream.php:79 -msgid "Email address that stream items will appear to be from." -msgstr "" - -#: mailstream.php:82 -msgid "Save Settings" -msgstr "" - -#: mailstream.php:311 -msgid "Re:" -msgstr "" - -#: mailstream.php:324 mailstream.php:327 -msgid "Friendica post" -msgstr "" - -#: mailstream.php:330 -msgid "Diaspora post" -msgstr "" - -#: mailstream.php:340 -msgid "Feed item" -msgstr "" - -#: mailstream.php:343 -msgid "Email" -msgstr "" - -#: mailstream.php:345 -msgid "Friendica Item" -msgstr "" - -#: mailstream.php:419 -msgid "Upstream" -msgstr "" - -#: mailstream.php:420 -msgid "URI" -msgstr "" - -#: mailstream.php:421 -msgid "Local" -msgstr "" - -#: mailstream.php:499 -msgid "Enabled" -msgstr "" - -#: mailstream.php:504 -msgid "Email Address" -msgstr "" - -#: mailstream.php:506 -msgid "Leave blank to use your account email address" -msgstr "" - -#: mailstream.php:510 -msgid "Exclude Likes" -msgstr "" - -#: mailstream.php:512 -msgid "Check this to omit mailing \"Like\" notifications" -msgstr "" - -#: mailstream.php:516 -msgid "Attach Images" -msgstr "" - -#: mailstream.php:518 -msgid "" -"Download images in posts and attach them to the email. Useful for reading " -"email while offline." -msgstr "" - -#: mailstream.php:525 -msgid "Mail Stream Settings" -msgstr "" diff --git a/mailstream/lang/ca/strings.php b/mailstream/lang/ca/strings.php deleted file mode 100644 index d34874f6..00000000 --- a/mailstream/lang/ca/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -, 2022 -# Raroun, 2023 # Tobias Diekershoff , 2018 # Ulf Rompe , 2019 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 09:54+0000\n" -"Last-Translator: Raroun, 2023\n" -"Language-Team: German (http://app.transifex.com/Friendica/friendica/language/de/)\n" +"POT-Creation-Date: 2018-03-11 19:13+0100\n" +"PO-Revision-Date: 2019-02-18 15:05+0000\n" +"Last-Translator: Ulf Rompe \n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -31,76 +29,72 @@ msgstr "Absender" msgid "Email address that stream items will appear to be from." msgstr "E-Mail-Adresse, die in hochgeladenen Artikeln erscheint." -#: mailstream.php:82 +#: mailstream.php:82 mailstream.php:380 msgid "Save Settings" msgstr "Einstellungen speichern" -#: mailstream.php:311 +#: mailstream.php:223 msgid "Re:" msgstr "Re:" -#: mailstream.php:324 mailstream.php:327 +#: mailstream.php:231 msgid "Friendica post" msgstr "Friendica-Veröffentlichung" -#: mailstream.php:330 +#: mailstream.php:234 msgid "Diaspora post" msgstr "Diaspora-Veröffentlichung" -#: mailstream.php:340 +#: mailstream.php:244 msgid "Feed item" msgstr "Artikel-Feed" -#: mailstream.php:343 +#: mailstream.php:247 msgid "Email" msgstr "E-Mail" -#: mailstream.php:345 +#: mailstream.php:249 msgid "Friendica Item" msgstr "Friendica-Artikel" -#: mailstream.php:419 +#: mailstream.php:293 msgid "Upstream" msgstr "Upstream" -#: mailstream.php:420 -msgid "URI" -msgstr "URI" - -#: mailstream.php:421 +#: mailstream.php:294 msgid "Local" msgstr "Lokal" -#: mailstream.php:499 +#: mailstream.php:362 msgid "Enabled" -msgstr "Aktiv" +msgstr "eingeschaltet" -#: mailstream.php:504 +#: mailstream.php:366 msgid "Email Address" msgstr "E-Mail-Adresse" -#: mailstream.php:506 +#: mailstream.php:368 msgid "Leave blank to use your account email address" msgstr "Leer lassen für deine Konto-E-Mail-Addresse" -#: mailstream.php:510 +#: mailstream.php:371 msgid "Exclude Likes" msgstr "Likes ignorieren" -#: mailstream.php:512 +#: mailstream.php:373 msgid "Check this to omit mailing \"Like\" notifications" msgstr "Diese Option verhindert das Versenden von \"Like\"-Benachrichtigungen per E-Mail." -#: mailstream.php:516 +#: mailstream.php:376 msgid "Attach Images" msgstr "Bilder anhängen" -#: mailstream.php:518 +#: mailstream.php:378 msgid "" "Download images in posts and attach them to the email. Useful for reading " "email while offline." msgstr "Sollen Bilder, die im Beitrag eingebettet sind, als Dateianhang in den E-Mails verschickt werden?" -#: mailstream.php:525 +#: mailstream.php:379 msgid "Mail Stream Settings" msgstr "Mail-Nachrichten-Einstellungen" diff --git a/mailstream/lang/de/strings.php b/mailstream/lang/de/strings.php index e107b7d0..80f9a7a2 100644 --- a/mailstream/lang/de/strings.php +++ b/mailstream/lang/de/strings.php @@ -15,9 +15,8 @@ $a->strings['Feed item'] = 'Artikel-Feed'; $a->strings['Email'] = 'E-Mail'; $a->strings['Friendica Item'] = 'Friendica-Artikel'; $a->strings['Upstream'] = 'Upstream'; -$a->strings['URI'] = 'URI'; $a->strings['Local'] = 'Lokal'; -$a->strings['Enabled'] = 'Aktiv'; +$a->strings['Enabled'] = 'eingeschaltet'; $a->strings['Email Address'] = 'E-Mail-Adresse'; $a->strings['Leave blank to use your account email address'] = 'Leer lassen für deine Konto-E-Mail-Addresse'; $a->strings['Exclude Likes'] = 'Likes ignorieren'; diff --git a/mailstream/lang/eo/messages.po b/mailstream/lang/eo/messages.po deleted file mode 100644 index 3898f09e..00000000 --- a/mailstream/lang/eo/messages.po +++ /dev/null @@ -1,101 +0,0 @@ -# ADDON mailstream -# Copyright (C) -# This file is distributed under the same license as the Friendica mailstream addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 09:54+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: mailstream.php:77 -msgid "From Address" -msgstr "" - -#: mailstream.php:79 -msgid "Email address that stream items will appear to be from." -msgstr "" - -#: mailstream.php:82 -msgid "Save Settings" -msgstr "" - -#: mailstream.php:311 -msgid "Re:" -msgstr "" - -#: mailstream.php:324 mailstream.php:327 -msgid "Friendica post" -msgstr "" - -#: mailstream.php:330 -msgid "Diaspora post" -msgstr "" - -#: mailstream.php:340 -msgid "Feed item" -msgstr "" - -#: mailstream.php:343 -msgid "Email" -msgstr "" - -#: mailstream.php:345 -msgid "Friendica Item" -msgstr "" - -#: mailstream.php:419 -msgid "Upstream" -msgstr "" - -#: mailstream.php:420 -msgid "URI" -msgstr "" - -#: mailstream.php:421 -msgid "Local" -msgstr "" - -#: mailstream.php:499 -msgid "Enabled" -msgstr "" - -#: mailstream.php:504 -msgid "Email Address" -msgstr "" - -#: mailstream.php:506 -msgid "Leave blank to use your account email address" -msgstr "" - -#: mailstream.php:510 -msgid "Exclude Likes" -msgstr "" - -#: mailstream.php:512 -msgid "Check this to omit mailing \"Like\" notifications" -msgstr "" - -#: mailstream.php:516 -msgid "Attach Images" -msgstr "" - -#: mailstream.php:518 -msgid "" -"Download images in posts and attach them to the email. Useful for reading " -"email while offline." -msgstr "" - -#: mailstream.php:525 -msgid "Mail Stream Settings" -msgstr "" diff --git a/mailstream/lang/eo/strings.php b/mailstream/lang/eo/strings.php deleted file mode 100644 index 68e8a64c..00000000 --- a/mailstream/lang/eo/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: et\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: mailstream.php:77 -msgid "From Address" -msgstr "" - -#: mailstream.php:79 -msgid "Email address that stream items will appear to be from." -msgstr "" - -#: mailstream.php:82 -msgid "Save Settings" -msgstr "" - -#: mailstream.php:311 -msgid "Re:" -msgstr "" - -#: mailstream.php:324 mailstream.php:327 -msgid "Friendica post" -msgstr "" - -#: mailstream.php:330 -msgid "Diaspora post" -msgstr "" - -#: mailstream.php:340 -msgid "Feed item" -msgstr "" - -#: mailstream.php:343 -msgid "Email" -msgstr "" - -#: mailstream.php:345 -msgid "Friendica Item" -msgstr "" - -#: mailstream.php:419 -msgid "Upstream" -msgstr "" - -#: mailstream.php:420 -msgid "URI" -msgstr "" - -#: mailstream.php:421 -msgid "Local" -msgstr "" - -#: mailstream.php:499 -msgid "Enabled" -msgstr "" - -#: mailstream.php:504 -msgid "Email Address" -msgstr "" - -#: mailstream.php:506 -msgid "Leave blank to use your account email address" -msgstr "" - -#: mailstream.php:510 -msgid "Exclude Likes" -msgstr "" - -#: mailstream.php:512 -msgid "Check this to omit mailing \"Like\" notifications" -msgstr "" - -#: mailstream.php:516 -msgid "Attach Images" -msgstr "" - -#: mailstream.php:518 -msgid "" -"Download images in posts and attach them to the email. Useful for reading " -"email while offline." -msgstr "" - -#: mailstream.php:525 -msgid "Mail Stream Settings" -msgstr "" diff --git a/mailstream/lang/et/strings.php b/mailstream/lang/et/strings.php deleted file mode 100644 index dfe78358..00000000 --- a/mailstream/lang/et/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -, 2015 # StefOfficiel , 2015 @@ -14,8 +13,8 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-11-21 19:15-0500\n" "PO-Revision-Date: 2014-06-23 09:54+0000\n" -"Last-Translator: Florent C., 2023\n" -"Language-Team: French (http://app.transifex.com/Friendica/friendica/language/fr/)\n" +"Last-Translator: Nicolas Derive, 2022\n" +"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -34,72 +33,68 @@ msgstr "Adresse de courriel de laquelle les éléments du flux sembleront proven msgid "Save Settings" msgstr "Sauvegarder les paramètres" -#: mailstream.php:311 +#: mailstream.php:301 msgid "Re:" msgstr "Re :" -#: mailstream.php:324 mailstream.php:327 +#: mailstream.php:314 mailstream.php:317 msgid "Friendica post" msgstr "Message Friendica" -#: mailstream.php:330 +#: mailstream.php:320 msgid "Diaspora post" msgstr "Message Diaspora" -#: mailstream.php:340 +#: mailstream.php:330 msgid "Feed item" msgstr "Élément du flux" -#: mailstream.php:343 +#: mailstream.php:333 msgid "Email" msgstr "Courriel" -#: mailstream.php:345 +#: mailstream.php:335 msgid "Friendica Item" msgstr "Élément de Friendica" -#: mailstream.php:419 +#: mailstream.php:404 msgid "Upstream" msgstr "En amont" -#: mailstream.php:420 -msgid "URI" -msgstr "URI" - -#: mailstream.php:421 +#: mailstream.php:405 msgid "Local" msgstr "Local" -#: mailstream.php:499 +#: mailstream.php:481 msgid "Enabled" msgstr "Activer" -#: mailstream.php:504 +#: mailstream.php:486 msgid "Email Address" msgstr "Adresse de courriel" -#: mailstream.php:506 +#: mailstream.php:488 msgid "Leave blank to use your account email address" msgstr "Laissez vide pour utiliser l'adresse de courriel de votre compte" -#: mailstream.php:510 +#: mailstream.php:492 msgid "Exclude Likes" msgstr "Exclure les \"j'aime\"" -#: mailstream.php:512 +#: mailstream.php:494 msgid "Check this to omit mailing \"Like\" notifications" msgstr "Cochez ceci pour éviter d'envoyer les notifications des \"J'aime\"" -#: mailstream.php:516 +#: mailstream.php:498 msgid "Attach Images" msgstr "Attacher les images" -#: mailstream.php:518 +#: mailstream.php:500 msgid "" "Download images in posts and attach them to the email. Useful for reading " "email while offline." msgstr "Télécharger les images des messages et les attacher au courriel. Utile pour les les courriels hors-ligne." -#: mailstream.php:525 +#: mailstream.php:507 msgid "Mail Stream Settings" msgstr "Paramètres de Mail Stream" diff --git a/mailstream/lang/fr/strings.php b/mailstream/lang/fr/strings.php index a21d80b8..bfaf4389 100644 --- a/mailstream/lang/fr/strings.php +++ b/mailstream/lang/fr/strings.php @@ -15,7 +15,6 @@ $a->strings['Feed item'] = 'Élément du flux'; $a->strings['Email'] = 'Courriel'; $a->strings['Friendica Item'] = 'Élément de Friendica'; $a->strings['Upstream'] = 'En amont'; -$a->strings['URI'] = 'URI'; $a->strings['Local'] = 'Local'; $a->strings['Enabled'] = 'Activer'; $a->strings['Email Address'] = 'Adresse de courriel'; diff --git a/mailstream/lang/gd/messages.po b/mailstream/lang/gd/messages.po deleted file mode 100644 index e86702a5..00000000 --- a/mailstream/lang/gd/messages.po +++ /dev/null @@ -1,101 +0,0 @@ -# ADDON mailstream -# Copyright (C) -# This file is distributed under the same license as the Friendica mailstream addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 09:54+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gd\n" -"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" - -#: mailstream.php:77 -msgid "From Address" -msgstr "" - -#: mailstream.php:79 -msgid "Email address that stream items will appear to be from." -msgstr "" - -#: mailstream.php:82 -msgid "Save Settings" -msgstr "" - -#: mailstream.php:311 -msgid "Re:" -msgstr "" - -#: mailstream.php:324 mailstream.php:327 -msgid "Friendica post" -msgstr "" - -#: mailstream.php:330 -msgid "Diaspora post" -msgstr "" - -#: mailstream.php:340 -msgid "Feed item" -msgstr "" - -#: mailstream.php:343 -msgid "Email" -msgstr "" - -#: mailstream.php:345 -msgid "Friendica Item" -msgstr "" - -#: mailstream.php:419 -msgid "Upstream" -msgstr "" - -#: mailstream.php:420 -msgid "URI" -msgstr "" - -#: mailstream.php:421 -msgid "Local" -msgstr "" - -#: mailstream.php:499 -msgid "Enabled" -msgstr "" - -#: mailstream.php:504 -msgid "Email Address" -msgstr "" - -#: mailstream.php:506 -msgid "Leave blank to use your account email address" -msgstr "" - -#: mailstream.php:510 -msgid "Exclude Likes" -msgstr "" - -#: mailstream.php:512 -msgid "Check this to omit mailing \"Like\" notifications" -msgstr "" - -#: mailstream.php:516 -msgid "Attach Images" -msgstr "" - -#: mailstream.php:518 -msgid "" -"Download images in posts and attach them to the email. Useful for reading " -"email while offline." -msgstr "" - -#: mailstream.php:525 -msgid "Mail Stream Settings" -msgstr "" diff --git a/mailstream/lang/gd/strings.php b/mailstream/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/mailstream/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/mailstream/lang/hu/messages.po b/mailstream/lang/hu/messages.po index 66d09299..3302564d 100644 --- a/mailstream/lang/hu/messages.po +++ b/mailstream/lang/hu/messages.po @@ -4,15 +4,15 @@ # # # Translators: -# Balázs Úr, 2020-2021,2023 +# Balázs Úr, 2020-2021 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-11-21 19:15-0500\n" "PO-Revision-Date: 2014-06-23 09:54+0000\n" -"Last-Translator: Balázs Úr, 2020-2021,2023\n" -"Language-Team: Hungarian (http://app.transifex.com/Friendica/friendica/language/hu/)\n" +"Last-Translator: Balázs Úr, 2020-2021\n" +"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -31,72 +31,68 @@ msgstr "E-mail-cím, ahonnan úgy tűnik, hogy a folyam elemei származnak." msgid "Save Settings" msgstr "Beállítások mentése" -#: mailstream.php:311 +#: mailstream.php:301 msgid "Re:" msgstr "Vá:" -#: mailstream.php:324 mailstream.php:327 +#: mailstream.php:314 mailstream.php:317 msgid "Friendica post" msgstr "Friendica-bejegyzés" -#: mailstream.php:330 +#: mailstream.php:320 msgid "Diaspora post" msgstr "Diaspora-bejegyzés" -#: mailstream.php:340 +#: mailstream.php:330 msgid "Feed item" msgstr "Hírforráselem" -#: mailstream.php:343 +#: mailstream.php:333 msgid "Email" msgstr "E-mail" -#: mailstream.php:345 +#: mailstream.php:335 msgid "Friendica Item" msgstr "Friendica-elem" -#: mailstream.php:419 +#: mailstream.php:404 msgid "Upstream" msgstr "Távoli" -#: mailstream.php:420 -msgid "URI" -msgstr "URI" - -#: mailstream.php:421 +#: mailstream.php:405 msgid "Local" msgstr "Helyi" -#: mailstream.php:499 +#: mailstream.php:481 msgid "Enabled" msgstr "Engedélyezve" -#: mailstream.php:504 +#: mailstream.php:486 msgid "Email Address" msgstr "E-mail-cím" -#: mailstream.php:506 +#: mailstream.php:488 msgid "Leave blank to use your account email address" msgstr "Hagyja üresen a fiókja e-mail-címének használatához" -#: mailstream.php:510 +#: mailstream.php:492 msgid "Exclude Likes" msgstr "Kedvelések kizárása" -#: mailstream.php:512 +#: mailstream.php:494 msgid "Check this to omit mailing \"Like\" notifications" msgstr "Jelölje be ezt a „Tetszik” értesítések elküldésének kihagyásához" -#: mailstream.php:516 +#: mailstream.php:498 msgid "Attach Images" msgstr "Képek csatolása" -#: mailstream.php:518 +#: mailstream.php:500 msgid "" "Download images in posts and attach them to the email. Useful for reading " "email while offline." msgstr "Képek letöltése a bejegyzésekből és csatolás az e-mailhez. Hasznos az e-mailek kapcsolat nélküli olvasásakor." -#: mailstream.php:525 +#: mailstream.php:507 msgid "Mail Stream Settings" msgstr "Levelezőfolyam beállításai" diff --git a/mailstream/lang/hu/strings.php b/mailstream/lang/hu/strings.php index 5b1e5a51..5a7383bd 100644 --- a/mailstream/lang/hu/strings.php +++ b/mailstream/lang/hu/strings.php @@ -15,7 +15,6 @@ $a->strings['Feed item'] = 'Hírforráselem'; $a->strings['Email'] = 'E-mail'; $a->strings['Friendica Item'] = 'Friendica-elem'; $a->strings['Upstream'] = 'Távoli'; -$a->strings['URI'] = 'URI'; $a->strings['Local'] = 'Helyi'; $a->strings['Enabled'] = 'Engedélyezve'; $a->strings['Email Address'] = 'E-mail-cím'; diff --git a/mailstream/lang/is/messages.po b/mailstream/lang/is/messages.po deleted file mode 100644 index 1efd940c..00000000 --- a/mailstream/lang/is/messages.po +++ /dev/null @@ -1,101 +0,0 @@ -# ADDON mailstream -# Copyright (C) -# This file is distributed under the same license as the Friendica mailstream addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 09:54+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: is\n" -"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" - -#: mailstream.php:77 -msgid "From Address" -msgstr "" - -#: mailstream.php:79 -msgid "Email address that stream items will appear to be from." -msgstr "" - -#: mailstream.php:82 -msgid "Save Settings" -msgstr "" - -#: mailstream.php:311 -msgid "Re:" -msgstr "" - -#: mailstream.php:324 mailstream.php:327 -msgid "Friendica post" -msgstr "" - -#: mailstream.php:330 -msgid "Diaspora post" -msgstr "" - -#: mailstream.php:340 -msgid "Feed item" -msgstr "" - -#: mailstream.php:343 -msgid "Email" -msgstr "" - -#: mailstream.php:345 -msgid "Friendica Item" -msgstr "" - -#: mailstream.php:419 -msgid "Upstream" -msgstr "" - -#: mailstream.php:420 -msgid "URI" -msgstr "" - -#: mailstream.php:421 -msgid "Local" -msgstr "" - -#: mailstream.php:499 -msgid "Enabled" -msgstr "" - -#: mailstream.php:504 -msgid "Email Address" -msgstr "" - -#: mailstream.php:506 -msgid "Leave blank to use your account email address" -msgstr "" - -#: mailstream.php:510 -msgid "Exclude Likes" -msgstr "" - -#: mailstream.php:512 -msgid "Check this to omit mailing \"Like\" notifications" -msgstr "" - -#: mailstream.php:516 -msgid "Attach Images" -msgstr "" - -#: mailstream.php:518 -msgid "" -"Download images in posts and attach them to the email. Useful for reading " -"email while offline." -msgstr "" - -#: mailstream.php:525 -msgid "Mail Stream Settings" -msgstr "" diff --git a/mailstream/lang/is/strings.php b/mailstream/lang/is/strings.php deleted file mode 100644 index 975c341e..00000000 --- a/mailstream/lang/is/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -strings['Feed item'] = 'Element kanału'; $a->strings['Email'] = 'E-mail'; $a->strings['Friendica Item'] = 'Pozycja Friendica'; $a->strings['Upstream'] = 'Nadrzędny'; -$a->strings['URI'] = 'URI'; $a->strings['Local'] = 'Lokalny'; $a->strings['Enabled'] = 'Włączone'; $a->strings['Email Address'] = 'Adres e-mail'; diff --git a/mailstream/lang/ru/messages.po b/mailstream/lang/ru/messages.po deleted file mode 100644 index cabb4b45..00000000 --- a/mailstream/lang/ru/messages.po +++ /dev/null @@ -1,101 +0,0 @@ -# ADDON mailstream -# Copyright (C) -# This file is distributed under the same license as the Friendica mailstream addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 09:54+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Russian (http://app.transifex.com/Friendica/friendica/language/ru/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" - -#: mailstream.php:77 -msgid "From Address" -msgstr "" - -#: mailstream.php:79 -msgid "Email address that stream items will appear to be from." -msgstr "" - -#: mailstream.php:82 -msgid "Save Settings" -msgstr "" - -#: mailstream.php:311 -msgid "Re:" -msgstr "" - -#: mailstream.php:324 mailstream.php:327 -msgid "Friendica post" -msgstr "" - -#: mailstream.php:330 -msgid "Diaspora post" -msgstr "" - -#: mailstream.php:340 -msgid "Feed item" -msgstr "" - -#: mailstream.php:343 -msgid "Email" -msgstr "" - -#: mailstream.php:345 -msgid "Friendica Item" -msgstr "" - -#: mailstream.php:419 -msgid "Upstream" -msgstr "" - -#: mailstream.php:420 -msgid "URI" -msgstr "" - -#: mailstream.php:421 -msgid "Local" -msgstr "" - -#: mailstream.php:499 -msgid "Enabled" -msgstr "" - -#: mailstream.php:504 -msgid "Email Address" -msgstr "" - -#: mailstream.php:506 -msgid "Leave blank to use your account email address" -msgstr "" - -#: mailstream.php:510 -msgid "Exclude Likes" -msgstr "" - -#: mailstream.php:512 -msgid "Check this to omit mailing \"Like\" notifications" -msgstr "" - -#: mailstream.php:516 -msgid "Attach Images" -msgstr "" - -#: mailstream.php:518 -msgid "" -"Download images in posts and attach them to the email. Useful for reading " -"email while offline." -msgstr "" - -#: mailstream.php:525 -msgid "Mail Stream Settings" -msgstr "" diff --git a/mailstream/lang/ru/strings.php b/mailstream/lang/ru/strings.php deleted file mode 100644 index 0579fc21..00000000 --- a/mailstream/lang/ru/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; } -}} diff --git a/mailstream/mailstream.php b/mailstream/mailstream.php index 7f68b7cc..bf4c9906 100644 --- a/mailstream/mailstream.php +++ b/mailstream/mailstream.php @@ -6,19 +6,22 @@ * Author: Matthew Exon */ +use Friendica\App; use Friendica\Content\Text\BBCode; use Friendica\Core\Hook; +use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\Core\System; use Friendica\Core\Worker; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Contact; +use Friendica\Model\Item; use Friendica\Model\Post; use Friendica\Model\User; use Friendica\Network\HTTPClient\Client\HttpClientAccept; -use Friendica\Network\HTTPClient\Client\HttpClientOptions; use Friendica\Protocol\Activity; +use Friendica\Util\DateTimeFormat; /** * Sets up the addon hooks and the database table @@ -29,9 +32,29 @@ function mailstream_install() Hook::register('addon_settings_post', 'addon/mailstream/mailstream.php', 'mailstream_addon_settings_post'); Hook::register('post_local_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook'); Hook::register('post_remote_end', 'addon/mailstream/mailstream.php', 'mailstream_post_hook'); + Hook::register('cron', 'addon/mailstream/mailstream.php', 'mailstream_cron'); Hook::register('mailstream_send_hook', 'addon/mailstream/mailstream.php', 'mailstream_send_hook'); - DI::logger()->info("installed mailstream"); + Logger::info("mailstream: installed"); +} + +/** + * Enforces that mailstream_install has set up the current version + */ +function mailstream_check_version() +{ + if (!is_null(DI::config()->get('mailstream', 'dbversion'))) { + DI::config()->delete('mailstream', 'dbversion'); + Logger::info("mailstream_check_version: old version detected, reinstalling"); + mailstream_install(); + Hook::loadHooks(); + Hook::add( + 'mailstream_convert_table_entries', + 'addon/mailstream/mailstream.php', + 'mailstream_convert_table_entries' + ); + Hook::fork(Worker::PRIORITY_LOW, 'mailstream_convert_table_entries'); + } } /** @@ -50,12 +73,10 @@ function mailstream_addon_admin(string &$o) { $frommail = DI::config()->get('mailstream', 'frommail'); $template = Renderer::getMarkupTemplate('admin.tpl', 'addon/mailstream/'); - $config = [ - 'frommail', + $config = ['frommail', DI::l10n()->t('From Address'), $frommail, - DI::l10n()->t('Email address that stream items will appear to be from.') - ]; + DI::l10n()->t('Email address that stream items will appear to be from.')]; $o .= Renderer::replaceMacros($template, [ '$frommail' => $config, '$submit' => DI::l10n()->t('Save Settings') @@ -72,68 +93,6 @@ function mailstream_addon_admin_post() } } -/** - * Creates content for the "References" header. When the message is - * part of a thread, this contains a handful of message IDs of other - * messages in the thread. This should provide enough clues for mail - * agents to thread messages together, even if some messages or - * references are missing. See https://www.jwz.org/doc/threading.html - * - * According to RFC 1036, these references should be in forwards - * chronological order separated by spaces. That is, the first - * message ID is the top-level post, then the first-level reply, then - * the second-level reply, and so on, ending in the direct parent. - * The RFC allows for message IDs to be omitted for length. To save - * database queries we only include the three nearest replies in the - * chain, plus the top-level post. - * - * @param array $item content of the item - * - * @return string the set of references as a space-separated string - */ -function mailstream_generate_references(array $item): string -{ - $ancestor_message_ids = []; - - $top_level_post_uri = ""; - if (array_key_exists("parent-uri", $item)) { - $top_level_post_uri = $item["parent-uri"]; - } - - $ancestor_uri = ""; - if (array_key_exists("thr-parent", $item)) { - $ancestor_uri = $item["thr-parent"]; - } - while ($ancestor_uri && count($ancestor_message_ids) < 3) { - if ($ancestor_uri == $top_level_post_uri) { - break; - } - $ancestor_message_id = mailstream_generate_id($ancestor_uri); - array_unshift($ancestor_message_ids, $ancestor_message_id); - - $ancestor = Post::selectFirst([], array("uid" => $item["uid"], "uri" => $ancestor_uri)); - if (empty($ancestor)) { - DI::logger()->error("Could not retrieve ancestor post", ["uri" => $item["uri"], "uid" => $item["uid"], "ancestor-uri" => $ancestor_uri]); - break; - } - if (!array_key_exists("thr-parent", $ancestor)) { - break; - } - $ancestor_uri = $ancestor["thr-parent"]; - } - - if ($top_level_post_uri) { - $top_level_post_message_id = mailstream_generate_id($top_level_post_uri); - array_unshift($ancestor_message_ids, $top_level_post_message_id); - } - - if (empty($ancestor_message_ids)) { - DI::logger()->error('cannot generate references for item with no parent', ["uri" => $item['uri']]); - return ""; - } - return implode(" ", $ancestor_message_ids); -} - /** * Creates a message ID for a post URI in accordance with RFC 1036 * See also http://www.jwz.org/doc/mid.html @@ -144,10 +103,10 @@ function mailstream_generate_references(array $item): string */ function mailstream_generate_id(string $uri): string { - $host = DI::baseUrl()->getHost(); + $host = DI::baseUrl()->getHostname(); $resource = hash('md5', $uri); $message_id = "<" . $resource . "@" . $host . ">"; - DI::logger()->debug('generated message ID', ['id' => $message_id, 'uri' => $uri]); + Logger::debug('mailstream: Generated message ID ' . $message_id . ' for URI ' . $uri); return $message_id; } @@ -156,48 +115,20 @@ function mailstream_send_hook(array $data) $criteria = array('uid' => $data['uid'], 'contact-id' => $data['contact-id'], 'uri' => $data['uri']); $item = Post::selectFirst([], $criteria); if (empty($item)) { - DI::logger()->error('could not find item'); + Logger::error('mailstream_send_hook could not find item'); return; } $user = User::getById($item['uid']); if (empty($user)) { - DI::logger()->error('could not find user', ['uid' => $item['uid']]); + Logger::error('mailstream_send_hook could not fund user', ['uid' => $item['uid']]); return; } - $author = DBA::selectFirst('contact', ['nick', 'blocked', 'uri-id'], ['id' => $data['author-id'], 'self' => false]); - if (!DBA::isResult($author)) { - DI::logger()->error('could not find author', ['guid' => $item['guid'], 'author-id' => $data['author-id']]); - return; - } - if ($author['blocked']) { - DI::logger()->info('author is blocked', ['guid' => $item['guid'], 'author-id' => $data['author-id']]); - return; - } - $collapsed = false; - $user_contact = DBA::selectFirst('user-contact', ['cid', 'blocked', 'ignored', 'collapsed'], ['uid' => $item['uid'], 'uri-id' => $item['author-uri-id']]); - if (!DBA::isResult($user_contact)) { - $user_contact = DBA::selectFirst('user-contact', ['cid', 'blocked', 'ignored', 'collapsed'], ['uid' => $item['uid'], 'cid' => $item['author-id']]); - } - if (DBA::isResult($user_contact)) { - if ($user_contact['blocked']) { - DI::logger()->info('author is blocked', ['guid' => $item['guid'], 'cid' => $user_contact['cid']]); - return; - } - if ($user_contact['ignored']) { - DI::logger()->info('author is ignored', ['guid' => $item['guid'], 'cid' => $user_contact['cid']]); - return; - } - if ($user_contact['collapsed']) { - $collapsed = true; - } - } - - if (!mailstream_send($data['message_id'], $item, $user, $collapsed)) { - DI::logger()->debug('send failed, will retry', $data); + if (!mailstream_send($data['message_id'], $item, $user)) { + Logger::debug('mailstream_send_hook send failed, will retry', $data); if (!Worker::defer()) { - DI::logger()->error('failed and could not defer', $data); + Logger::error('mailstream_send_hook failed and could not defer', $data); } } } @@ -212,33 +143,31 @@ function mailstream_send_hook(array $data) */ function mailstream_post_hook(array &$item) { - if ($item['uid'] === 0) { - DI::logger()->debug('mailstream: root user, skipping item ' . $item['id']); + mailstream_check_version(); + + if (!DI::pConfig()->get($item['uid'], 'mailstream', 'enabled')) { + Logger::debug('mailstream: not enabled for item ' . $item['id']); return; } - if (!DI::pConfig()->get($item['uid'], 'mailstream', 'enabled')) { - DI::logger()->debug('mailstream: not enabled.', ['item' => $item['id'], ' uid ' => $item['uid']]); + if (!$item['uid']) { + Logger::debug('mailstream: no uid for item ' . $item['id']); return; } if (!$item['contact-id']) { - DI::logger()->debug('no contact-id', ['item' => $item['id']]); + Logger::debug('mailstream: no contact-id for item ' . $item['id']); return; } if (!$item['uri']) { - DI::logger()->debug('no uri', ['item' => $item['id']]); + Logger::debug('mailstream: no uri for item ' . $item['id']); return; } - if ($item['verb'] == Activity::ANNOUNCE) { - DI::logger()->debug('ignoring announce', ['item' => $item['id']]); + if (!$item['plink']) { + Logger::debug('mailstream: no plink for item ' . $item['id']); return; } if (DI::pConfig()->get($item['uid'], 'mailstream', 'nolikes')) { if ($item['verb'] == Activity::LIKE) { - DI::logger()->debug('ignoring like', ['item' => $item['id']]); - return; - } - if ($item['verb'] == Activity::DISLIKE) { - DI::logger()->debug('ignoring dislike', ['item' => $item['id']]); + Logger::debug('mailstream: like item ' . $item['id']); return; } } @@ -248,7 +177,6 @@ function mailstream_post_hook(array &$item) $send_hook_data = [ 'uid' => $item['uid'], 'contact-id' => $item['contact-id'], - 'author-id' => $item['author-id'], 'uri' => $item['uri'], 'message_id' => $message_id, 'tries' => 0, @@ -270,7 +198,7 @@ function mailstream_post_hook(array &$item) function mailstream_do_images(array &$item, array &$attachments) { if (!DI::pConfig()->get($item['uid'], 'mailstream', 'attachimg')) { - return $attachments; + return; } $attachments = []; @@ -287,22 +215,9 @@ function mailstream_do_images(array &$item, array &$attachments) } $cookiejar = tempnam(System::getTempPath(), 'cookiejar-mailstream-'); - try { - $curlResult = DI::httpClient()->get($url, HttpClientAccept::DEFAULT, [HttpClientOptions::COOKIEJAR => $cookiejar]); - if (!$curlResult->isSuccess()) { - DI::logger()->debug('mailstream: fetch image url failed', [ - 'url' => $url, - 'item_id' => $item['id'], - 'return_code' => $curlResult->getReturnCode() - ]); - continue; - } - } catch (InvalidArgumentException $e) { - DI::logger()->error('exception fetching url', ['url' => $url, 'item_id' => $item['id']]); - continue; - } + $curlResult = DI::httpClient()->fetchFull($url, HttpClientAccept::DEFAULT, 0, $cookiejar); $attachments[$url] = [ - 'data' => $curlResult->getBodyString(), + 'data' => $curlResult->getBody(), 'guid' => hash('crc32', $url), 'filename' => basename($components['path']), 'type' => $curlResult->getContentType() @@ -339,13 +254,12 @@ function mailstream_sender(array $item): string * Converts a bbcode-encoded subject line into a plaintext version suitable for the subject line of an email * * @param string $subject bbcode-encoded subject line - * @param int $uri_id * * @return string plaintext subject line */ -function mailstream_decode_subject(string $subject, int $uri_id): string +function mailstream_decode_subject(string $subject): string { - $html = BBCode::convertForUriId($uri_id, $subject); + $html = BBCode::convert($subject); if (!$html) { return $subject; } @@ -380,7 +294,7 @@ function mailstream_decode_subject(string $subject, int $uri_id): string function mailstream_subject(array $item): string { if ($item['title']) { - return mailstream_decode_subject($item['title'], $item['uri-id']); + return mailstream_decode_subject($item['title']); } $parent = $item['thr-parent']; // Don't look more than 100 levels deep for a subject, in case of loops @@ -393,18 +307,19 @@ function mailstream_subject(array $item): string break; } if ($parent_item['title']) { - return DI::l10n()->t('Re:') . ' ' . mailstream_decode_subject($parent_item['title'], $item['uri-id']); + return DI::l10n()->t('Re:') . ' ' . mailstream_decode_subject($parent_item['title']); } $parent = $parent_item['thr-parent']; } $contact = Contact::selectFirst([], ['id' => $item['contact-id'], 'uid' => $item['uid']]); if (!DBA::isResult($contact)) { - DI::logger()->error('no contact', [ - 'item' => $item['id'], - 'plink' => $item['plink'], - 'contact id' => $item['contact-id'], - 'uid' => $item['uid'] - ]); + Logger::error( + 'mailstream_subject no contact for item', + ['id' => $item['id'], + 'plink' => $item['plink'], + 'contact id' => $item['contact-id'], + 'uid' => $item['uid']] + ); return DI::l10n()->t("Friendica post"); } if ($contact['network'] === 'dfrn') { @@ -414,7 +329,7 @@ function mailstream_subject(array $item): string return DI::l10n()->t("Diaspora post"); } if ($contact['network'] === 'face') { - $text = mailstream_decode_subject($item['body'], $item['uri-id']); + $text = mailstream_decode_subject($item['body']); // For some reason these do show up in Facebook $text = preg_replace('/\xA0$/', '', $text); $subject = (strlen($text) > 150) ? (substr($text, 0, 140) . '...') : $text; @@ -435,38 +350,32 @@ function mailstream_subject(array $item): string * @param string $message_id ID of the message (RFC 1036) * @param array $item content of the item * @param array $user results from the user table - * @param bool $collapsed true if the content should be hidden * * @return bool True if this message has been completed. False if it should be retried. */ -function mailstream_send(string $message_id, array $item, array $user, bool $collapsed): bool +function mailstream_send(string $message_id, array $item, array $user): bool { if (!is_array($item)) { - DI::logger()->error('item is empty', ['message_id' => $message_id]); + Logger::error('mailstream_send item is empty', ['message_id' => $message_id]); return false; } if (!$item['visible']) { - DI::logger()->debug('item not yet visible', ['item uri' => $item['uri']]); + Logger::debug('mailstream_send item not yet visible', ['item uri' => $item['uri']]); return false; } if (!$message_id) { - DI::logger()->error('no message ID supplied', ['item uri' => $item['uri'], 'user email' => $user['email']]); + Logger::error('mailstream_send no message ID supplied', ['item uri' => $item['uri'], + 'user email' => $user['email']]); return true; } - require_once(dirname(__file__) . '/phpmailer/class.phpmailer.php'); + require_once (dirname(__file__) . '/phpmailer/class.phpmailer.php'); - if ($collapsed) { - $item['body'] = DI::l10n()->t('Content from %s is collapsed', $item['author-name']); - } else { - $item['body'] = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']); - } + $item['body'] = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']); $attachments = []; - if (!$collapsed) { - mailstream_do_images($item, $attachments); - } + mailstream_do_images($item, $attachments); $frommail = DI::config()->get('mailstream', 'frommail'); if ($frommail == '') { $frommail = 'friendica@localhost.local'; @@ -475,7 +384,7 @@ function mailstream_send(string $message_id, array $item, array $user, bool $col if (!$address) { $address = $user['email']; } - $mail = new PHPMailer(); + $mail = new PHPmailer(); try { $mail->XMailer = 'Friendica Mailstream Addon'; $mail->SetFrom($frommail, mailstream_sender($item)); @@ -484,12 +393,9 @@ function mailstream_send(string $message_id, array $item, array $user, bool $col $mail->Subject = mailstream_subject($item); if ($item['thr-parent'] != $item['uri']) { $mail->addCustomHeader('In-Reply-To: ' . mailstream_generate_id($item['thr-parent'])); - $mail->addCustomHeader('References: ' . mailstream_generate_references($item)); } $mail->addCustomHeader('X-Friendica-Mailstream-URI: ' . $item['uri']); - if ($item['plink']) { - $mail->addCustomHeader('X-Friendica-Mailstream-Plink: ' . $item['plink']); - } + $mail->addCustomHeader('X-Friendica-Mailstream-Plink: ' . $item['plink']); $encoding = 'base64'; foreach ($attachments as $url => $image) { $mail->AddStringEmbeddedImage( @@ -505,26 +411,22 @@ function mailstream_send(string $message_id, array $item, array $user, bool $col $template = Renderer::getMarkupTemplate('mail.tpl', 'addon/mailstream/'); $mail->AltBody = BBCode::toPlaintext($item['body']); $item['body'] = BBCode::convertForUriId($item['uri-id'], $item['body'], BBCode::CONNECTORS); - $item['url'] = DI::baseUrl() . '/display/' . $item['guid']; + $item['url'] = DI::baseUrl()->get() . '/display/' . $item['guid']; $mail->Body = Renderer::replaceMacros($template, [ - '$upstream' => DI::l10n()->t('Upstream'), - '$uri' => DI::l10n()->t('URI'), - '$local' => DI::l10n()->t('Local'), - '$item' => $item - ]); - $mail->Body = mailstream_html_wrap($mail->Body); + '$upstream' => DI::l10n()->t('Upstream'), + '$local' => DI::l10n()->t('Local'), + '$item' => $item]); + mailstream_html_wrap($mail->Body); if (!$mail->Send()) { throw new Exception($mail->ErrorInfo); } - DI::logger()->debug('sent message', [ - 'message ID' => $mail->MessageID, - 'subject' => $mail->Subject, - 'address' => $address - ]); + Logger::debug('mailstream_send sent message', ['message ID' => $mail->MessageID, + 'subject' => $mail->Subject, + 'address' => $address]); } catch (phpmailerException $e) { - DI::logger()->debug('PHPMailer exception sending message', ['id' => $message_id, 'error' => $e->errorMessage()]); + Logger::debug('mailstream_send PHPMailer exception sending message ' . $message_id . ': ' . $e->errorMessage()); } catch (Exception $e) { - DI::logger()->debug('exception sending message', ['id' => $message_id, 'error' => $e->getMessage()]); + Logger::debug('mailstream_send exception sending message ' . $message_id . ': ' . $e->getMessage()); } return true; @@ -535,8 +437,7 @@ function mailstream_send(string $message_id, array $item, array $user, bool $col * bbcode's output suitable for transmission, we try to break things * up so that lines are about 200 characters. * - * @param string $text text to word wrap - * @return string wrapped text + * @param string $text text to word wrap - modified in-place */ function mailstream_html_wrap(string &$text) { @@ -545,7 +446,30 @@ function mailstream_html_wrap(string &$text) $lines[$i] = preg_replace('/ /', "\n", $lines[$i], 1); } $text = implode($lines); - return $text; +} + +/** + * Convert v1 mailstream table entries to v2 workerqueue items + */ +function mailstream_convert_table_entries() +{ + $ms_item_ids = DBA::selectToArray('mailstream_item', [], ['message-id', 'uri', 'uid', 'contact-id'], ["`mailstream_item`.`completed` IS NULL"]); + Logger::debug('mailstream_convert_table_entries processing ' . count($ms_item_ids) . ' items'); + foreach ($ms_item_ids as $ms_item_id) { + $send_hook_data = array('uid' => $ms_item_id['uid'], + 'contact-id' => $ms_item_id['contact-id'], + 'uri' => $ms_item_id['uri'], + 'message_id' => $ms_item_id['message-id'], + 'tries' => 0); + if (!$ms_item_id['message-id'] || !strlen($ms_item_id['message-id'])) { + Logger::info('mailstream_cron: Item ' . + $ms_item_id['id'] . ' URI ' . $ms_item_id['uri'] . ' has no message-id'); + continue; + } + Logger::info('mailstream_convert_table_entries: convert item to workerqueue', $send_hook_data); + Hook::fork(Worker::PRIORITY_LOW, 'mailstream_send_hook', $send_hook_data); + } + DBA::e('DROP TABLE `mailstream_item`'); } /** diff --git a/mailstream/phpmailer/class.phpmailer.php b/mailstream/phpmailer/class.phpmailer.php index 8cd05a2c..ab7fe030 100644 --- a/mailstream/phpmailer/class.phpmailer.php +++ b/mailstream/phpmailer/class.phpmailer.php @@ -2690,10 +2690,10 @@ class PHPMailer if (!is_readable($path)) { throw new phpmailerException($this->lang('file_open') . $path, self::STOP_CONTINUE); } - $magic_quotes = false; + $magic_quotes = get_magic_quotes_runtime(); if ($magic_quotes) { if (version_compare(PHP_VERSION, '5.3.0', '<')) { - //set_magic_quotes_runtime(false); + set_magic_quotes_runtime(false); } else { //Doesn't exist in PHP 5.4, but we don't need to check because //get_magic_quotes_runtime always returns false in 5.4+ @@ -2705,7 +2705,7 @@ class PHPMailer $file_buffer = $this->encodeString($file_buffer, $encoding); if ($magic_quotes) { if (version_compare(PHP_VERSION, '5.3.0', '<')) { - //set_magic_quotes_runtime($magic_quotes); + set_magic_quotes_runtime($magic_quotes); } else { ini_set('magic_quotes_runtime', $magic_quotes); } @@ -3286,7 +3286,7 @@ class PHPMailer $result = 'localhost.localdomain'; if (!empty($this->Hostname)) { $result = $this->Hostname; - } elseif (!empty($_SERVER['SERVER_NAME'])) { + } elseif (isset($_SERVER) and array_key_exists('SERVER_NAME', $_SERVER) and !empty($_SERVER['SERVER_NAME'])) { $result = $_SERVER['SERVER_NAME']; } elseif (function_exists('gethostname') && gethostname() !== false) { $result = gethostname(); diff --git a/mailstream/templates/mail.tpl b/mailstream/templates/mail.tpl index 8015b45f..526ca4ef 100644 --- a/mailstream/templates/mail.tpl +++ b/mailstream/templates/mail.tpl @@ -6,6 +6,5 @@
{{$item.body nofilter}}
{{if $item.plink}}
{{$upstream}}: {{$item.plink}}
-
{{$uri}}: {{$item.uri}}
{{$local}}: {{$item.url}}
{{/if}} diff --git a/markdown/lang/da-dk/messages.po b/markdown/lang/da-dk/messages.po deleted file mode 100644 index 51359983..00000000 --- a/markdown/lang/da-dk/messages.po +++ /dev/null @@ -1,36 +0,0 @@ -# ADDON markdown -# Copyright (C) -# This file is distributed under the same license as the Friendica markdown addon package. -# -# -# Translators: -# Jesper Stocholm, 2025 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2019-12-27 06:41+0000\n" -"Last-Translator: Jesper Stocholm, 2025\n" -"Language-Team: Danish (Denmark) (https://app.transifex.com/Friendica/teams/12172/da_DK/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: da_DK\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: markdown.php:30 -msgid "Enable Markdown parsing" -msgstr "Aktivér Markdown-understøttelse" - -#: markdown.php:30 -msgid "If enabled, adds Markdown support to the Compose Post form." -msgstr "" -"Hvis aktiveret, tilføjes understøttelse for Markdown ved redigering af " -"opslag." - -#: markdown.php:35 -msgid "Markdown Settings" -msgstr "Markdown-indstillinger" diff --git a/markdown/lang/da-dk/strings.php b/markdown/lang/da-dk/strings.php deleted file mode 100644 index 468ac5f8..00000000 --- a/markdown/lang/da-dk/strings.php +++ /dev/null @@ -1,10 +0,0 @@ -strings['Enable Markdown parsing'] = 'Aktivér Markdown-understøttelse'; -$a->strings['If enabled, adds Markdown support to the Compose Post form.'] = 'Hvis aktiveret, tilføjes understøttelse for Markdown ved redigering af opslag.'; -$a->strings['Markdown Settings'] = 'Markdown-indstillinger'; diff --git a/markdown/markdown.php b/markdown/markdown.php index 1ef6cd9a..236fb297 100644 --- a/markdown/markdown.php +++ b/markdown/markdown.php @@ -5,6 +5,7 @@ * Version: 0.1 * Author: Michael Vogel */ +use Friendica\App; use Friendica\Core\Hook; use Friendica\Content\Text\Markdown; use Friendica\Core\Renderer; @@ -26,7 +27,7 @@ function markdown_addon_settings(array &$data) $t = Renderer::getMarkupTemplate('settings.tpl', 'addon/markdown/'); $html = Renderer::replaceMacros($t, [ - '$enabled' => ['markdown-enabled', DI::l10n()->t('Enable Markdown parsing'), $enabled, DI::l10n()->t('If enabled, adds Markdown support to the Compose Post form.')], + '$enabled' => ['enabled', DI::l10n()->t('Enable Markdown parsing'), $enabled, DI::l10n()->t('If enabled, adds Markdown support to the Compose Post form.')], ]); $data = [ @@ -42,7 +43,7 @@ function markdown_addon_settings_post(array &$b) return; } - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'markdown', 'enabled', intval($_POST['markdown-enabled'])); + DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'markdown', 'enabled', intval($_POST['enabled'])); } function markdown_post_local_start(&$request) { @@ -63,7 +64,6 @@ function markdown_post_local_start(&$request) { // (right chevrons are used for quoting in Markdown) // See https://github.com/friendica/friendica/issues/10634 $text = strtr($text, ['<' => '<']); - $text = str_replace('[*]', '[li]', $text); return Markdown::toBBCode($text); }); diff --git a/mastodoncustomemojis/mastodoncustomemojis.php b/mastodoncustomemojis/mastodoncustomemojis.php index fcb8feea..c84f1a4f 100644 --- a/mastodoncustomemojis/mastodoncustomemojis.php +++ b/mastodoncustomemojis/mastodoncustomemojis.php @@ -1,4 +1,5 @@ get($api_url); + $fetchResult = DI::httpClient()->fetchFull($api_url); if ($fetchResult->isSuccess()) { - $emojis_array = json_decode($fetchResult->getBodyString(), true); + $emojis_array = json_decode($fetchResult->getBody(), true); if (is_array($emojis_array) && count($emojis_array)) { foreach ($emojis_array as $emoji) { if (!empty($emoji['shortcode']) && !empty($emoji['static_url'])) { $return['texts'][] = ':' . $emoji['shortcode'] . ':'; - $return['icons'][] = ':' . $emoji['shortcode'] . ':'; + $return['icons'][] = ':' . $emoji['shortcode'] . ':'; } } } diff --git a/mathjax/lang/bg/messages.po b/mathjax/lang/bg/messages.po deleted file mode 100644 index 0693f595..00000000 --- a/mathjax/lang/bg/messages.po +++ /dev/null @@ -1,30 +0,0 @@ -# ADDON mathjax -# Copyright (C) -# This file is distributed under the same license as the Friendica mathjax addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 09:55+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: mathjax.php:42 -msgid "" -"The MathJax addon renders mathematical formulae written using the LaTeX " -"syntax surrounded by the usual $$ or an eqnarray block in the postings of " -"your wall,network tab and private mail." -msgstr "" - -#: mathjax.php:43 -msgid "Use the MathJax renderer" -msgstr "" diff --git a/mathjax/lang/bg/strings.php b/mathjax/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/mathjax/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: mathjax.php:42 -msgid "" -"The MathJax addon renders mathematical formulae written using the LaTeX " -"syntax surrounded by the usual $$ or an eqnarray block in the postings of " -"your wall,network tab and private mail." -msgstr "" - -#: mathjax.php:43 -msgid "Use the MathJax renderer" -msgstr "" diff --git a/mathjax/lang/ca/strings.php b/mathjax/lang/ca/strings.php index d34874f6..a66618a1 100644 --- a/mathjax/lang/ca/strings.php +++ b/mathjax/lang/ca/strings.php @@ -1,7 +1,9 @@ -strings["Settings"] = "Ajustos"; +$a->strings["The MathJax addon renders mathematical formulae written using the LaTeX syntax surrounded by the usual $$ or an eqnarray block in the postings of your wall,network tab and private mail."] = "El complement MathJax processa les fórmules matemàtiques escrites utilitzant la sintaxi de LaTeX, envoltades per l'habitual $$ o un bloc de \"eqnarray\" en les publicacions del seu mur, a la fitxa de la xarxa i correu privat."; +$a->strings["Use the MathJax renderer"] = "Utilitzar el processador Mathjax"; +$a->strings["Submit"] = "Enviar"; +$a->strings["Settings updated."] = "Ajustos actualitzats."; +$a->strings["MathJax Base URL"] = "URL Base de Mathjax"; +$a->strings["The URL for the javascript file that should be included to use MathJax. Can be either the MathJax CDN or another installation of MathJax."] = "La URL del fitxer javascript que ha de ser inclòs per a usar Mathjax. Pot ser utilitzat per Mathjax CDN o un altre instal·lació de Mathjax."; diff --git a/mathjax/lang/cs/messages.po b/mathjax/lang/cs/messages.po index ae2968be..66d201f6 100644 --- a/mathjax/lang/cs/messages.po +++ b/mathjax/lang/cs/messages.po @@ -4,29 +4,50 @@ # # # Translators: -# Aditoo, 2018 -# michal_s , 2014-2015 +# Michal Šupler , 2014-2015 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 09:55+0000\n" -"Last-Translator: Aditoo, 2018\n" -"Language-Team: Czech (http://app.transifex.com/Friendica/friendica/language/cs/)\n" +"POT-Creation-Date: 2013-02-27 05:01-0500\n" +"PO-Revision-Date: 2015-02-11 19:38+0000\n" +"Last-Translator: Michal Šupler \n" +"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" -"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: mathjax.php:42 +#: mathjax.php:36 +msgid "Settings" +msgstr "Nastavení" + +#: mathjax.php:37 msgid "" "The MathJax addon renders mathematical formulae written using the LaTeX " "syntax surrounded by the usual $$ or an eqnarray block in the postings of " "your wall,network tab and private mail." -msgstr "Doplněk MathJax vykresluje matematické vzorce zapsané s použitím syntaxe LaTeX označené obvyklými znaky $$, nebo blok \"eqnarray\" v příspěvcích na Vaší zdi, záložce Síť a soukromých zprávách." +msgstr "Rozšíření MathJax vykresluje matematické vzorce zapsané s použitím syntaxe LaTeX označené obvyklými znaky $$ nebo v bloku \"eqnarray\" v příspěvcích na vaší zdi, záložce síť a soukromých zprávách." -#: mathjax.php:43 +#: mathjax.php:38 msgid "Use the MathJax renderer" -msgstr "Použít vykreslování MathJax" +msgstr "Použít Mathjax vykreslování" + +#: mathjax.php:42 +msgid "Submit" +msgstr "Odeslat" + +#: mathjax.php:66 +msgid "Settings updated." +msgstr "Nastavení aktualizováno." + +#: mathjax.php:75 +msgid "MathJax Base URL" +msgstr "Základní MathJax adresa URL" + +#: mathjax.php:75 +msgid "" +"The URL for the javascript file that should be included to use MathJax. Can " +"be either the MathJax CDN or another installation of MathJax." +msgstr "URL adresa na javascriptový soubor, který musí být obsažen pro použití MathJax. Může to být MathJax CDN nebo or jiná instalace MathJax." diff --git a/mathjax/lang/cs/strings.php b/mathjax/lang/cs/strings.php index f73b931a..a591bb3c 100644 --- a/mathjax/lang/cs/strings.php +++ b/mathjax/lang/cs/strings.php @@ -3,7 +3,12 @@ if(! function_exists("string_plural_select_cs")) { function string_plural_select_cs($n){ $n = intval($n); - if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; } + if (($n==1)) { return 0; } else if (($n>=2 && $n<=4)) { return 1; } else { return 2; } }} -$a->strings['The MathJax addon renders mathematical formulae written using the LaTeX syntax surrounded by the usual $$ or an eqnarray block in the postings of your wall,network tab and private mail.'] = 'Doplněk MathJax vykresluje matematické vzorce zapsané s použitím syntaxe LaTeX označené obvyklými znaky $$, nebo blok "eqnarray" v příspěvcích na Vaší zdi, záložce Síť a soukromých zprávách.'; -$a->strings['Use the MathJax renderer'] = 'Použít vykreslování MathJax'; +$a->strings['Settings'] = 'Nastavení'; +$a->strings['The MathJax addon renders mathematical formulae written using the LaTeX syntax surrounded by the usual $$ or an eqnarray block in the postings of your wall,network tab and private mail.'] = 'Rozšíření MathJax vykresluje matematické vzorce zapsané s použitím syntaxe LaTeX označené obvyklými znaky $$ nebo v bloku "eqnarray" v příspěvcích na vaší zdi, záložce síť a soukromých zprávách.'; +$a->strings['Use the MathJax renderer'] = 'Použít Mathjax vykreslování'; +$a->strings['Submit'] = 'Odeslat'; +$a->strings['Settings updated.'] = 'Nastavení aktualizováno.'; +$a->strings['MathJax Base URL'] = 'Základní MathJax adresa URL'; +$a->strings['The URL for the javascript file that should be included to use MathJax. Can be either the MathJax CDN or another installation of MathJax.'] = 'URL adresa na javascriptový soubor, který musí být obsažen pro použití MathJax. Může to být MathJax CDN nebo or jiná instalace MathJax.'; diff --git a/mathjax/lang/de/messages.po b/mathjax/lang/de/messages.po index e60d9676..cbc9d2ca 100644 --- a/mathjax/lang/de/messages.po +++ b/mathjax/lang/de/messages.po @@ -13,9 +13,9 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 09:55+0000\n" -"Last-Translator: Tobias Diekershoff , 2021\n" -"Language-Team: German (http://app.transifex.com/Friendica/friendica/language/de/)\n" +"PO-Revision-Date: 2021-12-22 16:24+0000\n" +"Last-Translator: Transifex Bot <>\n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/mathjax/lang/eo/messages.po b/mathjax/lang/eo/messages.po deleted file mode 100644 index 74835a6a..00000000 --- a/mathjax/lang/eo/messages.po +++ /dev/null @@ -1,30 +0,0 @@ -# ADDON mathjax -# Copyright (C) -# This file is distributed under the same license as the Friendica mathjax addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 09:55+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: mathjax.php:42 -msgid "" -"The MathJax addon renders mathematical formulae written using the LaTeX " -"syntax surrounded by the usual $$ or an eqnarray block in the postings of " -"your wall,network tab and private mail." -msgstr "" - -#: mathjax.php:43 -msgid "Use the MathJax renderer" -msgstr "" diff --git a/mathjax/lang/eo/strings.php b/mathjax/lang/eo/strings.php index 68e8a64c..f0d88442 100644 --- a/mathjax/lang/eo/strings.php +++ b/mathjax/lang/eo/strings.php @@ -1,7 +1,9 @@ -strings["Settings"] = "Agordoj"; +$a->strings["The MathJax addon renders mathematical formulae written using the LaTeX syntax surrounded by the usual $$ or an eqnarray block in the postings of your wall,network tab and private mail."] = "La Mathjax kromprogramo bildigas matematikajn formulojn skribitajn en la LaTeX sintakso, cirkaŭigita de la komuna $$ aŭ eqnarray bloko en afiŝoj ĉe via muro, Reto folio kaj privataj mesaĝoj."; +$a->strings["Use the MathJax renderer"] = "Ĉu uzi la Mathjax bildigilo"; +$a->strings["Submit"] = "Sendi"; +$a->strings["Settings updated."] = "Agordoj ĝisdatigita."; +$a->strings["MathJax Base URL"] = "Mathjax Baza URL Adreso"; +$a->strings["The URL for the javascript file that should be included to use MathJax. Can be either the MathJax CDN or another installation of MathJax."] = "La URL adreso por la javascript dosiero kiu estas inkluzivigonta por uzi Mathjaz. Eblas esti aŭ la Mathjax CDN aŭ alia Mathjax instalo."; diff --git a/mathjax/lang/et/messages.po b/mathjax/lang/et/messages.po deleted file mode 100644 index d7af2521..00000000 --- a/mathjax/lang/et/messages.po +++ /dev/null @@ -1,31 +0,0 @@ -# ADDON mathjax -# Copyright (C) -# This file is distributed under the same license as the Friendica mathjax addon package. -# -# -# Translators: -# Rain Hawk, 2020 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 09:55+0000\n" -"Last-Translator: Rain Hawk, 2020\n" -"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: et\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: mathjax.php:42 -msgid "" -"The MathJax addon renders mathematical formulae written using the LaTeX " -"syntax surrounded by the usual $$ or an eqnarray block in the postings of " -"your wall,network tab and private mail." -msgstr "" - -#: mathjax.php:43 -msgid "Use the MathJax renderer" -msgstr "" diff --git a/mathjax/lang/et/strings.php b/mathjax/lang/et/strings.php deleted file mode 100644 index dfe78358..00000000 --- a/mathjax/lang/et/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gd\n" -"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" - -#: mathjax.php:42 -msgid "" -"The MathJax addon renders mathematical formulae written using the LaTeX " -"syntax surrounded by the usual $$ or an eqnarray block in the postings of " -"your wall,network tab and private mail." -msgstr "" - -#: mathjax.php:43 -msgid "Use the MathJax renderer" -msgstr "" diff --git a/mathjax/lang/gd/strings.php b/mathjax/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/mathjax/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/mathjax/lang/is/messages.po b/mathjax/lang/is/messages.po deleted file mode 100644 index e8e75052..00000000 --- a/mathjax/lang/is/messages.po +++ /dev/null @@ -1,30 +0,0 @@ -# ADDON mathjax -# Copyright (C) -# This file is distributed under the same license as the Friendica mathjax addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 09:55+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: is\n" -"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" - -#: mathjax.php:42 -msgid "" -"The MathJax addon renders mathematical formulae written using the LaTeX " -"syntax surrounded by the usual $$ or an eqnarray block in the postings of " -"your wall,network tab and private mail." -msgstr "" - -#: mathjax.php:43 -msgid "Use the MathJax renderer" -msgstr "" diff --git a/mathjax/lang/is/strings.php b/mathjax/lang/is/strings.php index 975c341e..a7263f30 100644 --- a/mathjax/lang/is/strings.php +++ b/mathjax/lang/is/strings.php @@ -1,7 +1,9 @@ -strings["Settings"] = "Stillingar"; +$a->strings["The MathJax addon renders mathematical formulae written using the LaTeX syntax surrounded by the usual $$ or an eqnarray block in the postings of your wall,network tab and private mail."] = ""; +$a->strings["Use the MathJax renderer"] = ""; +$a->strings["Submit"] = "Senda inn"; +$a->strings["Settings updated."] = "Stillingar uppfærðar"; +$a->strings["MathJax Base URL"] = ""; +$a->strings["The URL for the javascript file that should be included to use MathJax. Can be either the MathJax CDN or another installation of MathJax."] = ""; diff --git a/mathjax/lang/it/messages.po b/mathjax/lang/it/messages.po index 9aa6154f..eef9ca86 100644 --- a/mathjax/lang/it/messages.po +++ b/mathjax/lang/it/messages.po @@ -10,23 +10,27 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 09:55+0000\n" -"Last-Translator: Sylke Vicious , 2021\n" -"Language-Team: Italian (http://app.transifex.com/Friendica/friendica/language/it/)\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" +"PO-Revision-Date: 2021-02-16 12:51+0000\n" +"Last-Translator: Sylke Vicious \n" +"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: mathjax.php:42 +#: mathjax.php:43 msgid "" "The MathJax addon renders mathematical formulae written using the LaTeX " "syntax surrounded by the usual $$ or an eqnarray block in the postings of " "your wall,network tab and private mail." msgstr "Il plugin \"MatJax\" renderizza formule matematiche scritta usando la sintassi LaTeX circondate dalle usuali $$ o un blocco eqnarray nei messaggi della tua bacheca, pagina Rete e messaggi privati." -#: mathjax.php:43 +#: mathjax.php:44 msgid "Use the MathJax renderer" msgstr "Usa il render MathJax" + +#: mathjax.php:45 +msgid "Save Settings" +msgstr "Salva Impostazioni" diff --git a/mathjax/lang/it/strings.php b/mathjax/lang/it/strings.php index f5580a39..4ba4f721 100644 --- a/mathjax/lang/it/strings.php +++ b/mathjax/lang/it/strings.php @@ -3,7 +3,8 @@ if(! function_exists("string_plural_select_it")) { function string_plural_select_it($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} $a->strings['The MathJax addon renders mathematical formulae written using the LaTeX syntax surrounded by the usual $$ or an eqnarray block in the postings of your wall,network tab and private mail.'] = 'Il plugin "MatJax" renderizza formule matematiche scritta usando la sintassi LaTeX circondate dalle usuali $$ o un blocco eqnarray nei messaggi della tua bacheca, pagina Rete e messaggi privati.'; $a->strings['Use the MathJax renderer'] = 'Usa il render MathJax'; +$a->strings['Save Settings'] = 'Salva Impostazioni'; diff --git a/mathjax/lang/ru/messages.po b/mathjax/lang/ru/messages.po deleted file mode 100644 index 97b81e73..00000000 --- a/mathjax/lang/ru/messages.po +++ /dev/null @@ -1,30 +0,0 @@ -# ADDON mathjax -# Copyright (C) -# This file is distributed under the same license as the Friendica mathjax addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 09:55+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Russian (http://app.transifex.com/Friendica/friendica/language/ru/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" - -#: mathjax.php:42 -msgid "" -"The MathJax addon renders mathematical formulae written using the LaTeX " -"syntax surrounded by the usual $$ or an eqnarray block in the postings of " -"your wall,network tab and private mail." -msgstr "" - -#: mathjax.php:43 -msgid "Use the MathJax renderer" -msgstr "" diff --git a/mathjax/lang/ru/strings.php b/mathjax/lang/ru/strings.php index 0579fc21..f0c2f4a1 100644 --- a/mathjax/lang/ru/strings.php +++ b/mathjax/lang/ru/strings.php @@ -1,7 +1,9 @@ -=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; } -}} +strings["Settings"] = "Настройки"; +$a->strings["The MathJax addon renders mathematical formulae written using the LaTeX syntax surrounded by the usual $$ or an eqnarray block in the postings of your wall,network tab and private mail."] = ""; +$a->strings["Use the MathJax renderer"] = ""; +$a->strings["Submit"] = "Подтвердить"; +$a->strings["Settings updated."] = "Настройки обновлены."; +$a->strings["MathJax Base URL"] = ""; +$a->strings["The URL for the javascript file that should be included to use MathJax. Can be either the MathJax CDN or another installation of MathJax."] = ""; diff --git a/mathjax/mathjax.php b/mathjax/mathjax.php index e96aaddf..d0046cf7 100644 --- a/mathjax/mathjax.php +++ b/mathjax/mathjax.php @@ -8,6 +8,7 @@ * License: 3-clause BSD license */ +use Friendica\App; use Friendica\Core\Hook; use Friendica\Core\Renderer; use Friendica\DI; diff --git a/membersince/membersince.php b/membersince/membersince.php index df6388c6..f8128eb7 100644 --- a/membersince/membersince.php +++ b/membersince/membersince.php @@ -7,9 +7,9 @@ * Status: Unsupported */ +use Friendica\App; use Friendica\Core\Hook; use Friendica\DI; -use Friendica\Model\User; use Friendica\Util\DateTimeFormat; function membersince_install() @@ -17,25 +17,9 @@ function membersince_install() Hook::register('profile_advanced', 'addon/membersince/membersince.php', 'membersince_display'); } -/** - * @param array|string|null $b - * @return void - */ -function membersince_display(&$b) +function membersince_display(array &$b) { - $uid = DI::userSession()->getLocalUserId(); - - if ($uid === false) { - return; - } - - $user = User::getById($uid, ['register_date']); - - if ($user === false || !array_key_exists('register_date', $user)) { - return; - } - - if (DI::appHelper()->getCurrentTheme() == 'frio') { + if (DI::app()->getCurrentTheme() == 'frio') { // Works in Frio. $doc = new DOMDocument(); $doc->loadHTML(mb_convert_encoding($b, 'HTML-ENTITIES', 'UTF-8')); @@ -55,7 +39,7 @@ function membersince_display(&$b) $label->setAttribute('class', 'col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted'); // The div for the register date of the profile owner. - $entry = $doc->createElement('div', DateTimeFormat::local($user['register_date'])); + $entry = $doc->createElement('div', DateTimeFormat::local(DI::app()->profile['register_date'])); $entry->setAttribute('class', 'col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry'); $div->appendChild($hr); @@ -63,9 +47,9 @@ function membersince_display(&$b) $div->appendChild($entry); $elm->parentNode->insertBefore($div, $elm->nextSibling); - $b = (string) $doc->saveHTML(); + $b = $doc->saveHTML(); } else { // Works in Vier. - $b = preg_replace('/<\/dl>/', "\n\n\n
\n
" . DI::l10n()->t('Member since:') . "
\n
" . DateTimeFormat::local($user['register_date']) . "
\n
", $b, 1); + $b = preg_replace('/<\/dl>/', "\n\n\n
\n
" . DI::l10n()->t('Member since:') . "
\n
" . DateTimeFormat::local(DI::app()->profile['register_date']) . "
\n
", $b, 1); } } diff --git a/monolog/README.md b/monolog/README.md deleted file mode 100644 index efb7959a..00000000 --- a/monolog/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Monolog Addon - -A Logging framework with lots of additions (see [Monolog](https://github.com/Seldaek/monolog/)). -There are just Friendica additions inside the src directory. diff --git a/monolog/composer.json b/monolog/composer.json index 9cf42dbe..e2117166 100644 --- a/monolog/composer.json +++ b/monolog/composer.json @@ -1,26 +1,23 @@ { - "name": "friendica-addons/monolog", - "description": "Monolog can send your logs to files, sockets, inboxes, database, etc..", - "type": "friendica-addon", - "authors": [ - { - "name": "Philipp Holzer", - "email": "admin@philipp.info", - "homepage": "https://blog.philipp.info", - "role": "Developer" - } - ], - "require": { - "php": ">=7.3", - "monolog/monolog": "^2.9" - }, - "license": "3-clause BSD license", - "config": { - "platform": { - "php": "7.4" - }, - "optimize-autoloader": true, - "autoloader-suffix": "MonologAddon", - "preferred-install": "dist" - } + "name": "friendica-addons/monolog", + "description": "Monolog can send your logs to files, sockets, inboxes, database, etc..", + "type": "friendica-addon", + "authors": [ + { + "name": "Philipp Holzer", + "email": "admin@philipp.info", + "homepage": "https://blog.philipp.info", + "role": "Developer" + } + ], + "require": { + "php": ">=7.3", + "monolog/monolog": "^2.8" + }, + "license": "3-clause BSD license", + "config": { + "optimize-autoloader": true, + "autoloader-suffix": "MonologAddon", + "preferred-install": "dist" + } } diff --git a/monolog/composer.lock b/monolog/composer.lock index 5d1da32f..3f4b225a 100644 --- a/monolog/composer.lock +++ b/monolog/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "037f2db47e77c9af2960dde65ebafa8d", + "content-hash": "d360e9eb0b5580e44579a3780be74dec", "packages": [ { "name": "monolog/monolog", - "version": "2.9.2", + "version": "2.8.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f" + "reference": "720488632c590286b88b80e62aa3d3d551ad4a50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/437cb3628f4cf6042cc10ae97fc2b8472e48ca1f", - "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/720488632c590286b88b80e62aa3d3d551ad4a50", + "reference": "720488632c590286b88b80e62aa3d3d551ad4a50", "shasum": "" }, "require": { @@ -32,7 +32,7 @@ "doctrine/couchdb": "~1.0@dev", "elasticsearch/elasticsearch": "^7 || ^8", "ext-json": "*", - "graylog2/gelf-php": "^1.4.2 || ^2@dev", + "graylog2/gelf-php": "^1.4.2", "guzzlehttp/guzzle": "^7.4", "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", @@ -102,7 +102,7 @@ "type": "tidelift" } ], - "time": "2023-10-27T15:25:26+00:00" + "time": "2022-07-24T11:55:47+00:00" }, { "name": "psr/log", @@ -162,8 +162,5 @@ "php": ">=7.3" }, "platform-dev": [], - "platform-overrides": { - "php": "7.4" - }, "plugin-api-version": "1.1.0" } diff --git a/monolog/monolog.php b/monolog/monolog.php deleted file mode 100644 index f194aac4..00000000 --- a/monolog/monolog.php +++ /dev/null @@ -1,7 +0,0 @@ -. + * + */ + +namespace Friendica\Addon\monolog\src\Factory; + +use Friendica\Core\Hooks\Capabilities\IAmAStrategy; +use Friendica\Core\Logger\Capabilities\IHaveCallIntrospections; +use Friendica\Core\Logger\Exception\LoggerException; +use Monolog as MonologModel; +use Friendica\Addon\monolog\src\Monolog\IntrospectionProcessor; +use Friendica\Core\Config\Capability\IManageConfigValues; +use Psr\Log\LoggerInterface; +use Psr\Log\LogLevel; + +class Monolog implements IAmAStrategy +{ + /** @var IManageConfigValues */ + protected $config; + /** @var string */ + protected $channel = ''; + /** @var string */ + protected $loglevel = LogLevel::NOTICE; + /** @var IHaveCallIntrospections */ + protected $introspection; + + public function __construct(IManageConfigValues $config, IHaveCallIntrospections $introspection, string $channel = '', string $loglevel = LogLevel::NOTICE) + { + $this->config = $config; + $this->channel = $channel; + $this->loglevel = $loglevel; + $this->introspection = $introspection; + } + + public function create(): LoggerInterface + { + $loggerTimeZone = new \DateTimeZone('UTC'); + + $logger = new MonologModel\Logger($this->channel); + $logger->setTimezone($loggerTimeZone); + $logger->pushProcessor(new MonologModel\Processor\PsrLogMessageProcessor()); + $logger->pushProcessor(new MonologModel\Processor\ProcessIdProcessor()); + $logger->pushProcessor(new MonologModel\Processor\UidProcessor()); + $logger->pushProcessor(new IntrospectionProcessor($this->introspection, LogLevel::DEBUG)); + + $stream = $this->config->get('system', 'logfile'); + + // just add a stream in case it's either writable or not file + if (!is_file($stream) || is_writable($stream)) { + try { + $loglevel = MonologModel\Logger::toMonologLevel($this->loglevel); + + // fallback to notice if an invalid loglevel is set + if (!is_int($loglevel)) { + $loglevel = LogLevel::NOTICE; + } + + $fileHandler = new MonologModel\Handler\StreamHandler($stream, $loglevel); + + $formatter = new MonologModel\Formatter\LineFormatter("%datetime% %channel% [%level_name%]: %message% %context% %extra%\n"); + $fileHandler->setFormatter($formatter); + + $logger->pushHandler($fileHandler); + + return $logger; + } catch (\Throwable $e) { + throw new LoggerException('Cannot create Loger', $e); + } + } else { + throw new LoggerException(sprintf('Cannot write to file or stream %s', $stream)); + } + } +} diff --git a/monolog/src/Factory/MonologFactory.php b/monolog/src/Factory/MonologFactory.php deleted file mode 100644 index e0c11e13..00000000 --- a/monolog/src/Factory/MonologFactory.php +++ /dev/null @@ -1,72 +0,0 @@ -introspection = $introspection; - $this->config = $config; - } - - /** - * Creates and returns a PSR-3 Logger instance. - * - * Calling this method multiple times with the same parameters SHOULD return the same object. - * - * @param \Psr\Log\LogLevel::* $logLevel The log level - * @param \Friendica\Core\Logger\Capability\LogChannel::* $logChannel The log channel - */ - public function createLogger(string $logLevel, string $logChannel): LoggerInterface - { - $loggerTimeZone = new \DateTimeZone('UTC'); - - $logger = new Logger($logChannel); - $logger->setTimezone($loggerTimeZone); - $logger->pushProcessor(new PsrLogMessageProcessor()); - $logger->pushProcessor(new ProcessIdProcessor()); - $logger->pushProcessor(new UidProcessor()); - $logger->pushProcessor(new IntrospectionProcessor($this->introspection, LogLevel::DEBUG)); - - $logfile = $this->config->get('system', 'logfile'); - - // just add a stream in case it's either writable or not file - if (is_writable($logfile)) { - $logLevel = Logger::toMonologLevel($logLevel); - - // fallback to notice if an invalid loglevel is set - if (!is_int($logLevel)) { - $logLevel = LogLevel::NOTICE; - } - - $fileHandler = new StreamHandler($logfile, $logLevel); - - $formatter = new LineFormatter("%datetime% %channel% [%level_name%]: %message% %context% %extra%\n"); - $fileHandler->setFormatter($formatter); - - $logger->pushHandler($fileHandler); - } - - return $logger; - } -} diff --git a/monolog/src/Monolog/IntrospectionProcessor.php b/monolog/src/Monolog/IntrospectionProcessor.php index 2df0e21a..e06e9de1 100644 --- a/monolog/src/Monolog/IntrospectionProcessor.php +++ b/monolog/src/Monolog/IntrospectionProcessor.php @@ -41,7 +41,7 @@ class IntrospectionProcessor implements ProcessorInterface public function __construct(Introspection $introspection, $level = Logger::DEBUG) { $this->level = Logger::toMonologLevel($level); - $introspection->addClasses(['Monolog\\', static::class]); + $introspection->addClasses(['Monolog\\', IntrospectionProcessor::class]); $this->introspection = $introspection; } diff --git a/monolog/static/addon.config.php b/monolog/static/addon.config.php new file mode 100644 index 00000000..155bd60d --- /dev/null +++ b/monolog/static/addon.config.php @@ -0,0 +1,35 @@ +. + * + */ + +$ADDON = [ + 'name' => 'monolog', + 'description' => 'Monolog can send your logs to files, sockets, inboxes, database, etc..', + 'author' => [ + 'name' => 'Philipp Holzer', + 'email' => 'admin@philipp.info', + ], + 'maintainer' => [ + 'name' => 'Philipp Holzer', + 'email' => 'admin@philipp.info', + ], + 'version' => '1.0', + 'status' => 'supported', +]; diff --git a/monolog/static/dependencies.config.php b/monolog/static/dependencies.config.php index f992d69c..2da375f7 100644 --- a/monolog/static/dependencies.config.php +++ b/monolog/static/dependencies.config.php @@ -2,7 +2,7 @@ /** * @copyright Copyright (C) 2010-2023, the Friendica project * - * @license GNU AGPL version 3 or any later version + * @license GNU AGPL version 3 or any later version * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -19,9 +19,13 @@ * */ +use Dice\Dice; +use Friendica\Addon\monolog\src\Factory\Monolog; + return [ - \Friendica\Core\Logger\Factory\LoggerFactory::class => [ - 'instanceOf' => \Friendica\Addon\monolog\src\Factory\MonologFactory::class, - 'call' => null, + Monolog::class => [ + 'call' => [ + ['create', [], Dice::CHAIN_CALL], + ], ], ]; diff --git a/monolog/static/hooks.config.php b/monolog/static/hooks.config.php new file mode 100644 index 00000000..6ac7a3c2 --- /dev/null +++ b/monolog/static/hooks.config.php @@ -0,0 +1,32 @@ +. + * + */ + +use Friendica\Addon\monolog\src\Factory\Monolog; +use Friendica\Core\Addons\Capabilities\ILoadAddonHooks; +use Psr\Log\LoggerInterface; + +return [ + ILoadAddonHooks::ADDON_HOOK_STRATEGIES => [ + LoggerInterface::class => [ + 'monolog' => [Monolog::class, []], + ], + ], +]; diff --git a/monolog/tests/MonologTest.php b/monolog/tests/MonologTest.php new file mode 100644 index 00000000..69e2ebec --- /dev/null +++ b/monolog/tests/MonologTest.php @@ -0,0 +1,81 @@ +setUpVfsDir(); + } + + protected function getContent() + { + return $this->logfile->getContent(); + } + + protected function getInstance($level = LogLevel::DEBUG) + { + $this->logfile = vfsStream::newFile('friendica.log') + ->at($this->root); + + $this->config->shouldReceive('get')->with('system', 'logfile')->andReturn($this->logfile->url())->once(); + $this->introspection->shouldReceive('addClasses')->with(['Monolog\\']); + + $loggerFactory = new Monolog($this->config, $this->introspection, 'test', $level); + return $loggerFactory->create(); + } + + /** + * Test if a log entry is correctly interpolated + * + * @note - override the base class, because Monolog adds an "array" prefix to the PsrInterpolate when using arrays + */ + public function testPsrInterpolate() + { + $logger = $this->getInstance(); + + $logger->emergency('A {psr} test', ['psr' => 'working']); + $logger->alert('An {array} test', ['array' => ['it', 'is', 'working']]); + $text = $this->getContent(); + self::assertStringContainsString('A working test', $text); + self::assertStringContainsString('An array["it","is","working"] test', $text); + } + + /** + * Test a message with an exception + * + * @note - override the base class, because Monolog has an own formatter logic for printing exceptions + */ + public function testExceptionHandling() + { + $e = new \Exception("Test String", 123); + $eFollowUp = new \Exception("FollowUp", 456, $e); + + $assertion = '[object] (Exception(code: 456)'; + + $logger = $this->getInstance(); + $logger->alert('test', ['e' => $eFollowUp]); + $text = $this->getContent(); + + self::assertLogline($text); + + self::assertStringContainsString($assertion, $this->getContent()); + } +} diff --git a/monolog/vendor/composer/autoload_classmap.php b/monolog/vendor/composer/autoload_classmap.php index c12d7340..3c89f22c 100644 --- a/monolog/vendor/composer/autoload_classmap.php +++ b/monolog/vendor/composer/autoload_classmap.php @@ -121,4 +121,15 @@ return array( 'Monolog\\SignalHandler' => $vendorDir . '/monolog/monolog/src/Monolog/SignalHandler.php', 'Monolog\\Test\\TestCase' => $vendorDir . '/monolog/monolog/src/Monolog/Test/TestCase.php', 'Monolog\\Utils' => $vendorDir . '/monolog/monolog/src/Monolog/Utils.php', + 'Psr\\Log\\AbstractLogger' => $vendorDir . '/psr/log/Psr/Log/AbstractLogger.php', + 'Psr\\Log\\InvalidArgumentException' => $vendorDir . '/psr/log/Psr/Log/InvalidArgumentException.php', + 'Psr\\Log\\LogLevel' => $vendorDir . '/psr/log/Psr/Log/LogLevel.php', + 'Psr\\Log\\LoggerAwareInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerAwareInterface.php', + 'Psr\\Log\\LoggerAwareTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerAwareTrait.php', + 'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php', + 'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php', + 'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php', + 'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/DummyTest.php', + 'Psr\\Log\\Test\\LoggerInterfaceTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php', + 'Psr\\Log\\Test\\TestLogger' => $vendorDir . '/psr/log/Psr/Log/Test/TestLogger.php', ); diff --git a/monolog/vendor/composer/autoload_static.php b/monolog/vendor/composer/autoload_static.php index a44984ec..95ed9e75 100644 --- a/monolog/vendor/composer/autoload_static.php +++ b/monolog/vendor/composer/autoload_static.php @@ -144,6 +144,17 @@ class ComposerStaticInitMonologAddon 'Monolog\\SignalHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/SignalHandler.php', 'Monolog\\Test\\TestCase' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Test/TestCase.php', 'Monolog\\Utils' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Utils.php', + 'Psr\\Log\\AbstractLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/AbstractLogger.php', + 'Psr\\Log\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/log/Psr/Log/InvalidArgumentException.php', + 'Psr\\Log\\LogLevel' => __DIR__ . '/..' . '/psr/log/Psr/Log/LogLevel.php', + 'Psr\\Log\\LoggerAwareInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerAwareInterface.php', + 'Psr\\Log\\LoggerAwareTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerAwareTrait.php', + 'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerInterface.php', + 'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerTrait.php', + 'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/NullLogger.php', + 'Psr\\Log\\Test\\DummyTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/DummyTest.php', + 'Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php', + 'Psr\\Log\\Test\\TestLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/TestLogger.php', ); public static function getInitializer(ClassLoader $loader) diff --git a/monolog/vendor/composer/installed.json b/monolog/vendor/composer/installed.json index 2b129417..88238fe7 100644 --- a/monolog/vendor/composer/installed.json +++ b/monolog/vendor/composer/installed.json @@ -1,17 +1,17 @@ [ { "name": "monolog/monolog", - "version": "2.9.2", - "version_normalized": "2.9.2.0", + "version": "2.8.0", + "version_normalized": "2.8.0.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f" + "reference": "720488632c590286b88b80e62aa3d3d551ad4a50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/437cb3628f4cf6042cc10ae97fc2b8472e48ca1f", - "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/720488632c590286b88b80e62aa3d3d551ad4a50", + "reference": "720488632c590286b88b80e62aa3d3d551ad4a50", "shasum": "" }, "require": { @@ -26,7 +26,7 @@ "doctrine/couchdb": "~1.0@dev", "elasticsearch/elasticsearch": "^7 || ^8", "ext-json": "*", - "graylog2/gelf-php": "^1.4.2 || ^2@dev", + "graylog2/gelf-php": "^1.4.2", "guzzlehttp/guzzle": "^7.4", "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", @@ -57,7 +57,7 @@ "rollbar/rollbar": "Allow sending log messages to Rollbar", "ruflin/elastica": "Allow sending log messages to an Elastic Search server" }, - "time": "2023-10-27T15:25:26+00:00", + "time": "2022-07-24T11:55:47+00:00", "type": "library", "extra": { "branch-alias": { diff --git a/monolog/vendor/monolog/monolog/CHANGELOG.md b/monolog/vendor/monolog/monolog/CHANGELOG.md index aca1bdd0..7f9db2b0 100644 --- a/monolog/vendor/monolog/monolog/CHANGELOG.md +++ b/monolog/vendor/monolog/monolog/CHANGELOG.md @@ -1,24 +1,3 @@ -### 2.9.2 (2023-10-27) - - * Fixed display_errors parsing in ErrorHandler which did not support string values (#1804) - * Fixed bug where the previous error handler would not be restored in some cases where StreamHandler fails (#1815) - * Fixed normalization error when normalizing incomplete classes (#1833) - -### 2.9.1 (2023-02-06) - - * Fixed Logger not being serializable anymore (#1792) - -### 2.9.0 (2023-02-05) - - * Deprecated FlowdockHandler & Formatter as the flowdock service was shutdown (#1748) - * Added support for enum context values in PsrLogMessageProcessor (#1773) - * Added graylog2/gelf-php 2.x support (#1747) - * Improved `BrowserConsoleHandler` logging to use more appropriate methods than just console.log in the browser (#1739) - * Fixed `WhatFailureGroupHandler` not catching errors happening inside `close()` (#1791) - * Fixed datetime field in `GoogleCloudLoggingFormatter` (#1758) - * Fixed infinite loop detection within Fibers (#1753) - * Fixed `AmqpHandler->setExtraAttributes` not working with buffering handler wrappers (#1781) - ### 2.8.0 (2022-07-24) * Deprecated `CubeHandler` and `PHPConsoleHandler` as both projects are abandoned and those should not be used anymore (#1734) diff --git a/monolog/vendor/monolog/monolog/UPGRADE.md b/monolog/vendor/monolog/monolog/UPGRADE.md deleted file mode 100644 index 84e15e6b..00000000 --- a/monolog/vendor/monolog/monolog/UPGRADE.md +++ /dev/null @@ -1,72 +0,0 @@ -### 2.0.0 - -- `Monolog\Logger::API` can be used to distinguish between a Monolog `1` and `2` - install of Monolog when writing integration code. - -- Removed non-PSR-3 methods to add records, all the `add*` (e.g. `addWarning`) - methods as well as `emerg`, `crit`, `err` and `warn`. - -- DateTime are now formatted with a timezone and microseconds (unless disabled). - Various formatters and log output might be affected, which may mess with log parsing - in some cases. - -- The `datetime` in every record array is now a DateTimeImmutable, not that you - should have been modifying these anyway. - -- The timezone is now set per Logger instance and not statically, either - via ->setTimezone or passed in the constructor. Calls to Logger::setTimezone - should be converted. - -- `HandlerInterface` has been split off and two new interfaces now exist for - more granular controls: `ProcessableHandlerInterface` and - `FormattableHandlerInterface`. Handlers not extending `AbstractHandler` - should make sure to implement the relevant interfaces. - -- `HandlerInterface` now requires the `close` method to be implemented. This - only impacts you if you implement the interface yourself, but you can extend - the new `Monolog\Handler\Handler` base class too. - -- There is no more default handler configured on empty Logger instances, if - you were relying on that you will not get any output anymore, make sure to - configure the handler you need. - -#### LogglyFormatter - -- The records' `datetime` is not sent anymore. Only `timestamp` is sent to Loggly. - -#### AmqpHandler - -- Log levels are not shortened to 4 characters anymore. e.g. a warning record - will be sent using the `warning.channel` routing key instead of `warn.channel` - as in 1.x. -- The exchange name does not default to 'log' anymore, and it is completely ignored - now for the AMQP extension users. Only PHPAmqpLib uses it if provided. - -#### RotatingFileHandler - -- The file name format must now contain `{date}` and the date format must be set - to one of the predefined FILE_PER_* constants to avoid issues with file rotation. - See `setFilenameFormat`. - -#### LogstashFormatter - -- Removed Logstash V0 support -- Context/extra prefix has been removed in favor of letting users configure the exact key being sent -- Context/extra data are now sent as an object instead of single keys - -#### HipChatHandler - -- Removed deprecated HipChat handler, migrate to Slack and use SlackWebhookHandler or SlackHandler instead - -#### SlackbotHandler - -- Removed deprecated SlackbotHandler handler, use SlackWebhookHandler or SlackHandler instead - -#### RavenHandler - -- Removed deprecated RavenHandler handler, use sentry/sentry 2.x and their Sentry\Monolog\Handler instead - -#### ElasticSearchHandler - -- As support for the official Elasticsearch library was added, the former ElasticSearchHandler has been - renamed to ElasticaHandler and the new one added as ElasticsearchHandler. diff --git a/monolog/vendor/monolog/monolog/composer.json b/monolog/vendor/monolog/monolog/composer.json index b9437d6d..ab775ad6 100644 --- a/monolog/vendor/monolog/monolog/composer.json +++ b/monolog/vendor/monolog/monolog/composer.json @@ -21,7 +21,7 @@ "aws/aws-sdk-php": "^2.4.9 || ^3.0", "doctrine/couchdb": "~1.0@dev", "elasticsearch/elasticsearch": "^7 || ^8", - "graylog2/gelf-php": "^1.4.2 || ^2@dev", + "graylog2/gelf-php": "^1.4.2", "guzzlehttp/guzzle": "^7.4", "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", diff --git a/monolog/vendor/monolog/monolog/src/Monolog/ErrorHandler.php b/monolog/vendor/monolog/monolog/src/Monolog/ErrorHandler.php index 1406d34e..576f1713 100644 --- a/monolog/vendor/monolog/monolog/src/Monolog/ErrorHandler.php +++ b/monolog/vendor/monolog/monolog/src/Monolog/ErrorHandler.php @@ -198,7 +198,7 @@ class ErrorHandler ($this->previousExceptionHandler)($e); } - if (!headers_sent() && in_array(strtolower((string) ini_get('display_errors')), ['0', '', 'false', 'off', 'none', 'no'], true)) { + if (!headers_sent() && !ini_get('display_errors')) { http_response_code(500); } diff --git a/monolog/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php b/monolog/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php index 867ae586..41b56b3c 100644 --- a/monolog/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php +++ b/monolog/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php @@ -15,7 +15,6 @@ namespace Monolog\Formatter; * formats the record to be used in the FlowdockHandler * * @author Dominik Liebler - * @deprecated Since 2.9.0 and 3.3.0, Flowdock was shutdown we will thus drop this handler in Monolog 4 */ class FlowdockFormatter implements FormatterInterface { diff --git a/monolog/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php b/monolog/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php index 3b3e1e7f..a1a79372 100644 --- a/monolog/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php +++ b/monolog/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php @@ -47,11 +47,6 @@ class GelfMessageFormatter extends NormalizerFormatter */ protected $maxLength; - /** - * @var int - */ - private $gelfVersion = 2; - /** * Translates Monolog log levels to Graylog2 log priorities. * @@ -83,10 +78,6 @@ class GelfMessageFormatter extends NormalizerFormatter $this->extraPrefix = is_null($extraPrefix) ? '' : $extraPrefix; $this->contextPrefix = $contextPrefix; $this->maxLength = is_null($maxLength) ? self::DEFAULT_MAX_LENGTH : $maxLength; - - if (method_exists(Message::class, 'setFacility')) { - $this->gelfVersion = 1; - } } /** @@ -122,20 +113,16 @@ class GelfMessageFormatter extends NormalizerFormatter $message->setShortMessage(Utils::substr($record['message'], 0, $this->maxLength)); } - if ($this->gelfVersion === 1) { - if (isset($record['channel'])) { - $message->setFacility($record['channel']); - } - if (isset($extra['line'])) { - $message->setLine($extra['line']); - unset($extra['line']); - } - if (isset($extra['file'])) { - $message->setFile($extra['file']); - unset($extra['file']); - } - } else { - $message->setAdditional('facility', $record['channel']); + if (isset($record['channel'])) { + $message->setFacility($record['channel']); + } + if (isset($extra['line'])) { + $message->setLine($extra['line']); + unset($extra['line']); + } + if (isset($extra['file'])) { + $message->setFile($extra['file']); + unset($extra['file']); } foreach ($extra as $key => $val) { @@ -160,13 +147,11 @@ class GelfMessageFormatter extends NormalizerFormatter $message->setAdditional($this->contextPrefix . $key, $val); } - if ($this->gelfVersion === 1) { - /** @phpstan-ignore-next-line */ - if (null === $message->getFile() && isset($context['exception']['file'])) { - if (preg_match("/^(.+):([0-9]+)$/", $context['exception']['file'], $matches)) { - $message->setFile($matches[1]); - $message->setLine($matches[2]); - } + /** @phpstan-ignore-next-line */ + if (null === $message->getFile() && isset($context['exception']['file'])) { + if (preg_match("/^(.+):([0-9]+)$/", $context['exception']['file'], $matches)) { + $message->setFile($matches[1]); + $message->setLine($matches[2]); } } diff --git a/monolog/vendor/monolog/monolog/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php b/monolog/vendor/monolog/monolog/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php index ca52ebf4..0cd287f5 100644 --- a/monolog/vendor/monolog/monolog/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php +++ b/monolog/vendor/monolog/monolog/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php @@ -17,7 +17,6 @@ use Monolog\LogRecord; /** * Encodes message information into JSON in a format compatible with Cloud logging. * - * @see https://cloud.google.com/logging/docs/structured-logging * @see https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry * * @author Luís Cobucci @@ -29,7 +28,7 @@ final class GoogleCloudLoggingFormatter extends JsonFormatter { // Re-key level for GCP logging $record['severity'] = $record['level_name']; - $record['time'] = $record['datetime']->format(DateTimeInterface::RFC3339_EXTENDED); + $record['timestamp'] = $record['datetime']->format(DateTimeInterface::RFC3339_EXTENDED); // Remove keys that are not used by GCP unset($record['level'], $record['level_name'], $record['datetime']); diff --git a/monolog/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php b/monolog/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php index e6e78983..b31b2971 100644 --- a/monolog/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php +++ b/monolog/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php @@ -155,7 +155,7 @@ class LineFormatter extends NormalizerFormatter do { $depth++; if ($depth > $this->maxNormalizeDepth) { - $str .= "\n[previous exception] Over " . $this->maxNormalizeDepth . ' levels deep, aborting normalization'; + $str .= '\n[previous exception] Over ' . $this->maxNormalizeDepth . ' levels deep, aborting normalization'; break; } diff --git a/monolog/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php b/monolog/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php index f926a842..5441bc0a 100644 --- a/monolog/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php +++ b/monolog/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php @@ -174,9 +174,6 @@ class NormalizerFormatter implements FormatterInterface if ($data instanceof \JsonSerializable) { /** @var null|scalar|array $value */ $value = $data->jsonSerialize(); - } elseif (\get_class($data) === '__PHP_Incomplete_Class') { - $accessor = new \ArrayObject($data); - $value = (string) $accessor['__PHP_Incomplete_Class_Name']; } elseif (method_exists($data, '__toString')) { /** @var string $value */ $value = $data->__toString(); diff --git a/monolog/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php b/monolog/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php index 994872ce..c4997482 100644 --- a/monolog/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php +++ b/monolog/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php @@ -151,14 +151,13 @@ class AmqpHandler extends AbstractProcessingHandler private function createAmqpMessage(string $data): AMQPMessage { - $attributes = [ - 'delivery_mode' => 2, - 'content_type' => 'application/json', - ]; - if ($this->extraAttributes) { - $attributes = array_merge($attributes, $this->extraAttributes); - } - return new AMQPMessage($data, $attributes); + return new AMQPMessage( + $data, + [ + 'delivery_mode' => 2, + 'content_type' => 'application/json', + ] + ); } /** diff --git a/monolog/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php b/monolog/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php index 95bbfed4..fa383f1c 100644 --- a/monolog/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php +++ b/monolog/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php @@ -14,7 +14,6 @@ namespace Monolog\Handler; use Monolog\Formatter\FormatterInterface; use Monolog\Formatter\LineFormatter; use Monolog\Utils; -use Monolog\Logger; use function count; use function headers_list; @@ -178,7 +177,7 @@ class BrowserConsoleHandler extends AbstractProcessingHandler $extra = static::dump('Extra', $record['extra']); if (empty($context) && empty($extra)) { - $script[] = static::call_array(static::getConsoleMethodForLevel($record['level']), static::handleStyles($record['formatted'])); + $script[] = static::call_array('log', static::handleStyles($record['formatted'])); } else { $script = array_merge( $script, @@ -193,20 +192,6 @@ class BrowserConsoleHandler extends AbstractProcessingHandler return "(function (c) {if (c && c.groupCollapsed) {\n" . implode("\n", $script) . "\n}})(console);"; } - private static function getConsoleMethodForLevel(int $level): string - { - return [ - Logger::DEBUG => 'debug', - Logger::INFO => 'info', - Logger::NOTICE => 'info', - Logger::WARNING => 'warn', - Logger::ERROR => 'error', - Logger::CRITICAL => 'error', - Logger::ALERT => 'error', - Logger::EMERGENCY => 'error', - ][$level] ?? 'log'; - } - /** * @return string[] */ diff --git a/monolog/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php b/monolog/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php index 5715d580..b837bdb6 100644 --- a/monolog/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php +++ b/monolog/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php @@ -28,7 +28,6 @@ use Monolog\Formatter\FormatterInterface; * @see https://www.flowdock.com/api/push * * @phpstan-import-type FormattedRecord from AbstractProcessingHandler - * @deprecated Since 2.9.0 and 3.3.0, Flowdock was shutdown we will thus drop this handler in Monolog 4 */ class FlowdockHandler extends SocketHandler { diff --git a/monolog/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php b/monolog/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php index 82c048e1..65183512 100644 --- a/monolog/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php +++ b/monolog/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php @@ -135,14 +135,11 @@ class StreamHandler extends AbstractProcessingHandler $this->createDir($url); $this->errorMessage = null; set_error_handler([$this, 'customErrorHandler']); - try { - $stream = fopen($url, 'a'); - if ($this->filePermission !== null) { - @chmod($url, $this->filePermission); - } - } finally { - restore_error_handler(); + $stream = fopen($url, 'a'); + if ($this->filePermission !== null) { + @chmod($url, $this->filePermission); } + restore_error_handler(); if (!is_resource($stream)) { $this->stream = null; diff --git a/monolog/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php b/monolog/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php deleted file mode 100644 index fae92514..00000000 --- a/monolog/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; -use Swift_Message; -use Swift; - -/** - * SwiftMailerHandler uses Swift_Mailer to send the emails - * - * @author Gyula Sallai - * - * @phpstan-import-type Record from \Monolog\Logger - * @deprecated Since Monolog 2.6. Use SymfonyMailerHandler instead. - */ -class SwiftMailerHandler extends MailHandler -{ - /** @var \Swift_Mailer */ - protected $mailer; - /** @var Swift_Message|callable(string, Record[]): Swift_Message */ - private $messageTemplate; - - /** - * @psalm-param Swift_Message|callable(string, Record[]): Swift_Message $message - * - * @param \Swift_Mailer $mailer The mailer to use - * @param callable|Swift_Message $message An example message for real messages, only the body will be replaced - */ - public function __construct(\Swift_Mailer $mailer, $message, $level = Logger::ERROR, bool $bubble = true) - { - parent::__construct($level, $bubble); - - @trigger_error('The SwiftMailerHandler is deprecated since Monolog 2.6. Use SymfonyMailerHandler instead.', E_USER_DEPRECATED); - - $this->mailer = $mailer; - $this->messageTemplate = $message; - } - - /** - * {@inheritDoc} - */ - protected function send(string $content, array $records): void - { - $this->mailer->send($this->buildMessage($content, $records)); - } - - /** - * Gets the formatter for the Swift_Message subject. - * - * @param string|null $format The format of the subject - */ - protected function getSubjectFormatter(?string $format): FormatterInterface - { - return new LineFormatter($format); - } - - /** - * Creates instance of Swift_Message to be sent - * - * @param string $content formatted email body to be sent - * @param array $records Log records that formed the content - * @return Swift_Message - * - * @phpstan-param Record[] $records - */ - protected function buildMessage(string $content, array $records): Swift_Message - { - $message = null; - if ($this->messageTemplate instanceof Swift_Message) { - $message = clone $this->messageTemplate; - $message->generateId(); - } elseif (is_callable($this->messageTemplate)) { - $message = ($this->messageTemplate)($content, $records); - } - - if (!$message instanceof Swift_Message) { - $record = reset($records); - throw new \InvalidArgumentException('Could not resolve message as instance of Swift_Message or a callable returning it' . ($record ? Utils::getRecordMessageForException($record) : '')); - } - - if ($records) { - $subjectFormatter = $this->getSubjectFormatter($message->getSubject()); - $message->setSubject($subjectFormatter->format($this->getHighestRecord($records))); - } - - $mime = 'text/plain'; - if ($this->isHtmlBody($content)) { - $mime = 'text/html'; - } - - $message->setBody($content, $mime); - /** @phpstan-ignore-next-line */ - if (version_compare(Swift::VERSION, '6.0.0', '>=')) { - $message->setDate(new \DateTimeImmutable()); - } else { - /** @phpstan-ignore-next-line */ - $message->setDate(time()); - } - - return $message; - } -} diff --git a/monolog/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php b/monolog/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php index b6d3d3b1..2dd13672 100644 --- a/monolog/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php +++ b/monolog/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php @@ -64,18 +64,4 @@ class WhatFailureGroupHandler extends GroupHandler } } } - - /** - * {@inheritDoc} - */ - public function close(): void - { - foreach ($this->handlers as $handler) { - try { - $handler->close(); - } catch (\Throwable $e) { - // What failure? - } - } - } } diff --git a/monolog/vendor/monolog/monolog/src/Monolog/Logger.php b/monolog/vendor/monolog/monolog/src/Monolog/Logger.php index 84a2f551..1ab75b9e 100644 --- a/monolog/vendor/monolog/monolog/src/Monolog/Logger.php +++ b/monolog/vendor/monolog/monolog/src/Monolog/Logger.php @@ -168,11 +168,6 @@ class Logger implements LoggerInterface, ResettableInterface */ private $logDepth = 0; - /** - * @var \WeakMap<\Fiber, int>|null Keeps track of depth inside fibers to prevent infinite logging loops - */ - private $fiberLogDepth; - /** * @var bool Whether to detect infinite logging loops * @@ -194,13 +189,6 @@ class Logger implements LoggerInterface, ResettableInterface $this->setHandlers($handlers); $this->processors = $processors; $this->timezone = $timezone ?: new DateTimeZone(date_default_timezone_get() ?: 'UTC'); - - if (\PHP_VERSION_ID >= 80100) { - // Local variable for phpstan, see https://github.com/phpstan/phpstan/issues/6732#issuecomment-1111118412 - /** @var \WeakMap<\Fiber, int> $fiberLogDepth */ - $fiberLogDepth = new \WeakMap(); - $this->fiberLogDepth = $fiberLogDepth; - } } public function getName(): string @@ -344,20 +332,12 @@ class Logger implements LoggerInterface, ResettableInterface } if ($this->detectCycles) { - if (\PHP_VERSION_ID >= 80100 && $fiber = \Fiber::getCurrent()) { - $this->fiberLogDepth[$fiber] = $this->fiberLogDepth[$fiber] ?? 0; - $logDepth = ++$this->fiberLogDepth[$fiber]; - } else { - $logDepth = ++$this->logDepth; - } - } else { - $logDepth = 0; + $this->logDepth += 1; } - - if ($logDepth === 3) { + if ($this->logDepth === 3) { $this->warning('A possible infinite logging loop was detected and aborted. It appears some of your handler code is triggering logging, see the previous log record for a hint as to what may be the cause.'); return false; - } elseif ($logDepth >= 5) { // log depth 4 is let through, so we can log the warning above + } elseif ($this->logDepth >= 5) { // log depth 4 is let through so we can log the warning above return false; } @@ -407,11 +387,7 @@ class Logger implements LoggerInterface, ResettableInterface } } finally { if ($this->detectCycles) { - if (isset($fiber)) { - $this->fiberLogDepth[$fiber]--; - } else { - $this->logDepth--; - } + $this->logDepth--; } } @@ -722,40 +698,4 @@ class Logger implements LoggerInterface, ResettableInterface ($this->exceptionHandler)($e, $record); } - - /** - * @return array - */ - public function __serialize(): array - { - return [ - 'name' => $this->name, - 'handlers' => $this->handlers, - 'processors' => $this->processors, - 'microsecondTimestamps' => $this->microsecondTimestamps, - 'timezone' => $this->timezone, - 'exceptionHandler' => $this->exceptionHandler, - 'logDepth' => $this->logDepth, - 'detectCycles' => $this->detectCycles, - ]; - } - - /** - * @param array $data - */ - public function __unserialize(array $data): void - { - foreach (['name', 'handlers', 'processors', 'microsecondTimestamps', 'timezone', 'exceptionHandler', 'logDepth', 'detectCycles'] as $property) { - if (isset($data[$property])) { - $this->$property = $data[$property]; - } - } - - if (\PHP_VERSION_ID >= 80100) { - // Local variable for phpstan, see https://github.com/phpstan/phpstan/issues/6732#issuecomment-1111118412 - /** @var \WeakMap<\Fiber, int> $fiberLogDepth */ - $fiberLogDepth = new \WeakMap(); - $this->fiberLogDepth = $fiberLogDepth; - } - } } diff --git a/monolog/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php b/monolog/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php index e7c12176..2c2a00e7 100644 --- a/monolog/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php +++ b/monolog/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php @@ -66,8 +66,6 @@ class PsrLogMessageProcessor implements ProcessorInterface } else { $replacements[$placeholder] = $val->format($this->dateFormat ?: static::SIMPLE_DATE); } - } elseif ($val instanceof \UnitEnum) { - $replacements[$placeholder] = $val instanceof \BackedEnum ? $val->value : $val->name; } elseif (is_object($val)) { $replacements[$placeholder] = '[object '.Utils::getClass($val).']'; } elseif (is_array($val)) { diff --git a/morechoice/morechoice.php b/morechoice/morechoice.php index fbb88ce1..fe726d27 100644 --- a/morechoice/morechoice.php +++ b/morechoice/morechoice.php @@ -8,6 +8,7 @@ * Status: Deprecated */ +use Friendica\App; use Friendica\Core\Hook; use Friendica\DI; diff --git a/morepokes/morepokes.php b/morepokes/morepokes.php index 2ac09a73..abe59a6e 100644 --- a/morepokes/morepokes.php +++ b/morepokes/morepokes.php @@ -7,6 +7,7 @@ * */ +use Friendica\App; use Friendica\Core\Hook; use Friendica\DI; diff --git a/newmemberwidget/README.md b/newmemberwidget/README.md index e467708e..39522238 100644 --- a/newmemberwidget/README.md +++ b/newmemberwidget/README.md @@ -5,8 +5,8 @@ With this addon you can enable a widget for the sidebar of the network tab, which will be displayed for new members. It contains a linkt to friendicas introduction pages at /newmember and optionally - * a link to the global support group - * a link to an eventually existing local support group + * a link to the global support forum + * a link to an eventually existing local support forum * a welcome message you might want to send to your new members. There is no extra styling added for this added, so it should work with any diff --git a/newmemberwidget/lang/C/messages.po b/newmemberwidget/lang/C/messages.po index 0dc91e13..1e7d608a 100644 --- a/newmemberwidget/lang/C/messages.po +++ b/newmemberwidget/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:50-0400\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -26,48 +26,48 @@ msgid "Tips for New Members" msgstr "" #: newmemberwidget.php:33 -msgid "Global Support Group" +msgid "Global Support Forum" msgstr "" #: newmemberwidget.php:37 -msgid "Local Support Group" +msgid "Local Support Forum" msgstr "" -#: newmemberwidget.php:62 +#: newmemberwidget.php:65 msgid "Save Settings" msgstr "" -#: newmemberwidget.php:63 +#: newmemberwidget.php:66 msgid "Message" msgstr "" -#: newmemberwidget.php:63 +#: newmemberwidget.php:66 msgid "Your message for new members. You can use bbcode here." msgstr "" -#: newmemberwidget.php:64 -msgid "Add a link to global support group" +#: newmemberwidget.php:67 +msgid "Add a link to global support forum" msgstr "" -#: newmemberwidget.php:64 -msgid "Should a link to the global support group be displayed?" +#: newmemberwidget.php:67 +msgid "Should a link to the global support forum be displayed?" msgstr "" -#: newmemberwidget.php:65 -msgid "Add a link to the local support group" +#: newmemberwidget.php:68 +msgid "Add a link to the local support forum" msgstr "" -#: newmemberwidget.php:65 +#: newmemberwidget.php:68 msgid "" -"If you have a local support group and want to have a link displayed in the " +"If you have a local support forum and want to have a link displayed in the " "widget, check this box." msgstr "" -#: newmemberwidget.php:66 +#: newmemberwidget.php:69 msgid "Name of the local support group" msgstr "" -#: newmemberwidget.php:66 +#: newmemberwidget.php:69 msgid "" "If you checked the above, specify the nickname of the local support " "group here (i.e. helpers)" diff --git a/newmemberwidget/lang/bg/messages.po b/newmemberwidget/lang/bg/messages.po deleted file mode 100644 index 40cc435e..00000000 --- a/newmemberwidget/lang/bg/messages.po +++ /dev/null @@ -1,75 +0,0 @@ -# ADDON newmemberwidget -# Copyright (C) -# This file is distributed under the same license as the Friendica newmemberwidget addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:50-0400\n" -"PO-Revision-Date: 2014-06-23 10:26+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: newmemberwidget.php:29 -msgid "New Member" -msgstr "" - -#: newmemberwidget.php:30 -msgid "Tips for New Members" -msgstr "" - -#: newmemberwidget.php:33 -msgid "Global Support Group" -msgstr "" - -#: newmemberwidget.php:37 -msgid "Local Support Group" -msgstr "" - -#: newmemberwidget.php:62 -msgid "Save Settings" -msgstr "" - -#: newmemberwidget.php:63 -msgid "Message" -msgstr "" - -#: newmemberwidget.php:63 -msgid "Your message for new members. You can use bbcode here." -msgstr "" - -#: newmemberwidget.php:64 -msgid "Add a link to global support group" -msgstr "" - -#: newmemberwidget.php:64 -msgid "Should a link to the global support group be displayed?" -msgstr "" - -#: newmemberwidget.php:65 -msgid "Add a link to the local support group" -msgstr "" - -#: newmemberwidget.php:65 -msgid "" -"If you have a local support group and want to have a link displayed in the " -"widget, check this box." -msgstr "" - -#: newmemberwidget.php:66 -msgid "Name of the local support group" -msgstr "" - -#: newmemberwidget.php:66 -msgid "" -"If you checked the above, specify the nickname of the local support" -" group here (i.e. helpers)" -msgstr "" diff --git a/newmemberwidget/lang/bg/strings.php b/newmemberwidget/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/newmemberwidget/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: newmemberwidget.php:29 -msgid "New Member" -msgstr "" - -#: newmemberwidget.php:30 -msgid "Tips for New Members" -msgstr "" - -#: newmemberwidget.php:33 -msgid "Global Support Group" -msgstr "" - -#: newmemberwidget.php:37 -msgid "Local Support Group" -msgstr "" - -#: newmemberwidget.php:62 -msgid "Save Settings" -msgstr "" - -#: newmemberwidget.php:63 -msgid "Message" -msgstr "" - -#: newmemberwidget.php:63 -msgid "Your message for new members. You can use bbcode here." -msgstr "" - -#: newmemberwidget.php:64 -msgid "Add a link to global support group" -msgstr "" - -#: newmemberwidget.php:64 -msgid "Should a link to the global support group be displayed?" -msgstr "" - -#: newmemberwidget.php:65 -msgid "Add a link to the local support group" -msgstr "" - -#: newmemberwidget.php:65 -msgid "" -"If you have a local support group and want to have a link displayed in the " -"widget, check this box." -msgstr "" - -#: newmemberwidget.php:66 -msgid "Name of the local support group" -msgstr "" - -#: newmemberwidget.php:66 -msgid "" -"If you checked the above, specify the nickname of the local support" -" group here (i.e. helpers)" -msgstr "" diff --git a/newmemberwidget/lang/ca/strings.php b/newmemberwidget/lang/ca/strings.php deleted file mode 100644 index d34874f6..00000000 --- a/newmemberwidget/lang/ca/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -, 2014 +# Michal Šupler , 2014 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:50-0400\n" -"PO-Revision-Date: 2014-06-23 10:26+0000\n" -"Last-Translator: Aditoo, 2018\n" -"Language-Team: Czech (http://app.transifex.com/Friendica/friendica/language/cs/)\n" +"POT-Creation-Date: 2014-06-01 14:12+0200\n" +"PO-Revision-Date: 2014-07-07 19:25+0000\n" +"Last-Translator: Michal Šupler \n" +"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" -"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: newmemberwidget.php:29 +#: newmemberwidget.php:21 msgid "New Member" msgstr "Nový člen" -#: newmemberwidget.php:30 +#: newmemberwidget.php:22 msgid "Tips for New Members" msgstr "Tipy pro nové členy" -#: newmemberwidget.php:33 -msgid "Global Support Group" -msgstr "" +#: newmemberwidget.php:24 +msgid "Global Support Forum" +msgstr "Globální fórum podpory" -#: newmemberwidget.php:37 -msgid "Local Support Group" -msgstr "" +#: newmemberwidget.php:26 +msgid "Local Support Forum" +msgstr "Lokální fórum podpory" -#: newmemberwidget.php:62 +#: newmemberwidget.php:49 msgid "Save Settings" -msgstr "Uložit nastavení" +msgstr "Uložit Nastavení" -#: newmemberwidget.php:63 +#: newmemberwidget.php:50 msgid "Message" msgstr "Zpráva" -#: newmemberwidget.php:63 +#: newmemberwidget.php:50 msgid "Your message for new members. You can use bbcode here." msgstr "Vaše zpráva pro nové členy. Zde můžete použít BBCode." -#: newmemberwidget.php:64 -msgid "Add a link to global support group" -msgstr "" +#: newmemberwidget.php:51 +msgid "Add a link to global support forum" +msgstr "Přidejte odkaz na globální fórum podpory" -#: newmemberwidget.php:64 -msgid "Should a link to the global support group be displayed?" -msgstr "" +#: newmemberwidget.php:51 +msgid "Should a link to the global support forum be displayed?" +msgstr "Má být odkaz na globální fórum podpory zobrazen?" -#: newmemberwidget.php:65 -msgid "Add a link to the local support group" -msgstr "" +#: newmemberwidget.php:52 +msgid "Add a link to the local support forum" +msgstr "Přidejte odkaz na lokální fórum podpory" -#: newmemberwidget.php:65 +#: newmemberwidget.php:52 msgid "" -"If you have a local support group and want to have a link displayed in the " +"If you have a local support forum and wand to have a link displayed in the " "widget, check this box." -msgstr "" +msgstr "Pokud máte lokální fórum podpory a chcete mít zobrazen jeho odkaz, zvolte tuto volbu." -#: newmemberwidget.php:66 +#: newmemberwidget.php:53 msgid "Name of the local support group" -msgstr "Název místního fóra podpory" +msgstr "Název lokálního fóra podpory" -#: newmemberwidget.php:66 +#: newmemberwidget.php:53 msgid "" "If you checked the above, specify the nickname of the local support" " group here (i.e. helpers)" -msgstr "Pokud jste zaškrtl/a výše uvedenou možnost, specifikujte zde přezdívku místní skupiny podpory (např. pomocnici)" +msgstr "Pokud jste výše uvedené zaškrtli, specifikujte zde přezdívku lokální podpůrné skupiny (např. pomahači)" diff --git a/newmemberwidget/lang/cs/strings.php b/newmemberwidget/lang/cs/strings.php index 2f150466..62673df9 100644 --- a/newmemberwidget/lang/cs/strings.php +++ b/newmemberwidget/lang/cs/strings.php @@ -3,12 +3,18 @@ if(! function_exists("string_plural_select_cs")) { function string_plural_select_cs($n){ $n = intval($n); - if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; } + if (($n==1)) { return 0; } else if (($n>=2 && $n<=4)) { return 1; } else { return 2; } }} $a->strings['New Member'] = 'Nový člen'; $a->strings['Tips for New Members'] = 'Tipy pro nové členy'; -$a->strings['Save Settings'] = 'Uložit nastavení'; +$a->strings['Global Support Forum'] = 'Globální fórum podpory'; +$a->strings['Local Support Forum'] = 'Lokální fórum podpory'; +$a->strings['Save Settings'] = 'Uložit Nastavení'; $a->strings['Message'] = 'Zpráva'; $a->strings['Your message for new members. You can use bbcode here.'] = 'Vaše zpráva pro nové členy. Zde můžete použít BBCode.'; -$a->strings['Name of the local support group'] = 'Název místního fóra podpory'; -$a->strings['If you checked the above, specify the nickname of the local support group here (i.e. helpers)'] = 'Pokud jste zaškrtl/a výše uvedenou možnost, specifikujte zde přezdívku místní skupiny podpory (např. pomocnici)'; +$a->strings['Add a link to global support forum'] = 'Přidejte odkaz na globální fórum podpory'; +$a->strings['Should a link to the global support forum be displayed?'] = 'Má být odkaz na globální fórum podpory zobrazen?'; +$a->strings['Add a link to the local support forum'] = 'Přidejte odkaz na lokální fórum podpory'; +$a->strings['If you have a local support forum and wand to have a link displayed in the widget, check this box.'] = 'Pokud máte lokální fórum podpory a chcete mít zobrazen jeho odkaz, zvolte tuto volbu.'; +$a->strings['Name of the local support group'] = 'Název lokálního fóra podpory'; +$a->strings['If you checked the above, specify the nickname of the local support group here (i.e. helpers)'] = 'Pokud jste výše uvedené zaškrtli, specifikujte zde přezdívku lokální podpůrné skupiny (např. pomahači)'; diff --git a/newmemberwidget/lang/de/messages.po b/newmemberwidget/lang/de/messages.po index 87289e3e..17696cfd 100644 --- a/newmemberwidget/lang/de/messages.po +++ b/newmemberwidget/lang/de/messages.po @@ -4,17 +4,16 @@ # # # Translators: -# Raroun, 2023 # Tobias Diekershoff , 2021 # Ulf Rompe , 2019 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:50-0400\n" -"PO-Revision-Date: 2014-06-23 10:26+0000\n" -"Last-Translator: Raroun, 2023\n" -"Language-Team: German (http://app.transifex.com/Friendica/friendica/language/de/)\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" +"PO-Revision-Date: 2021-03-29 05:38+0000\n" +"Last-Translator: Tobias Diekershoff \n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -30,48 +29,48 @@ msgid "Tips for New Members" msgstr "Tipps für neue Nutzer" #: newmemberwidget.php:33 -msgid "Global Support Group" -msgstr "Globale Support-Gruppe" +msgid "Global Support Forum" +msgstr "Globales Forum für Hilfsanfragen" #: newmemberwidget.php:37 -msgid "Local Support Group" -msgstr "Lokale Support-Gruppe" +msgid "Local Support Forum" +msgstr "Lokales Forum für Hilfsanfragen" -#: newmemberwidget.php:62 +#: newmemberwidget.php:65 msgid "Save Settings" msgstr "Einstellungen speichern" -#: newmemberwidget.php:63 +#: newmemberwidget.php:66 msgid "Message" msgstr "Nachricht" -#: newmemberwidget.php:63 +#: newmemberwidget.php:66 msgid "Your message for new members. You can use bbcode here." msgstr "Deine Nachricht für neue Nutzer. BBCode kann verwendet werden." -#: newmemberwidget.php:64 -msgid "Add a link to global support group" -msgstr "Fügen Sie einen Link der globalen Support-Gruppe hinzu" +#: newmemberwidget.php:67 +msgid "Add a link to global support forum" +msgstr "Link zum globalen Support-Forum anzeigen" -#: newmemberwidget.php:64 -msgid "Should a link to the global support group be displayed?" -msgstr "Soll ein Link zur globalen Support-Gruppe angezeigt werden?" +#: newmemberwidget.php:67 +msgid "Should a link to the global support forum be displayed?" +msgstr "Soll ein Link zum globalen Support-Forum angezeigt werden?" -#: newmemberwidget.php:65 -msgid "Add a link to the local support group" -msgstr "Fügen Sie einen Link der lokalen Support-Gruppe hinzu" +#: newmemberwidget.php:68 +msgid "Add a link to the local support forum" +msgstr "Link zum lokalen Support-Forum anzeigen" -#: newmemberwidget.php:65 +#: newmemberwidget.php:68 msgid "" -"If you have a local support group and want to have a link displayed in the " +"If you have a local support forum and want to have a link displayed in the " "widget, check this box." -msgstr "Wenn Sie eine lokale Support-Gruppe haben und einen Link im Widget anzeigen lassen möchten, markieren Sie dieses Feld." +msgstr "Wenn du ein lokales Support-Forum eingerichtet hast und ein Link darauf angezeigt werden soll, schalte dies ein." -#: newmemberwidget.php:66 +#: newmemberwidget.php:69 msgid "Name of the local support group" msgstr "Name des lokalen Support-Forums" -#: newmemberwidget.php:66 +#: newmemberwidget.php:69 msgid "" "If you checked the above, specify the nickname of the local support" " group here (i.e. helpers)" diff --git a/newmemberwidget/lang/de/strings.php b/newmemberwidget/lang/de/strings.php index aa3e0f88..c7dc503c 100644 --- a/newmemberwidget/lang/de/strings.php +++ b/newmemberwidget/lang/de/strings.php @@ -7,14 +7,14 @@ function string_plural_select_de($n){ }} $a->strings['New Member'] = 'Neue Nutzer'; $a->strings['Tips for New Members'] = 'Tipps für neue Nutzer'; -$a->strings['Global Support Group'] = 'Globale Support-Gruppe'; -$a->strings['Local Support Group'] = 'Lokale Support-Gruppe'; +$a->strings['Global Support Forum'] = 'Globales Forum für Hilfsanfragen'; +$a->strings['Local Support Forum'] = 'Lokales Forum für Hilfsanfragen'; $a->strings['Save Settings'] = 'Einstellungen speichern'; $a->strings['Message'] = 'Nachricht'; $a->strings['Your message for new members. You can use bbcode here.'] = 'Deine Nachricht für neue Nutzer. BBCode kann verwendet werden.'; -$a->strings['Add a link to global support group'] = 'Fügen Sie einen Link der globalen Support-Gruppe hinzu'; -$a->strings['Should a link to the global support group be displayed?'] = 'Soll ein Link zur globalen Support-Gruppe angezeigt werden?'; -$a->strings['Add a link to the local support group'] = 'Fügen Sie einen Link der lokalen Support-Gruppe hinzu'; -$a->strings['If you have a local support group and want to have a link displayed in the widget, check this box.'] = 'Wenn Sie eine lokale Support-Gruppe haben und einen Link im Widget anzeigen lassen möchten, markieren Sie dieses Feld.'; +$a->strings['Add a link to global support forum'] = 'Link zum globalen Support-Forum anzeigen'; +$a->strings['Should a link to the global support forum be displayed?'] = 'Soll ein Link zum globalen Support-Forum angezeigt werden?'; +$a->strings['Add a link to the local support forum'] = 'Link zum lokalen Support-Forum anzeigen'; +$a->strings['If you have a local support forum and want to have a link displayed in the widget, check this box.'] = 'Wenn du ein lokales Support-Forum eingerichtet hast und ein Link darauf angezeigt werden soll, schalte dies ein.'; $a->strings['Name of the local support group'] = 'Name des lokalen Support-Forums'; $a->strings['If you checked the above, specify the nickname of the local support group here (i.e. helpers)'] = 'Wenn der Link angezeigt werden soll, dann trage hier den Spitznamen des Forums ein (z.B. helpers)'; diff --git a/newmemberwidget/lang/eo/messages.po b/newmemberwidget/lang/eo/messages.po deleted file mode 100644 index 5619131c..00000000 --- a/newmemberwidget/lang/eo/messages.po +++ /dev/null @@ -1,75 +0,0 @@ -# ADDON newmemberwidget -# Copyright (C) -# This file is distributed under the same license as the Friendica newmemberwidget addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:50-0400\n" -"PO-Revision-Date: 2014-06-23 10:26+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: newmemberwidget.php:29 -msgid "New Member" -msgstr "" - -#: newmemberwidget.php:30 -msgid "Tips for New Members" -msgstr "" - -#: newmemberwidget.php:33 -msgid "Global Support Group" -msgstr "" - -#: newmemberwidget.php:37 -msgid "Local Support Group" -msgstr "" - -#: newmemberwidget.php:62 -msgid "Save Settings" -msgstr "" - -#: newmemberwidget.php:63 -msgid "Message" -msgstr "" - -#: newmemberwidget.php:63 -msgid "Your message for new members. You can use bbcode here." -msgstr "" - -#: newmemberwidget.php:64 -msgid "Add a link to global support group" -msgstr "" - -#: newmemberwidget.php:64 -msgid "Should a link to the global support group be displayed?" -msgstr "" - -#: newmemberwidget.php:65 -msgid "Add a link to the local support group" -msgstr "" - -#: newmemberwidget.php:65 -msgid "" -"If you have a local support group and want to have a link displayed in the " -"widget, check this box." -msgstr "" - -#: newmemberwidget.php:66 -msgid "Name of the local support group" -msgstr "" - -#: newmemberwidget.php:66 -msgid "" -"If you checked the above, specify the nickname of the local support" -" group here (i.e. helpers)" -msgstr "" diff --git a/newmemberwidget/lang/eo/strings.php b/newmemberwidget/lang/eo/strings.php deleted file mode 100644 index 68e8a64c..00000000 --- a/newmemberwidget/lang/eo/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -, 2021\n" -"Language-Team: Spanish (http://app.transifex.com/Friendica/friendica/language/es/)\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" +"PO-Revision-Date: 2021-04-06 01:46+0000\n" +"Last-Translator: Senex Petrovic \n" +"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: es\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: newmemberwidget.php:29 msgid "New Member" @@ -29,48 +29,48 @@ msgid "Tips for New Members" msgstr "Consejos para Nuevos Miembros" #: newmemberwidget.php:33 -msgid "Global Support Group" -msgstr "" +msgid "Global Support Forum" +msgstr "Foro de Soporte Global" #: newmemberwidget.php:37 -msgid "Local Support Group" -msgstr "" +msgid "Local Support Forum" +msgstr "Foro de Soporte Local" -#: newmemberwidget.php:62 +#: newmemberwidget.php:65 msgid "Save Settings" msgstr "Guardar Ajustes" -#: newmemberwidget.php:63 +#: newmemberwidget.php:66 msgid "Message" msgstr "Mensaje" -#: newmemberwidget.php:63 +#: newmemberwidget.php:66 msgid "Your message for new members. You can use bbcode here." msgstr "Su mensaje para los nuevos miembros. Puede usar bbcode aquí" -#: newmemberwidget.php:64 -msgid "Add a link to global support group" -msgstr "" +#: newmemberwidget.php:67 +msgid "Add a link to global support forum" +msgstr "Añadir un enlace al foro de soporte global" -#: newmemberwidget.php:64 -msgid "Should a link to the global support group be displayed?" -msgstr "" +#: newmemberwidget.php:67 +msgid "Should a link to the global support forum be displayed?" +msgstr "¿Debería mostrarse un enlace al foro de soporte global?" -#: newmemberwidget.php:65 -msgid "Add a link to the local support group" -msgstr "" +#: newmemberwidget.php:68 +msgid "Add a link to the local support forum" +msgstr "Añadir un enlace al foro de soporte local" -#: newmemberwidget.php:65 +#: newmemberwidget.php:68 msgid "" -"If you have a local support group and want to have a link displayed in the " +"If you have a local support forum and want to have a link displayed in the " "widget, check this box." -msgstr "" +msgstr "Si tiene foro de soporte local y desea que se muestre un enlace en el widget, marque esta casilla." -#: newmemberwidget.php:66 +#: newmemberwidget.php:69 msgid "Name of the local support group" msgstr "Nombre del grupo de soporte local" -#: newmemberwidget.php:66 +#: newmemberwidget.php:69 msgid "" "If you checked the above, specify the nickname of the local support" " group here (i.e. helpers)" diff --git a/newmemberwidget/lang/es/strings.php b/newmemberwidget/lang/es/strings.php index 8798813a..28253b73 100644 --- a/newmemberwidget/lang/es/strings.php +++ b/newmemberwidget/lang/es/strings.php @@ -3,12 +3,18 @@ if(! function_exists("string_plural_select_es")) { function string_plural_select_es($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} $a->strings['New Member'] = 'Nuevo Miembro'; $a->strings['Tips for New Members'] = 'Consejos para Nuevos Miembros'; +$a->strings['Global Support Forum'] = 'Foro de Soporte Global'; +$a->strings['Local Support Forum'] = 'Foro de Soporte Local'; $a->strings['Save Settings'] = 'Guardar Ajustes'; $a->strings['Message'] = 'Mensaje'; $a->strings['Your message for new members. You can use bbcode here.'] = 'Su mensaje para los nuevos miembros. Puede usar bbcode aquí'; +$a->strings['Add a link to global support forum'] = 'Añadir un enlace al foro de soporte global'; +$a->strings['Should a link to the global support forum be displayed?'] = '¿Debería mostrarse un enlace al foro de soporte global?'; +$a->strings['Add a link to the local support forum'] = 'Añadir un enlace al foro de soporte local'; +$a->strings['If you have a local support forum and want to have a link displayed in the widget, check this box.'] = 'Si tiene foro de soporte local y desea que se muestre un enlace en el widget, marque esta casilla.'; $a->strings['Name of the local support group'] = 'Nombre del grupo de soporte local'; $a->strings['If you checked the above, specify the nickname of the local support group here (i.e. helpers)'] = 'Si chequeó arriba, especifique el apodo del grupo de soporte local aquí (asistentes)'; diff --git a/newmemberwidget/lang/et/messages.po b/newmemberwidget/lang/et/messages.po index 6f52dff8..969efad9 100644 --- a/newmemberwidget/lang/et/messages.po +++ b/newmemberwidget/lang/et/messages.po @@ -9,67 +9,67 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:50-0400\n" -"PO-Revision-Date: 2014-06-23 10:26+0000\n" -"Last-Translator: Rain Hawk, 2019\n" -"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n" +"POT-Creation-Date: 2014-06-01 14:12+0200\n" +"PO-Revision-Date: 2019-04-16 05:07+0000\n" +"Last-Translator: Rain Hawk\n" +"Language-Team: Estonian (http://www.transifex.com/Friendica/friendica/language/et/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: et\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: newmemberwidget.php:29 +#: newmemberwidget.php:21 msgid "New Member" msgstr "Uus liige" -#: newmemberwidget.php:30 +#: newmemberwidget.php:22 msgid "Tips for New Members" msgstr "Nippe uutele liikmetele" -#: newmemberwidget.php:33 -msgid "Global Support Group" -msgstr "" +#: newmemberwidget.php:24 +msgid "Global Support Forum" +msgstr "Globaalne tugifoorum" -#: newmemberwidget.php:37 -msgid "Local Support Group" -msgstr "" +#: newmemberwidget.php:26 +msgid "Local Support Forum" +msgstr "Lokaalne tugifoorum" -#: newmemberwidget.php:62 +#: newmemberwidget.php:49 msgid "Save Settings" msgstr "Salvesta sätted" -#: newmemberwidget.php:63 +#: newmemberwidget.php:50 msgid "Message" msgstr "Sõnum" -#: newmemberwidget.php:63 +#: newmemberwidget.php:50 msgid "Your message for new members. You can use bbcode here." msgstr "" -#: newmemberwidget.php:64 -msgid "Add a link to global support group" +#: newmemberwidget.php:51 +msgid "Add a link to global support forum" msgstr "" -#: newmemberwidget.php:64 -msgid "Should a link to the global support group be displayed?" +#: newmemberwidget.php:51 +msgid "Should a link to the global support forum be displayed?" msgstr "" -#: newmemberwidget.php:65 -msgid "Add a link to the local support group" +#: newmemberwidget.php:52 +msgid "Add a link to the local support forum" msgstr "" -#: newmemberwidget.php:65 +#: newmemberwidget.php:52 msgid "" -"If you have a local support group and want to have a link displayed in the " +"If you have a local support forum and wand to have a link displayed in the " "widget, check this box." msgstr "" -#: newmemberwidget.php:66 +#: newmemberwidget.php:53 msgid "Name of the local support group" msgstr "" -#: newmemberwidget.php:66 +#: newmemberwidget.php:53 msgid "" "If you checked the above, specify the nickname of the local support" " group here (i.e. helpers)" diff --git a/newmemberwidget/lang/et/strings.php b/newmemberwidget/lang/et/strings.php index e4465d99..3d4f8167 100644 --- a/newmemberwidget/lang/et/strings.php +++ b/newmemberwidget/lang/et/strings.php @@ -7,5 +7,7 @@ function string_plural_select_et($n){ }} $a->strings['New Member'] = 'Uus liige'; $a->strings['Tips for New Members'] = 'Nippe uutele liikmetele'; +$a->strings['Global Support Forum'] = 'Globaalne tugifoorum'; +$a->strings['Local Support Forum'] = 'Lokaalne tugifoorum'; $a->strings['Save Settings'] = 'Salvesta sätted'; $a->strings['Message'] = 'Sõnum'; diff --git a/newmemberwidget/lang/fr/messages.po b/newmemberwidget/lang/fr/messages.po index fe50a027..296c2755 100644 --- a/newmemberwidget/lang/fr/messages.po +++ b/newmemberwidget/lang/fr/messages.po @@ -4,8 +4,6 @@ # # # Translators: -# cracrayol, 2025 -# cracrayol, 2023 # Hypolite Petovan , 2022 # Nicolas Derive, 2022 # StefOfficiel , 2015 @@ -13,10 +11,10 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:50-0400\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" "PO-Revision-Date: 2014-06-23 10:26+0000\n" -"Last-Translator: cracrayol, 2025\n" -"Language-Team: French (http://app.transifex.com/Friendica/friendica/language/fr/)\n" +"Last-Translator: Nicolas Derive, 2022\n" +"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -32,48 +30,48 @@ msgid "Tips for New Members" msgstr "Conseils aux nouveaux venus" #: newmemberwidget.php:33 -msgid "Global Support Group" -msgstr "Groupe de support global" +msgid "Global Support Forum" +msgstr "Forum de support global" #: newmemberwidget.php:37 -msgid "Local Support Group" -msgstr "Groupe de support local" +msgid "Local Support Forum" +msgstr "Forum de support local" -#: newmemberwidget.php:62 +#: newmemberwidget.php:65 msgid "Save Settings" -msgstr "Sauvegarder les paramètres" +msgstr "Enregistrer les paramètres" -#: newmemberwidget.php:63 +#: newmemberwidget.php:66 msgid "Message" msgstr "Message" -#: newmemberwidget.php:63 +#: newmemberwidget.php:66 msgid "Your message for new members. You can use bbcode here." msgstr "Votre messages aux nouveaux venus. Vous pouvez utiliser des BBCodes." -#: newmemberwidget.php:64 -msgid "Add a link to global support group" -msgstr "Ajouter un lien vers le groupe de support global" +#: newmemberwidget.php:67 +msgid "Add a link to global support forum" +msgstr "Ajouter un lien vers le forum de support global" -#: newmemberwidget.php:64 -msgid "Should a link to the global support group be displayed?" -msgstr "Montrer un lien vers le groupe de support global ?" +#: newmemberwidget.php:67 +msgid "Should a link to the global support forum be displayed?" +msgstr "Montrer un lien vers le forum de support global?" -#: newmemberwidget.php:65 -msgid "Add a link to the local support group" -msgstr "Ajouter un lien vers le groupe de support local" +#: newmemberwidget.php:68 +msgid "Add a link to the local support forum" +msgstr "Ajouter un lien vers le forum de support local" -#: newmemberwidget.php:65 +#: newmemberwidget.php:68 msgid "" -"If you have a local support group and want to have a link displayed in the " +"If you have a local support forum and want to have a link displayed in the " "widget, check this box." -msgstr "Si vous avez un groupe de support local et désirez avoir un lien affiché dans l'appliquette/widget, cochez cette case." +msgstr "Si vous avez un forum d'assistance local et désirez avoir un lien affiché dans l'appliquette/widget, cochez cette case." -#: newmemberwidget.php:66 +#: newmemberwidget.php:69 msgid "Name of the local support group" msgstr "Nom du groupe de support local" -#: newmemberwidget.php:66 +#: newmemberwidget.php:69 msgid "" "If you checked the above, specify the nickname of the local support" " group here (i.e. helpers)" diff --git a/newmemberwidget/lang/fr/strings.php b/newmemberwidget/lang/fr/strings.php index ce6d6598..8de178f2 100644 --- a/newmemberwidget/lang/fr/strings.php +++ b/newmemberwidget/lang/fr/strings.php @@ -7,14 +7,14 @@ function string_plural_select_fr($n){ }} $a->strings['New Member'] = 'Nouveau Membre'; $a->strings['Tips for New Members'] = 'Conseils aux nouveaux venus'; -$a->strings['Global Support Group'] = 'Groupe de support global'; -$a->strings['Local Support Group'] = 'Groupe de support local'; -$a->strings['Save Settings'] = 'Sauvegarder les paramètres'; +$a->strings['Global Support Forum'] = 'Forum de support global'; +$a->strings['Local Support Forum'] = 'Forum de support local'; +$a->strings['Save Settings'] = 'Enregistrer les paramètres'; $a->strings['Message'] = 'Message'; $a->strings['Your message for new members. You can use bbcode here.'] = 'Votre messages aux nouveaux venus. Vous pouvez utiliser des BBCodes.'; -$a->strings['Add a link to global support group'] = 'Ajouter un lien vers le groupe de support global'; -$a->strings['Should a link to the global support group be displayed?'] = 'Montrer un lien vers le groupe de support global ?'; -$a->strings['Add a link to the local support group'] = 'Ajouter un lien vers le groupe de support local'; -$a->strings['If you have a local support group and want to have a link displayed in the widget, check this box.'] = 'Si vous avez un groupe de support local et désirez avoir un lien affiché dans l\'appliquette/widget, cochez cette case.'; +$a->strings['Add a link to global support forum'] = 'Ajouter un lien vers le forum de support global'; +$a->strings['Should a link to the global support forum be displayed?'] = 'Montrer un lien vers le forum de support global?'; +$a->strings['Add a link to the local support forum'] = 'Ajouter un lien vers le forum de support local'; +$a->strings['If you have a local support forum and want to have a link displayed in the widget, check this box.'] = 'Si vous avez un forum d\'assistance local et désirez avoir un lien affiché dans l\'appliquette/widget, cochez cette case.'; $a->strings['Name of the local support group'] = 'Nom du groupe de support local'; $a->strings['If you checked the above, specify the nickname of the local support group here (i.e. helpers)'] = 'Si vous avez coché la case ci-dessus, spécifiez le nom d\'utilisateur du groupe de support local (par ex. "helpers")'; diff --git a/newmemberwidget/lang/gd/messages.po b/newmemberwidget/lang/gd/messages.po deleted file mode 100644 index aa34a3ca..00000000 --- a/newmemberwidget/lang/gd/messages.po +++ /dev/null @@ -1,75 +0,0 @@ -# ADDON newmemberwidget -# Copyright (C) -# This file is distributed under the same license as the Friendica newmemberwidget addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:50-0400\n" -"PO-Revision-Date: 2014-06-23 10:26+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gd\n" -"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" - -#: newmemberwidget.php:29 -msgid "New Member" -msgstr "" - -#: newmemberwidget.php:30 -msgid "Tips for New Members" -msgstr "" - -#: newmemberwidget.php:33 -msgid "Global Support Group" -msgstr "" - -#: newmemberwidget.php:37 -msgid "Local Support Group" -msgstr "" - -#: newmemberwidget.php:62 -msgid "Save Settings" -msgstr "" - -#: newmemberwidget.php:63 -msgid "Message" -msgstr "" - -#: newmemberwidget.php:63 -msgid "Your message for new members. You can use bbcode here." -msgstr "" - -#: newmemberwidget.php:64 -msgid "Add a link to global support group" -msgstr "" - -#: newmemberwidget.php:64 -msgid "Should a link to the global support group be displayed?" -msgstr "" - -#: newmemberwidget.php:65 -msgid "Add a link to the local support group" -msgstr "" - -#: newmemberwidget.php:65 -msgid "" -"If you have a local support group and want to have a link displayed in the " -"widget, check this box." -msgstr "" - -#: newmemberwidget.php:66 -msgid "Name of the local support group" -msgstr "" - -#: newmemberwidget.php:66 -msgid "" -"If you checked the above, specify the nickname of the local support" -" group here (i.e. helpers)" -msgstr "" diff --git a/newmemberwidget/lang/gd/strings.php b/newmemberwidget/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/newmemberwidget/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/newmemberwidget/lang/hu/messages.po b/newmemberwidget/lang/hu/messages.po index f3babd21..41453463 100644 --- a/newmemberwidget/lang/hu/messages.po +++ b/newmemberwidget/lang/hu/messages.po @@ -4,15 +4,15 @@ # # # Translators: -# Balázs Úr, 2020-2021,2023 +# Balázs Úr, 2020-2021 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:50-0400\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" "PO-Revision-Date: 2014-06-23 10:26+0000\n" -"Last-Translator: Balázs Úr, 2020-2021,2023\n" -"Language-Team: Hungarian (http://app.transifex.com/Friendica/friendica/language/hu/)\n" +"Last-Translator: Balázs Úr, 2020-2021\n" +"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -28,48 +28,48 @@ msgid "Tips for New Members" msgstr "Tippek új tagoknak" #: newmemberwidget.php:33 -msgid "Global Support Group" -msgstr "Globális támogatási csoport" +msgid "Global Support Forum" +msgstr "Globális támogató fórum" #: newmemberwidget.php:37 -msgid "Local Support Group" -msgstr "Helyi támogatási csoport" +msgid "Local Support Forum" +msgstr "Helyi támogató fórum" -#: newmemberwidget.php:62 +#: newmemberwidget.php:65 msgid "Save Settings" msgstr "Beállítások mentése" -#: newmemberwidget.php:63 +#: newmemberwidget.php:66 msgid "Message" msgstr "Üzenet" -#: newmemberwidget.php:63 +#: newmemberwidget.php:66 msgid "Your message for new members. You can use bbcode here." msgstr "Az Ön üzenete az új tagoknak. Itt használhat BBCode-ot." -#: newmemberwidget.php:64 -msgid "Add a link to global support group" -msgstr "A globális támogatási csoportra mutató hivatkozás hozzáadása" +#: newmemberwidget.php:67 +msgid "Add a link to global support forum" +msgstr "A globális támogató fórumra mutató hivatkozás hozzáadása" -#: newmemberwidget.php:64 -msgid "Should a link to the global support group be displayed?" -msgstr "Meg kell jeleníteni a globális támogatási csoportra mutató hivatkozást?" +#: newmemberwidget.php:67 +msgid "Should a link to the global support forum be displayed?" +msgstr "Meg kell jeleníteni a globális támogató fórumra mutató hivatkozást?" -#: newmemberwidget.php:65 -msgid "Add a link to the local support group" -msgstr "A helyi támogatási csoportra mutató hivatkozás hozzáadása" +#: newmemberwidget.php:68 +msgid "Add a link to the local support forum" +msgstr "A helyi támogató fórumra mutató hivatkozás hozzáadása" -#: newmemberwidget.php:65 +#: newmemberwidget.php:68 msgid "" -"If you have a local support group and want to have a link displayed in the " +"If you have a local support forum and want to have a link displayed in the " "widget, check this box." -msgstr "Ha van helyi támogatási csoportja és meg szeretne jeleníteni egy hivatkozást a felületi elemben, akkor jelölje be ezt a négyzetet." +msgstr "Ha van helyi támogató fóruma és szeretne egy hivatkozást megjeleníteni a felületi elemben, akkor jelölje be azt a négyzetet." -#: newmemberwidget.php:66 +#: newmemberwidget.php:69 msgid "Name of the local support group" msgstr "A helyi támogató csoport neve" -#: newmemberwidget.php:66 +#: newmemberwidget.php:69 msgid "" "If you checked the above, specify the nickname of the local support" " group here (i.e. helpers)" diff --git a/newmemberwidget/lang/hu/strings.php b/newmemberwidget/lang/hu/strings.php index 2f0066cd..edf2a003 100644 --- a/newmemberwidget/lang/hu/strings.php +++ b/newmemberwidget/lang/hu/strings.php @@ -7,14 +7,14 @@ function string_plural_select_hu($n){ }} $a->strings['New Member'] = 'Új tag'; $a->strings['Tips for New Members'] = 'Tippek új tagoknak'; -$a->strings['Global Support Group'] = 'Globális támogatási csoport'; -$a->strings['Local Support Group'] = 'Helyi támogatási csoport'; +$a->strings['Global Support Forum'] = 'Globális támogató fórum'; +$a->strings['Local Support Forum'] = 'Helyi támogató fórum'; $a->strings['Save Settings'] = 'Beállítások mentése'; $a->strings['Message'] = 'Üzenet'; $a->strings['Your message for new members. You can use bbcode here.'] = 'Az Ön üzenete az új tagoknak. Itt használhat BBCode-ot.'; -$a->strings['Add a link to global support group'] = 'A globális támogatási csoportra mutató hivatkozás hozzáadása'; -$a->strings['Should a link to the global support group be displayed?'] = 'Meg kell jeleníteni a globális támogatási csoportra mutató hivatkozást?'; -$a->strings['Add a link to the local support group'] = 'A helyi támogatási csoportra mutató hivatkozás hozzáadása'; -$a->strings['If you have a local support group and want to have a link displayed in the widget, check this box.'] = 'Ha van helyi támogatási csoportja és meg szeretne jeleníteni egy hivatkozást a felületi elemben, akkor jelölje be ezt a négyzetet.'; +$a->strings['Add a link to global support forum'] = 'A globális támogató fórumra mutató hivatkozás hozzáadása'; +$a->strings['Should a link to the global support forum be displayed?'] = 'Meg kell jeleníteni a globális támogató fórumra mutató hivatkozást?'; +$a->strings['Add a link to the local support forum'] = 'A helyi támogató fórumra mutató hivatkozás hozzáadása'; +$a->strings['If you have a local support forum and want to have a link displayed in the widget, check this box.'] = 'Ha van helyi támogató fóruma és szeretne egy hivatkozást megjeleníteni a felületi elemben, akkor jelölje be azt a négyzetet.'; $a->strings['Name of the local support group'] = 'A helyi támogató csoport neve'; $a->strings['If you checked the above, specify the nickname of the local support group here (i.e. helpers)'] = 'Ha bejelölte a fentit, akkor itt adja meg a helyi támogató csoport becenevét (például segítők)'; diff --git a/newmemberwidget/lang/is/messages.po b/newmemberwidget/lang/is/messages.po deleted file mode 100644 index c740a42b..00000000 --- a/newmemberwidget/lang/is/messages.po +++ /dev/null @@ -1,75 +0,0 @@ -# ADDON newmemberwidget -# Copyright (C) -# This file is distributed under the same license as the Friendica newmemberwidget addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:50-0400\n" -"PO-Revision-Date: 2014-06-23 10:26+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: is\n" -"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" - -#: newmemberwidget.php:29 -msgid "New Member" -msgstr "" - -#: newmemberwidget.php:30 -msgid "Tips for New Members" -msgstr "" - -#: newmemberwidget.php:33 -msgid "Global Support Group" -msgstr "" - -#: newmemberwidget.php:37 -msgid "Local Support Group" -msgstr "" - -#: newmemberwidget.php:62 -msgid "Save Settings" -msgstr "" - -#: newmemberwidget.php:63 -msgid "Message" -msgstr "" - -#: newmemberwidget.php:63 -msgid "Your message for new members. You can use bbcode here." -msgstr "" - -#: newmemberwidget.php:64 -msgid "Add a link to global support group" -msgstr "" - -#: newmemberwidget.php:64 -msgid "Should a link to the global support group be displayed?" -msgstr "" - -#: newmemberwidget.php:65 -msgid "Add a link to the local support group" -msgstr "" - -#: newmemberwidget.php:65 -msgid "" -"If you have a local support group and want to have a link displayed in the " -"widget, check this box." -msgstr "" - -#: newmemberwidget.php:66 -msgid "Name of the local support group" -msgstr "" - -#: newmemberwidget.php:66 -msgid "" -"If you checked the above, specify the nickname of the local support" -" group here (i.e. helpers)" -msgstr "" diff --git a/newmemberwidget/lang/is/strings.php b/newmemberwidget/lang/is/strings.php deleted file mode 100644 index 975c341e..00000000 --- a/newmemberwidget/lang/is/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -, 2020-2021\n" -"Language-Team: Italian (http://app.transifex.com/Friendica/friendica/language/it/)\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" +"PO-Revision-Date: 2021-02-16 12:48+0000\n" +"Last-Translator: Sylke Vicious \n" +"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: newmemberwidget.php:29 msgid "New Member" @@ -29,48 +29,48 @@ msgid "Tips for New Members" msgstr "Consigli per i Nuovi Utenti" #: newmemberwidget.php:33 -msgid "Global Support Group" -msgstr "" +msgid "Global Support Forum" +msgstr "Forum Globale di Supporto" #: newmemberwidget.php:37 -msgid "Local Support Group" -msgstr "" +msgid "Local Support Forum" +msgstr "Forum Locale di Supporto" -#: newmemberwidget.php:62 +#: newmemberwidget.php:65 msgid "Save Settings" msgstr "Salva Impostazioni" -#: newmemberwidget.php:63 +#: newmemberwidget.php:66 msgid "Message" msgstr "Messaggio" -#: newmemberwidget.php:63 +#: newmemberwidget.php:66 msgid "Your message for new members. You can use bbcode here." msgstr "Il tuo messaggio per i nuovi utenti. Puoi usare BBCode" -#: newmemberwidget.php:64 -msgid "Add a link to global support group" -msgstr "" +#: newmemberwidget.php:67 +msgid "Add a link to global support forum" +msgstr "Aggiunge un collegamento al forum di supporto globale" -#: newmemberwidget.php:64 -msgid "Should a link to the global support group be displayed?" -msgstr "" +#: newmemberwidget.php:67 +msgid "Should a link to the global support forum be displayed?" +msgstr "Mostrare il collegamento al forum di supporto globale?" -#: newmemberwidget.php:65 -msgid "Add a link to the local support group" -msgstr "" +#: newmemberwidget.php:68 +msgid "Add a link to the local support forum" +msgstr "Aggiunge un collegamento al forum di supporto locale" -#: newmemberwidget.php:65 +#: newmemberwidget.php:68 msgid "" -"If you have a local support group and want to have a link displayed in the " +"If you have a local support forum and want to have a link displayed in the " "widget, check this box." -msgstr "" +msgstr "Se hai un forum di supporto locale e vuoi che sia mostrato il collegamento nel widget, seleziona questo box." -#: newmemberwidget.php:66 +#: newmemberwidget.php:69 msgid "Name of the local support group" msgstr "Nome del gruppo locale di supporto" -#: newmemberwidget.php:66 +#: newmemberwidget.php:69 msgid "" "If you checked the above, specify the nickname of the local support" " group here (i.e. helpers)" diff --git a/newmemberwidget/lang/it/strings.php b/newmemberwidget/lang/it/strings.php index 56798c2a..8e8ae7c7 100644 --- a/newmemberwidget/lang/it/strings.php +++ b/newmemberwidget/lang/it/strings.php @@ -3,12 +3,18 @@ if(! function_exists("string_plural_select_it")) { function string_plural_select_it($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} $a->strings['New Member'] = 'Nuovi Utenti'; $a->strings['Tips for New Members'] = 'Consigli per i Nuovi Utenti'; +$a->strings['Global Support Forum'] = 'Forum Globale di Supporto'; +$a->strings['Local Support Forum'] = 'Forum Locale di Supporto'; $a->strings['Save Settings'] = 'Salva Impostazioni'; $a->strings['Message'] = 'Messaggio'; $a->strings['Your message for new members. You can use bbcode here.'] = 'Il tuo messaggio per i nuovi utenti. Puoi usare BBCode'; +$a->strings['Add a link to global support forum'] = 'Aggiunge un collegamento al forum di supporto globale'; +$a->strings['Should a link to the global support forum be displayed?'] = 'Mostrare il collegamento al forum di supporto globale?'; +$a->strings['Add a link to the local support forum'] = 'Aggiunge un collegamento al forum di supporto locale'; +$a->strings['If you have a local support forum and want to have a link displayed in the widget, check this box.'] = 'Se hai un forum di supporto locale e vuoi che sia mostrato il collegamento nel widget, seleziona questo box.'; $a->strings['Name of the local support group'] = 'Nome del gruppo locale di supporto'; $a->strings['If you checked the above, specify the nickname of the local support group here (i.e. helpers)'] = 'Se hai selezionato il box sopra, specifica qui il nome utente del gruppo locale di supporto (e.s. \'supporto\')'; diff --git a/newmemberwidget/lang/nl/messages.po b/newmemberwidget/lang/nl/messages.po index 232ae370..a1ce7269 100644 --- a/newmemberwidget/lang/nl/messages.po +++ b/newmemberwidget/lang/nl/messages.po @@ -4,73 +4,72 @@ # # # Translators: -# a a , 2019 # Jeroen De Meerleer , 2018 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 10:26+0000\n" -"Last-Translator: a a , 2019\n" -"Language-Team: Dutch (http://app.transifex.com/Friendica/friendica/language/nl/)\n" +"POT-Creation-Date: 2014-06-01 14:12+0200\n" +"PO-Revision-Date: 2018-08-24 13:40+0000\n" +"Last-Translator: Jeroen De Meerleer \n" +"Language-Team: Dutch (http://www.transifex.com/Friendica/friendica/language/nl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: nl\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: newmemberwidget.php:29 +#: newmemberwidget.php:21 msgid "New Member" msgstr "Nieuw lid" -#: newmemberwidget.php:30 +#: newmemberwidget.php:22 msgid "Tips for New Members" msgstr "Tips voor nieuwe leden" -#: newmemberwidget.php:33 +#: newmemberwidget.php:24 msgid "Global Support Forum" msgstr "" -#: newmemberwidget.php:37 +#: newmemberwidget.php:26 msgid "Local Support Forum" msgstr "" -#: newmemberwidget.php:65 +#: newmemberwidget.php:49 msgid "Save Settings" msgstr "Instellingen opslaan" -#: newmemberwidget.php:66 +#: newmemberwidget.php:50 msgid "Message" -msgstr "Bericht" +msgstr "" -#: newmemberwidget.php:66 +#: newmemberwidget.php:50 msgid "Your message for new members. You can use bbcode here." -msgstr "Uw bericht aan nieuwe leden. U kunt hier bbcode gebruiken." +msgstr "" -#: newmemberwidget.php:67 +#: newmemberwidget.php:51 msgid "Add a link to global support forum" msgstr "" -#: newmemberwidget.php:67 +#: newmemberwidget.php:51 msgid "Should a link to the global support forum be displayed?" msgstr "" -#: newmemberwidget.php:68 +#: newmemberwidget.php:52 msgid "Add a link to the local support forum" msgstr "" -#: newmemberwidget.php:68 +#: newmemberwidget.php:52 msgid "" -"If you have a local support forum and want to have a link displayed in the " +"If you have a local support forum and wand to have a link displayed in the " "widget, check this box." msgstr "" -#: newmemberwidget.php:69 +#: newmemberwidget.php:53 msgid "Name of the local support group" msgstr "" -#: newmemberwidget.php:69 +#: newmemberwidget.php:53 msgid "" "If you checked the above, specify the nickname of the local support" " group here (i.e. helpers)" diff --git a/newmemberwidget/lang/nl/strings.php b/newmemberwidget/lang/nl/strings.php index e81e7fcd..0d492eea 100644 --- a/newmemberwidget/lang/nl/strings.php +++ b/newmemberwidget/lang/nl/strings.php @@ -8,5 +8,3 @@ function string_plural_select_nl($n){ $a->strings['New Member'] = 'Nieuw lid'; $a->strings['Tips for New Members'] = 'Tips voor nieuwe leden'; $a->strings['Save Settings'] = 'Instellingen opslaan'; -$a->strings['Message'] = 'Bericht'; -$a->strings['Your message for new members. You can use bbcode here.'] = 'Uw bericht aan nieuwe leden. U kunt hier bbcode gebruiken.'; diff --git a/newmemberwidget/lang/pl/messages.po b/newmemberwidget/lang/pl/messages.po index 4d95d214..3f1838b5 100644 --- a/newmemberwidget/lang/pl/messages.po +++ b/newmemberwidget/lang/pl/messages.po @@ -4,17 +4,16 @@ # # # Translators: -# Bartosz Kozień, 2025 -# Piotr Strebski , 2022 +# Piotr Strębski , 2022 # Waldemar Stoczkowski, 2018 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:50-0400\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" "PO-Revision-Date: 2014-06-23 10:26+0000\n" -"Last-Translator: Bartosz Kozień, 2025\n" -"Language-Team: Polish (http://app.transifex.com/Friendica/friendica/language/pl/)\n" +"Last-Translator: Piotr Strębski , 2022\n" +"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -30,49 +29,49 @@ msgid "Tips for New Members" msgstr "Wskazówki dla nowych użytkowników" #: newmemberwidget.php:33 -msgid "Global Support Group" -msgstr "Globalna Grupa Pomocy" +msgid "Global Support Forum" +msgstr "Globalne forum pomocy technicznej" #: newmemberwidget.php:37 -msgid "Local Support Group" -msgstr "Lokalna Grupa Pomocy" +msgid "Local Support Forum" +msgstr "Lokalne Forum Wsparcia" -#: newmemberwidget.php:62 +#: newmemberwidget.php:65 msgid "Save Settings" msgstr "Zapisz ustawienia" -#: newmemberwidget.php:63 +#: newmemberwidget.php:66 msgid "Message" msgstr "Wiadomość" -#: newmemberwidget.php:63 +#: newmemberwidget.php:66 msgid "Your message for new members. You can use bbcode here." msgstr "Twoja wiadomość dla nowych członków. Możesz tutaj użyć bbcode." -#: newmemberwidget.php:64 -msgid "Add a link to global support group" -msgstr "Dodaj link do globalnej grupy pomocy" +#: newmemberwidget.php:67 +msgid "Add a link to global support forum" +msgstr "Dodaj odnośnik do globalnego forum pomocy technicznej" -#: newmemberwidget.php:64 -msgid "Should a link to the global support group be displayed?" -msgstr "Czy link do globalnej grupy pomocy powinien być wyświetlany?" +#: newmemberwidget.php:67 +msgid "Should a link to the global support forum be displayed?" +msgstr "Czy powinien być wyświetlany odnośnik do globalnego forum pomocy technicznej?" -#: newmemberwidget.php:65 -msgid "Add a link to the local support group" -msgstr "Dodaj link do lokalnej grupy pomocy" +#: newmemberwidget.php:68 +msgid "Add a link to the local support forum" +msgstr "Dodaj odnośnik do lokalnego forum pomocy technicznej" -#: newmemberwidget.php:65 +#: newmemberwidget.php:68 msgid "" -"If you have a local support group and want to have a link displayed in the " +"If you have a local support forum and want to have a link displayed in the " "widget, check this box." -msgstr "Jeśli posiadasz lokalną grupę pomocy i chcesz wyświetlać link do niej na widżecie, zaznacz tę opcję." +msgstr "Jeżeli masz lokalne wsparcie forum i chcesz mieć łącze wyświetlane w widżecie, zaznacz to pole wyboru." -#: newmemberwidget.php:66 +#: newmemberwidget.php:69 msgid "Name of the local support group" -msgstr "Alias lokalnej grupy pomocy" +msgstr "Nazwa grupy lokalnej pomocy technicznej" -#: newmemberwidget.php:66 +#: newmemberwidget.php:69 msgid "" "If you checked the above, specify the nickname of the local support" " group here (i.e. helpers)" -msgstr "Jeśli zaznaczyłeś powyższe, podaj tutaj alias lokalnej grupy pomocy (np. pomocnicy)" +msgstr "Jeśli zaznaczyłeś powyższe, określ tutaj pseudonim lokalnej grupy wsparcia (np. Pomocnicy)" diff --git a/newmemberwidget/lang/pl/strings.php b/newmemberwidget/lang/pl/strings.php index d46c671e..97103add 100644 --- a/newmemberwidget/lang/pl/strings.php +++ b/newmemberwidget/lang/pl/strings.php @@ -7,14 +7,14 @@ function string_plural_select_pl($n){ }} $a->strings['New Member'] = 'Nowy użytkownik'; $a->strings['Tips for New Members'] = 'Wskazówki dla nowych użytkowników'; -$a->strings['Global Support Group'] = 'Globalna Grupa Pomocy'; -$a->strings['Local Support Group'] = 'Lokalna Grupa Pomocy'; +$a->strings['Global Support Forum'] = 'Globalne forum pomocy technicznej'; +$a->strings['Local Support Forum'] = 'Lokalne Forum Wsparcia'; $a->strings['Save Settings'] = 'Zapisz ustawienia'; $a->strings['Message'] = 'Wiadomość'; $a->strings['Your message for new members. You can use bbcode here.'] = 'Twoja wiadomość dla nowych członków. Możesz tutaj użyć bbcode.'; -$a->strings['Add a link to global support group'] = 'Dodaj link do globalnej grupy pomocy'; -$a->strings['Should a link to the global support group be displayed?'] = 'Czy link do globalnej grupy pomocy powinien być wyświetlany?'; -$a->strings['Add a link to the local support group'] = 'Dodaj link do lokalnej grupy pomocy'; -$a->strings['If you have a local support group and want to have a link displayed in the widget, check this box.'] = 'Jeśli posiadasz lokalną grupę pomocy i chcesz wyświetlać link do niej na widżecie, zaznacz tę opcję.'; -$a->strings['Name of the local support group'] = 'Alias lokalnej grupy pomocy'; -$a->strings['If you checked the above, specify the nickname of the local support group here (i.e. helpers)'] = 'Jeśli zaznaczyłeś powyższe, podaj tutaj alias lokalnej grupy pomocy (np. pomocnicy)'; +$a->strings['Add a link to global support forum'] = 'Dodaj odnośnik do globalnego forum pomocy technicznej'; +$a->strings['Should a link to the global support forum be displayed?'] = 'Czy powinien być wyświetlany odnośnik do globalnego forum pomocy technicznej?'; +$a->strings['Add a link to the local support forum'] = 'Dodaj odnośnik do lokalnego forum pomocy technicznej'; +$a->strings['If you have a local support forum and want to have a link displayed in the widget, check this box.'] = 'Jeżeli masz lokalne wsparcie forum i chcesz mieć łącze wyświetlane w widżecie, zaznacz to pole wyboru.'; +$a->strings['Name of the local support group'] = 'Nazwa grupy lokalnej pomocy technicznej'; +$a->strings['If you checked the above, specify the nickname of the local support group here (i.e. helpers)'] = 'Jeśli zaznaczyłeś powyższe, określ tutaj pseudonim lokalnej grupy wsparcia (np. Pomocnicy)'; diff --git a/newmemberwidget/lang/ru/messages.po b/newmemberwidget/lang/ru/messages.po index 1fe611e9..94d61e3f 100644 --- a/newmemberwidget/lang/ru/messages.po +++ b/newmemberwidget/lang/ru/messages.po @@ -9,67 +9,67 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:50-0400\n" -"PO-Revision-Date: 2014-06-23 10:26+0000\n" -"Last-Translator: Alexander An , 2020\n" -"Language-Team: Russian (http://app.transifex.com/Friendica/friendica/language/ru/)\n" +"POT-Creation-Date: 2014-06-01 14:12+0200\n" +"PO-Revision-Date: 2020-04-23 14:23+0000\n" +"Last-Translator: Alexander An \n" +"Language-Team: Russian (http://www.transifex.com/Friendica/friendica/language/ru/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: ru\n" "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" -#: newmemberwidget.php:29 +#: newmemberwidget.php:21 msgid "New Member" msgstr "Новичок" -#: newmemberwidget.php:30 +#: newmemberwidget.php:22 msgid "Tips for New Members" msgstr "Советы новичкам" -#: newmemberwidget.php:33 -msgid "Global Support Group" -msgstr "" +#: newmemberwidget.php:24 +msgid "Global Support Forum" +msgstr "Общий форум поддержки" -#: newmemberwidget.php:37 -msgid "Local Support Group" -msgstr "" +#: newmemberwidget.php:26 +msgid "Local Support Forum" +msgstr "Местный форум поддержки" -#: newmemberwidget.php:62 +#: newmemberwidget.php:49 msgid "Save Settings" msgstr "Сохранить настройки" -#: newmemberwidget.php:63 +#: newmemberwidget.php:50 msgid "Message" msgstr "Сообщение" -#: newmemberwidget.php:63 +#: newmemberwidget.php:50 msgid "Your message for new members. You can use bbcode here." msgstr "Ваше сообщение новичкам. Вы можете использовать BBCode." -#: newmemberwidget.php:64 -msgid "Add a link to global support group" -msgstr "" +#: newmemberwidget.php:51 +msgid "Add a link to global support forum" +msgstr "Добавить ссылку на общий форум поддержки" -#: newmemberwidget.php:64 -msgid "Should a link to the global support group be displayed?" -msgstr "" +#: newmemberwidget.php:51 +msgid "Should a link to the global support forum be displayed?" +msgstr "Показывать ссылку на общий форум поддержки?" -#: newmemberwidget.php:65 -msgid "Add a link to the local support group" -msgstr "" +#: newmemberwidget.php:52 +msgid "Add a link to the local support forum" +msgstr "Добавить ссылку на местный форум поддержки" -#: newmemberwidget.php:65 +#: newmemberwidget.php:52 msgid "" -"If you have a local support group and want to have a link displayed in the " +"If you have a local support forum and wand to have a link displayed in the " "widget, check this box." -msgstr "" +msgstr "Если у вас есть местный форум поддержки и вы хотите добавить ссылку на него, включите это." -#: newmemberwidget.php:66 +#: newmemberwidget.php:53 msgid "Name of the local support group" msgstr "Название местной группы поддержки" -#: newmemberwidget.php:66 +#: newmemberwidget.php:53 msgid "" "If you checked the above, specify the nickname of the local support" " group here (i.e. helpers)" diff --git a/newmemberwidget/lang/ru/strings.php b/newmemberwidget/lang/ru/strings.php index 6f27bb1a..7992e64b 100644 --- a/newmemberwidget/lang/ru/strings.php +++ b/newmemberwidget/lang/ru/strings.php @@ -7,8 +7,14 @@ function string_plural_select_ru($n){ }} $a->strings['New Member'] = 'Новичок'; $a->strings['Tips for New Members'] = 'Советы новичкам'; +$a->strings['Global Support Forum'] = 'Общий форум поддержки'; +$a->strings['Local Support Forum'] = 'Местный форум поддержки'; $a->strings['Save Settings'] = 'Сохранить настройки'; $a->strings['Message'] = 'Сообщение'; $a->strings['Your message for new members. You can use bbcode here.'] = 'Ваше сообщение новичкам. Вы можете использовать BBCode.'; +$a->strings['Add a link to global support forum'] = 'Добавить ссылку на общий форум поддержки'; +$a->strings['Should a link to the global support forum be displayed?'] = 'Показывать ссылку на общий форум поддержки?'; +$a->strings['Add a link to the local support forum'] = 'Добавить ссылку на местный форум поддержки'; +$a->strings['If you have a local support forum and wand to have a link displayed in the widget, check this box.'] = 'Если у вас есть местный форум поддержки и вы хотите добавить ссылку на него, включите это.'; $a->strings['Name of the local support group'] = 'Название местной группы поддержки'; $a->strings['If you checked the above, specify the nickname of the local support group here (i.e. helpers)'] = 'Если вы включили настройку выше, укажите никместной группы поддержки пользователей.'; diff --git a/newmemberwidget/lang/sv/messages.po b/newmemberwidget/lang/sv/messages.po index a1a6167a..0d6171b2 100644 --- a/newmemberwidget/lang/sv/messages.po +++ b/newmemberwidget/lang/sv/messages.po @@ -9,10 +9,10 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:50-0400\n" -"PO-Revision-Date: 2014-06-23 10:26+0000\n" -"Last-Translator: Kristoffer Grundström , 2022\n" -"Language-Team: Swedish (http://app.transifex.com/Friendica/friendica/language/sv/)\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" +"PO-Revision-Date: 2022-01-16 00:48+0000\n" +"Last-Translator: Kristoffer Grundström \n" +"Language-Team: Swedish (http://www.transifex.com/Friendica/friendica/language/sv/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -28,48 +28,48 @@ msgid "Tips for New Members" msgstr "Tips för nya medlemmar" #: newmemberwidget.php:33 -msgid "Global Support Group" +msgid "Global Support Forum" msgstr "" #: newmemberwidget.php:37 -msgid "Local Support Group" -msgstr "" +msgid "Local Support Forum" +msgstr "Lokalt hjälpforum" -#: newmemberwidget.php:62 +#: newmemberwidget.php:65 msgid "Save Settings" msgstr "Spara inställningar" -#: newmemberwidget.php:63 +#: newmemberwidget.php:66 msgid "Message" msgstr "Meddelande" -#: newmemberwidget.php:63 +#: newmemberwidget.php:66 msgid "Your message for new members. You can use bbcode here." msgstr "" -#: newmemberwidget.php:64 -msgid "Add a link to global support group" +#: newmemberwidget.php:67 +msgid "Add a link to global support forum" msgstr "" -#: newmemberwidget.php:64 -msgid "Should a link to the global support group be displayed?" +#: newmemberwidget.php:67 +msgid "Should a link to the global support forum be displayed?" msgstr "" -#: newmemberwidget.php:65 -msgid "Add a link to the local support group" +#: newmemberwidget.php:68 +msgid "Add a link to the local support forum" msgstr "" -#: newmemberwidget.php:65 +#: newmemberwidget.php:68 msgid "" -"If you have a local support group and want to have a link displayed in the " +"If you have a local support forum and want to have a link displayed in the " "widget, check this box." msgstr "" -#: newmemberwidget.php:66 +#: newmemberwidget.php:69 msgid "Name of the local support group" msgstr "" -#: newmemberwidget.php:66 +#: newmemberwidget.php:69 msgid "" "If you checked the above, specify the nickname of the local support" " group here (i.e. helpers)" diff --git a/newmemberwidget/lang/sv/strings.php b/newmemberwidget/lang/sv/strings.php index e92a428f..38292306 100644 --- a/newmemberwidget/lang/sv/strings.php +++ b/newmemberwidget/lang/sv/strings.php @@ -7,5 +7,6 @@ function string_plural_select_sv($n){ }} $a->strings['New Member'] = 'Ny medlem'; $a->strings['Tips for New Members'] = 'Tips för nya medlemmar'; +$a->strings['Local Support Forum'] = 'Lokalt hjälpforum'; $a->strings['Save Settings'] = 'Spara inställningar'; $a->strings['Message'] = 'Meddelande'; diff --git a/newmemberwidget/newmemberwidget.php b/newmemberwidget/newmemberwidget.php index ba7dfb39..5689971b 100644 --- a/newmemberwidget/newmemberwidget.php +++ b/newmemberwidget/newmemberwidget.php @@ -6,16 +6,17 @@ * Author: Tobias Diekershoff ***/ +use Friendica\App; use Friendica\Content\Text\BBCode; use Friendica\Core\Hook; +use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; -use Friendica\Model\User; function newmemberwidget_install() { Hook::register( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init'); - DI::logger()->notice('newmemberwidget installed'); + Logger::notice('newmemberwidget installed'); } function newmemberwidget_network_mod_init ($b) @@ -29,16 +30,16 @@ function newmemberwidget_network_mod_init ($b) $t .= '' . DI::l10n()->t('Tips for New Members') . '
'; if (DI::config()->get('newmemberwidget','linkglobalsupport', false)) { - $t .= '' . DI::l10n()->t('Global Support Group') . '
'; + $t .= ''.DI::l10n()->t('Global Support Forum').'
'; } if (DI::config()->get('newmemberwidget','linklocalsupport', false)) { - $t .= '' . DI::l10n()->t('Local Support Group') . '
'; + $t .= ''.DI::l10n()->t('Local Support Forum').'
'; } $ft = DI::config()->get('newmemberwidget','freetext', ''); if (!empty($ft)) { - $t .= '

'.BBCode::convertForUriId(User::getSystemUriId(), trim($ft)).'

'; + $t .= '

'.BBCode::convert(trim($ft)).'

'; } $t .= '
'; @@ -60,8 +61,8 @@ function newmemberwidget_addon_admin(string &$o) $o = Renderer::replaceMacros($t, [ '$submit' => DI::l10n()->t('Save Settings'), '$freetext' => ["freetext", DI::l10n()->t("Message"), DI::config()->get("newmemberwidget", "freetext"), DI::l10n()->t("Your message for new members. You can use bbcode here.")], - '$linkglobalsupport' => ["linkglobalsupport", DI::l10n()->t('Add a link to global support group'), DI::config()->get('newmemberwidget', 'linkglobalsupport'), DI::l10n()->t('Should a link to the global support group be displayed?')." (@helpers)"], - '$linklocalsupport' => ["linklocalsupport", DI::l10n()->t('Add a link to the local support group'), DI::config()->get('newmemberwidget', 'linklocalsupport'), DI::l10n()->t('If you have a local support group and want to have a link displayed in the widget, check this box.')], + '$linkglobalsupport' => ["linkglobalsupport", DI::l10n()->t('Add a link to global support forum'), DI::config()->get('newmemberwidget', 'linkglobalsupport'), DI::l10n()->t('Should a link to the global support forum be displayed?')." (@helpers)"], + '$linklocalsupport' => ["linklocalsupport", DI::l10n()->t('Add a link to the local support forum'), DI::config()->get('newmemberwidget', 'linklocalsupport'), DI::l10n()->t('If you have a local support forum and want to have a link displayed in the widget, check this box.')], '$localsupportname' => ["localsupportname", DI::l10n()->t('Name of the local support group'), DI::config()->get('newmemberwidget', 'localsupport'), DI::l10n()->t('If you checked the above, specify the nickname of the local support group here (i.e. helpers)')], ]); } diff --git a/nitter/nitter.php b/nitter/nitter.php index adbfd6b0..e9454c5d 100644 --- a/nitter/nitter.php +++ b/nitter/nitter.php @@ -4,20 +4,18 @@ * Description: Replaces links to twitter.com to a nitter server in all displays of postings on a node. * Version: 2.0 * Author: Tobias Diekershoff - * Status: Unsupported - * Note: Please use the URL Replace addon instead * * Copyright (c) 2020 Tobias Diekershoff * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and * associated documentation files (the "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be included in all copies or substantial * portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, @@ -25,6 +23,7 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +use Friendica\App; use Friendica\Core\Hook; use Friendica\Core\Renderer; use Friendica\DI; @@ -50,7 +49,7 @@ function nitter_addon_admin(string &$o) $t = Renderer::getMarkupTemplate('admin.tpl', 'addon/nitter/'); $o = Renderer::replaceMacros($t, [ '$settingdescription' => DI::l10n()->t('Which nitter server shall be used for the replacements in the post bodies? Use the URL with servername and protocol. See %s for a list of available public Nitter servers.', 'https://github.com/zedeus/nitter/wiki/Instances'), - '$nitterserver' => ['nitterserver', DI::l10n()->t('Nitter server'), $nitterserver, 'https://example.com'], + '$nitterserver' => ['nitterserver', DI::l10n()->t('Nitter server'), $nitterserver, 'https://example.com'], '$submit' => DI::l10n()->t('Save Settings'), ]); } diff --git a/nominatim/nominatim.php b/nominatim/nominatim.php index 3a567b7b..6ad4a8a3 100644 --- a/nominatim/nominatim.php +++ b/nominatim/nominatim.php @@ -6,7 +6,9 @@ * Author: Michael Vogel */ +use Friendica\App; use Friendica\Core\Hook; +use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; @@ -44,19 +46,19 @@ function nominatim_resolve_item(array &$item) $s = DI::httpClient()->fetch('https://nominatim.openstreetmap.org/reverse?lat=' . $coords[0] . '&lon=' . $coords[1] . '&format=json&addressdetails=0&accept-language=' . $language); if (empty($s)) { - DI::logger()->info('API could not be queried'); + Logger::info('API could not be queried'); return; } $data = json_decode($s, true); if (empty($data['display_name'])) { - DI::logger()->info('No results found for coordinates', ['coordinates' => $item['coord'], 'data' => $data]); + Logger::info('No results found for coordinates', ['coordinates' => $item['coord'], 'data' => $data]); return; } $item['location'] = $data['display_name']; - DI::logger()->info('Got location', ['lat' => $coords[0], 'long' => $coords[1], 'location' => $item['location']]); + Logger::info('Got location', ['lat' => $coords[0], 'long' => $coords[1], 'location' => $item['location']]); if (!empty($item['location'])) { DI::cache()->set('nominatim:' . $language . ':' . $coords[0] . '-' . $coords[1], $item['location']); diff --git a/notifyall/NotifyAllEmail.php b/notifyall/NotifyAllEmail.php index 7a00a2c9..abdb9549 100644 --- a/notifyall/NotifyAllEmail.php +++ b/notifyall/NotifyAllEmail.php @@ -25,7 +25,6 @@ use Friendica\App\BaseURL; use Friendica\Content\Text\BBCode; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; -use Friendica\Model\User; use Friendica\Object\Email; /** @@ -44,16 +43,16 @@ class NotifyAllEmail extends Email } if (!$config->get('config', 'sender_email')) { - $sender_email = 'noreply@' . $baseUrl->getHost(); + $sender_email = 'noreply@' . $baseUrl->getHostname(); } else { $sender_email = $config->get('config', 'sender_email'); } $subject = $_REQUEST['subject']; - $textversion = strip_tags(html_entity_decode(BBCode::convertForUriId(User::getSystemUriId(), stripslashes(str_replace(["\\r", "\\n"], ["", "\n"], $text))), ENT_QUOTES, 'UTF-8')); + $textversion = strip_tags(html_entity_decode(BBCode::convert(stripslashes(str_replace(["\\r", "\\n"], ["", "\n"], $text))), ENT_QUOTES, 'UTF-8')); - $htmlversion = BBCode::convertForUriId(User::getSystemUriId(), stripslashes(str_replace(["\\r", "\\n"], ["", "
\n"], $text))); + $htmlversion = BBCode::convert(stripslashes(str_replace(["\\r", "\\n"], ["", "
\n"], $text))); parent::__construct($sender_name, $sender_email, $sender_email, '', $subject, $htmlversion, $textversion); } diff --git a/notifyall/lang/bg/messages.po b/notifyall/lang/bg/messages.po deleted file mode 100644 index fcb0ddec..00000000 --- a/notifyall/lang/bg/messages.po +++ /dev/null @@ -1,56 +0,0 @@ -# ADDON notifyall -# Copyright (C) -# This file is distributed under the same license as the Friendica notifyall addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2016-08-14 19:29+0000\n" -"Language-Team: Bulgarian (https://app.transifex.com/Friendica/teams/12172/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: NotifyAllEmail.php:40 -#, php-format -msgid "%s Administrator" -msgstr "" - -#: NotifyAllEmail.php:42 -#, php-format -msgid "%1$s, %2$s Administrator" -msgstr "" - -#: notifyall.php:22 -msgid "Send email to all members" -msgstr "" - -#: notifyall.php:49 -msgid "No recipients found." -msgstr "" - -#: notifyall.php:59 -msgid "Emails sent" -msgstr "" - -#: notifyall.php:69 -msgid "Send email to all members of this Friendica instance." -msgstr "" - -#: notifyall.php:74 -msgid "Message subject" -msgstr "" - -#: notifyall.php:75 -msgid "Test mode (only send to administrator)" -msgstr "" - -#: notifyall.php:76 -msgid "Submit" -msgstr "" diff --git a/notifyall/lang/bg/strings.php b/notifyall/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/notifyall/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -, 2019\n" -"Language-Team: German (https://app.transifex.com/Friendica/teams/12172/de/)\n" +"Language-Team: German (https://www.transifex.com/Friendica/teams/12172/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/notifyall/lang/eo/messages.po b/notifyall/lang/eo/messages.po deleted file mode 100644 index 897c3ace..00000000 --- a/notifyall/lang/eo/messages.po +++ /dev/null @@ -1,56 +0,0 @@ -# ADDON notifyall -# Copyright (C) -# This file is distributed under the same license as the Friendica notifyall addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2016-08-14 19:29+0000\n" -"Language-Team: Esperanto (https://app.transifex.com/Friendica/teams/12172/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: NotifyAllEmail.php:40 -#, php-format -msgid "%s Administrator" -msgstr "" - -#: NotifyAllEmail.php:42 -#, php-format -msgid "%1$s, %2$s Administrator" -msgstr "" - -#: notifyall.php:22 -msgid "Send email to all members" -msgstr "" - -#: notifyall.php:49 -msgid "No recipients found." -msgstr "" - -#: notifyall.php:59 -msgid "Emails sent" -msgstr "" - -#: notifyall.php:69 -msgid "Send email to all members of this Friendica instance." -msgstr "" - -#: notifyall.php:74 -msgid "Message subject" -msgstr "" - -#: notifyall.php:75 -msgid "Test mode (only send to administrator)" -msgstr "" - -#: notifyall.php:76 -msgid "Submit" -msgstr "" diff --git a/notifyall/lang/eo/strings.php b/notifyall/lang/eo/strings.php deleted file mode 100644 index 68e8a64c..00000000 --- a/notifyall/lang/eo/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -strings['Submit'] = 'Saada'; diff --git a/notifyall/lang/gd/messages.po b/notifyall/lang/gd/messages.po deleted file mode 100644 index e4b216b4..00000000 --- a/notifyall/lang/gd/messages.po +++ /dev/null @@ -1,56 +0,0 @@ -# ADDON notifyall -# Copyright (C) -# This file is distributed under the same license as the Friendica notifyall addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2016-08-14 19:29+0000\n" -"Language-Team: Gaelic, Scottish (https://app.transifex.com/Friendica/teams/12172/gd/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gd\n" -"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" - -#: NotifyAllEmail.php:40 -#, php-format -msgid "%s Administrator" -msgstr "" - -#: NotifyAllEmail.php:42 -#, php-format -msgid "%1$s, %2$s Administrator" -msgstr "" - -#: notifyall.php:22 -msgid "Send email to all members" -msgstr "" - -#: notifyall.php:49 -msgid "No recipients found." -msgstr "" - -#: notifyall.php:59 -msgid "Emails sent" -msgstr "" - -#: notifyall.php:69 -msgid "Send email to all members of this Friendica instance." -msgstr "" - -#: notifyall.php:74 -msgid "Message subject" -msgstr "" - -#: notifyall.php:75 -msgid "Test mode (only send to administrator)" -msgstr "" - -#: notifyall.php:76 -msgid "Submit" -msgstr "" diff --git a/notifyall/lang/gd/strings.php b/notifyall/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/notifyall/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/notifyall/lang/hu/messages.po b/notifyall/lang/hu/messages.po index 8d030ab8..808d22ea 100644 --- a/notifyall/lang/hu/messages.po +++ b/notifyall/lang/hu/messages.po @@ -14,7 +14,7 @@ msgstr "" "POT-Creation-Date: 2021-02-01 18:15+0100\n" "PO-Revision-Date: 2016-08-14 19:29+0000\n" "Last-Translator: Balázs Úr, 2021\n" -"Language-Team: Hungarian (https://app.transifex.com/Friendica/teams/12172/hu/)\n" +"Language-Team: Hungarian (https://www.transifex.com/Friendica/teams/12172/hu/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/notifyall/lang/is/messages.po b/notifyall/lang/is/messages.po deleted file mode 100644 index bfe6c822..00000000 --- a/notifyall/lang/is/messages.po +++ /dev/null @@ -1,56 +0,0 @@ -# ADDON notifyall -# Copyright (C) -# This file is distributed under the same license as the Friendica notifyall addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2016-08-14 19:29+0000\n" -"Language-Team: Icelandic (https://app.transifex.com/Friendica/teams/12172/is/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: is\n" -"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" - -#: NotifyAllEmail.php:40 -#, php-format -msgid "%s Administrator" -msgstr "" - -#: NotifyAllEmail.php:42 -#, php-format -msgid "%1$s, %2$s Administrator" -msgstr "" - -#: notifyall.php:22 -msgid "Send email to all members" -msgstr "" - -#: notifyall.php:49 -msgid "No recipients found." -msgstr "" - -#: notifyall.php:59 -msgid "Emails sent" -msgstr "" - -#: notifyall.php:69 -msgid "Send email to all members of this Friendica instance." -msgstr "" - -#: notifyall.php:74 -msgid "Message subject" -msgstr "" - -#: notifyall.php:75 -msgid "Test mode (only send to administrator)" -msgstr "" - -#: notifyall.php:76 -msgid "Submit" -msgstr "" diff --git a/notifyall/lang/is/strings.php b/notifyall/lang/is/strings.php deleted file mode 100644 index 975c341e..00000000 --- a/notifyall/lang/is/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -, 2017\n" -"Language-Team: Italian (https://app.transifex.com/Friendica/teams/12172/it/)\n" +"Language-Team: Italian (https://www.transifex.com/Friendica/teams/12172/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: NotifyAllEmail.php:40 #, php-format diff --git a/notifyall/lang/it/strings.php b/notifyall/lang/it/strings.php index 630f693a..0d719df1 100644 --- a/notifyall/lang/it/strings.php +++ b/notifyall/lang/it/strings.php @@ -3,7 +3,7 @@ if(! function_exists("string_plural_select_it")) { function string_plural_select_it($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} $a->strings['%s Administrator'] = 'Amministratore %s'; $a->strings['%1$s, %2$s Administrator'] = '%1$s, amministratore di %2$s'; diff --git a/notifyall/notifyall.php b/notifyall/notifyall.php index f814c4f5..0c291f04 100644 --- a/notifyall/notifyall.php +++ b/notifyall/notifyall.php @@ -9,7 +9,9 @@ */ use Friendica\Addon\notifyall\NotifyAllEmail; +use Friendica\App; use Friendica\Database\DBA; +use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; @@ -22,7 +24,7 @@ function notifyall_module() {} function notifyall_addon_admin(string &$o) { - $o = '
    ' . DI::l10n()->t('Send email to all members') . '
'; + $o = '
    ' . DI::l10n()->t('Send email to all members') . '
'; } @@ -57,7 +59,7 @@ function notifyall_post() $notifyEmail = new NotifyAllEmail(DI::l10n(), DI::config(), DI::baseUrl(), $text); - foreach (DBA::toArray($recipients) as $recipient) { + foreach ($recipients as $recipient) { DI::emailer()->send($notifyEmail->withRecipient($recipient['email'])); } diff --git a/nsfw/lang/bg/messages.po b/nsfw/lang/bg/messages.po deleted file mode 100644 index e53d0c5f..00000000 --- a/nsfw/lang/bg/messages.po +++ /dev/null @@ -1,60 +0,0 @@ -# ADDON nsfw -# Copyright (C) -# This file is distributed under the same license as the Friendica nsfw addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-10 14:42-0500\n" -"PO-Revision-Date: 2014-06-23 10:34+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: nsfw.php:65 -msgid "" -"This addon searches for specified words/text in posts and collapses them. It" -" can be used to filter content tagged with for instance #NSFW that may be " -"deemed inappropriate at certain times or places, such as being at work. It " -"is also useful for hiding irrelevant or annoying content from direct view." -msgstr "" - -#: nsfw.php:66 -msgid "Enable Content filter" -msgstr "" - -#: nsfw.php:67 -msgid "Comma separated list of keywords to hide" -msgstr "" - -#: nsfw.php:67 -msgid "" -"Use /expression/ to provide regular expressions, #tag to specfically match " -"hashtags (case-insensitive), or regular words (case-sensitive)" -msgstr "" - -#: nsfw.php:72 -msgid "Content Filter (NSFW and more)" -msgstr "" - -#: nsfw.php:96 -#, php-format -msgid "Regular expression \"%s\" fails to compile" -msgstr "" - -#: nsfw.php:154 -#, php-format -msgid "Filtered tag: %s" -msgstr "" - -#: nsfw.php:156 -#, php-format -msgid "Filtered word: %s" -msgstr "" diff --git a/nsfw/lang/bg/strings.php b/nsfw/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/nsfw/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: nsfw.php:65 -msgid "" -"This addon searches for specified words/text in posts and collapses them. It" -" can be used to filter content tagged with for instance #NSFW that may be " -"deemed inappropriate at certain times or places, such as being at work. It " -"is also useful for hiding irrelevant or annoying content from direct view." -msgstr "" - -#: nsfw.php:66 -msgid "Enable Content filter" -msgstr "" - -#: nsfw.php:67 -msgid "Comma separated list of keywords to hide" -msgstr "" - -#: nsfw.php:67 -msgid "" -"Use /expression/ to provide regular expressions, #tag to specfically match " -"hashtags (case-insensitive), or regular words (case-sensitive)" -msgstr "" - -#: nsfw.php:72 -msgid "Content Filter (NSFW and more)" -msgstr "" - -#: nsfw.php:96 -#, php-format -msgid "Regular expression \"%s\" fails to compile" -msgstr "" - -#: nsfw.php:154 -#, php-format -msgid "Filtered tag: %s" -msgstr "" - -#: nsfw.php:156 -#, php-format -msgid "Filtered word: %s" -msgstr "" diff --git a/nsfw/lang/ca/strings.php b/nsfw/lang/ca/strings.php index d34874f6..349ffefd 100644 --- a/nsfw/lang/ca/strings.php +++ b/nsfw/lang/ca/strings.php @@ -1,7 +1,10 @@ -strings["Not Safe For Work (General Purpose Content Filter) settings"] = "Ajustos, Not Safe For Work (Filtre de Contingut de Propòsit General)"; +$a->strings["This addon looks in posts for the words/text you specify below, and collapses any content containing those keywords so it is not displayed at inappropriate times, such as sexual innuendo that may be improper in a work setting. It is polite and recommended to tag any content containing nudity with #NSFW. This filter can also match any other word/text you specify, and can thereby be used as a general purpose content filter."] = "Aquest addon es veu en enviaments amb les paraules/text que s'especifiquen a continuació , i amagarà qualsevol contingut que contingui les paraules clau de manera que no apareguin en moments inapropiats, com ara insinuacions sexuals que poden ser inadequades en un entorn de treball. És de bona educació i es recomana etiquetar qualsevol contingut que contingui nus amb #NSFW. Aquest filtre també es pot fer coincidir amb qualsevol paraula/text que especifiqueu, i per tant pot ser utilitzat com un filtre general de contingut."; +$a->strings["Enable Content filter"] = "Activat el filtre de Contingut"; +$a->strings["Comma separated list of keywords to hide"] = "Llista separada per comes de paraules clau per ocultar"; +$a->strings["Submit"] = "Enviar"; +$a->strings["Use /expression/ to provide regular expressions"] = "Emprar /expressió/ per a proporcionar expressions regulars"; +$a->strings["NSFW Settings saved."] = "Configuració NSFW guardada."; +$a->strings["%s - Click to open/close"] = "%s - Clicar per obrir/tancar"; diff --git a/nsfw/lang/cs/messages.po b/nsfw/lang/cs/messages.po index 34a931ad..fc585d80 100644 --- a/nsfw/lang/cs/messages.po +++ b/nsfw/lang/cs/messages.po @@ -11,17 +11,21 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-10 14:42-0500\n" -"PO-Revision-Date: 2014-06-23 10:34+0000\n" -"Last-Translator: Aditoo, 2018\n" -"Language-Team: Czech (http://app.transifex.com/Friendica/friendica/language/cs/)\n" +"POT-Creation-Date: 2018-04-01 11:11-0400\n" +"PO-Revision-Date: 2018-08-16 10:09+0000\n" +"Last-Translator: Aditoo\n" +"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" "Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" -#: nsfw.php:65 +#: nsfw.php:77 nsfw.php:81 +msgid "Content Filter (NSFW and more)" +msgstr "Filtr obsahu (citlivý obsah a další)" + +#: nsfw.php:85 msgid "" "This addon searches for specified words/text in posts and collapses them. It" " can be used to filter content tagged with for instance #NSFW that may be " @@ -29,35 +33,32 @@ msgid "" "is also useful for hiding irrelevant or annoying content from direct view." msgstr "Tento doplněk vyhledává specifikovaná slova/text v příspěvcích a skrývá je. Může být použit pro filtrování obsahu označeného štítky, jako například #NSFW, který může být považován za nevhodný v určitých časech či místech, například když jste v práci. Může být také užitečný ke skrývání nepodstatného či nepříjemného obsahu z přímého pohledu." -#: nsfw.php:66 +#: nsfw.php:86 msgid "Enable Content filter" msgstr "Povolit filtr obsahu" -#: nsfw.php:67 +#: nsfw.php:89 msgid "Comma separated list of keywords to hide" -msgstr "Seznam klíčových slov ke skrytí, oddělených čárkami" +msgstr "Čárkou oddělený seznam klíčových slov ke skrytí" -#: nsfw.php:67 -msgid "" -"Use /expression/ to provide regular expressions, #tag to specfically match " -"hashtags (case-insensitive), or regular words (case-sensitive)" -msgstr "" +#: nsfw.php:93 +msgid "Save Settings" +msgstr "Uložit nastavení" -#: nsfw.php:72 -msgid "Content Filter (NSFW and more)" -msgstr "Filtr obsahu (citlivý obsah a další)" +#: nsfw.php:94 +msgid "Use /expression/ to provide regular expressions" +msgstr "Použijte /výraz/ pro použití regulárních výrazů" -#: nsfw.php:96 -#, php-format -msgid "Regular expression \"%s\" fails to compile" -msgstr "" +#: nsfw.php:109 +msgid "NSFW Settings saved." +msgstr "Nastavení NSFW uloženo" -#: nsfw.php:154 +#: nsfw.php:162 #, php-format msgid "Filtered tag: %s" -msgstr "Filtrovaný štítek: %s" +msgstr "Filtrovaná značka: %s" -#: nsfw.php:156 +#: nsfw.php:164 #, php-format msgid "Filtered word: %s" msgstr "Filtrované slovo: %s" diff --git a/nsfw/lang/cs/strings.php b/nsfw/lang/cs/strings.php index 4898f2f1..8b5fccca 100644 --- a/nsfw/lang/cs/strings.php +++ b/nsfw/lang/cs/strings.php @@ -5,9 +5,12 @@ function string_plural_select_cs($n){ $n = intval($n); if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; } }} +$a->strings['Content Filter (NSFW and more)'] = 'Filtr obsahu (citlivý obsah a další)'; $a->strings['This addon searches for specified words/text in posts and collapses them. It can be used to filter content tagged with for instance #NSFW that may be deemed inappropriate at certain times or places, such as being at work. It is also useful for hiding irrelevant or annoying content from direct view.'] = 'Tento doplněk vyhledává specifikovaná slova/text v příspěvcích a skrývá je. Může být použit pro filtrování obsahu označeného štítky, jako například #NSFW, který může být považován za nevhodný v určitých časech či místech, například když jste v práci. Může být také užitečný ke skrývání nepodstatného či nepříjemného obsahu z přímého pohledu.'; $a->strings['Enable Content filter'] = 'Povolit filtr obsahu'; -$a->strings['Comma separated list of keywords to hide'] = 'Seznam klíčových slov ke skrytí, oddělených čárkami'; -$a->strings['Content Filter (NSFW and more)'] = 'Filtr obsahu (citlivý obsah a další)'; -$a->strings['Filtered tag: %s'] = 'Filtrovaný štítek: %s'; +$a->strings['Comma separated list of keywords to hide'] = 'Čárkou oddělený seznam klíčových slov ke skrytí'; +$a->strings['Save Settings'] = 'Uložit nastavení'; +$a->strings['Use /expression/ to provide regular expressions'] = 'Použijte /výraz/ pro použití regulárních výrazů'; +$a->strings['NSFW Settings saved.'] = 'Nastavení NSFW uloženo'; +$a->strings['Filtered tag: %s'] = 'Filtrovaná značka: %s'; $a->strings['Filtered word: %s'] = 'Filtrované slovo: %s'; diff --git a/nsfw/lang/de/messages.po b/nsfw/lang/de/messages.po index 4fefb60c..350b2bbe 100644 --- a/nsfw/lang/de/messages.po +++ b/nsfw/lang/de/messages.po @@ -6,7 +6,6 @@ # Translators: # Andreas H., 2014 # hoergen , 2018 -# foss , 2022 # Tobias Diekershoff , 2014 # Tobias Diekershoff , 2018,2022 # Ulf Rompe , 2019 @@ -14,10 +13,10 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-10 14:42-0500\n" +"POT-Creation-Date: 2022-11-18 11:57-0500\n" "PO-Revision-Date: 2014-06-23 10:34+0000\n" -"Last-Translator: foss , 2022\n" -"Language-Team: German (http://app.transifex.com/Friendica/friendica/language/de/)\n" +"Last-Translator: Tobias Diekershoff , 2018,2022\n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -50,17 +49,12 @@ msgstr "Verwende /ausdruck/ für reguläre Ausdrücke, #tag um einen speziellen msgid "Content Filter (NSFW and more)" msgstr "Inhaltsfilter (NSFW und mehr)" -#: nsfw.php:96 -#, php-format -msgid "Regular expression \"%s\" fails to compile" -msgstr "Regulärer Ausdruck \"%s\" schlägt beim Kompiliern fehl." - -#: nsfw.php:154 +#: nsfw.php:140 #, php-format msgid "Filtered tag: %s" msgstr "Gefiltertes Schlagwort: %s" -#: nsfw.php:156 +#: nsfw.php:142 #, php-format msgid "Filtered word: %s" msgstr "Gefilterter Begriff: %s" diff --git a/nsfw/lang/de/strings.php b/nsfw/lang/de/strings.php index 9e0546ad..e538e37c 100644 --- a/nsfw/lang/de/strings.php +++ b/nsfw/lang/de/strings.php @@ -10,6 +10,5 @@ $a->strings['Enable Content filter'] = 'Aktiviere den Inhaltsfilter'; $a->strings['Comma separated list of keywords to hide'] = 'Durch Kommata getrennte Liste von Schlüsselwörtern, die verborgen werden sollen'; $a->strings['Use /expression/ to provide regular expressions, #tag to specfically match hashtags (case-insensitive), or regular words (case-sensitive)'] = 'Verwende /ausdruck/ für reguläre Ausdrücke, #tag um einen speziellen Hashtag zu filtern (unabhängig von der Groß- und Kleinschreibung) oder einfache Wörter (Groß- und Kleinschreibung beachten).'; $a->strings['Content Filter (NSFW and more)'] = 'Inhaltsfilter (NSFW und mehr)'; -$a->strings['Regular expression "%s" fails to compile'] = 'Regulärer Ausdruck "%s" schlägt beim Kompiliern fehl.'; $a->strings['Filtered tag: %s'] = 'Gefiltertes Schlagwort: %s'; $a->strings['Filtered word: %s'] = 'Gefilterter Begriff: %s'; diff --git a/nsfw/lang/eo/messages.po b/nsfw/lang/eo/messages.po deleted file mode 100644 index fd026e43..00000000 --- a/nsfw/lang/eo/messages.po +++ /dev/null @@ -1,60 +0,0 @@ -# ADDON nsfw -# Copyright (C) -# This file is distributed under the same license as the Friendica nsfw addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-10 14:42-0500\n" -"PO-Revision-Date: 2014-06-23 10:34+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: nsfw.php:65 -msgid "" -"This addon searches for specified words/text in posts and collapses them. It" -" can be used to filter content tagged with for instance #NSFW that may be " -"deemed inappropriate at certain times or places, such as being at work. It " -"is also useful for hiding irrelevant or annoying content from direct view." -msgstr "" - -#: nsfw.php:66 -msgid "Enable Content filter" -msgstr "" - -#: nsfw.php:67 -msgid "Comma separated list of keywords to hide" -msgstr "" - -#: nsfw.php:67 -msgid "" -"Use /expression/ to provide regular expressions, #tag to specfically match " -"hashtags (case-insensitive), or regular words (case-sensitive)" -msgstr "" - -#: nsfw.php:72 -msgid "Content Filter (NSFW and more)" -msgstr "" - -#: nsfw.php:96 -#, php-format -msgid "Regular expression \"%s\" fails to compile" -msgstr "" - -#: nsfw.php:154 -#, php-format -msgid "Filtered tag: %s" -msgstr "" - -#: nsfw.php:156 -#, php-format -msgid "Filtered word: %s" -msgstr "" diff --git a/nsfw/lang/eo/strings.php b/nsfw/lang/eo/strings.php index 68e8a64c..13da052a 100644 --- a/nsfw/lang/eo/strings.php +++ b/nsfw/lang/eo/strings.php @@ -1,7 +1,10 @@ -strings["Not Safe For Work (General Purpose Content Filter) settings"] = "Not Safe For Work (ĝenerala filtrilo por enhavoj) agordoj"; +$a->strings["This addon looks in posts for the words/text you specify below, and collapses any content containing those keywords so it is not displayed at inappropriate times, such as sexual innuendo that may be improper in a work setting. It is polite and recommended to tag any content containing nudity with #NSFW. This filter can also match any other word/text you specify, and can thereby be used as a general purpose content filter."] = "Tiu kromprogramo serĉas la malsupre agordatajn vortojn en afiŝoj kaj malvidebligis ilin se ili enhavas iun vorton. Tiel, afiŝoj ne montriĝis kiuj enhavas maladekvatan enhavon, ekzemple seksumaj aferoj, kiuj ne estas adekvata, ekzemple en la laborejo. En la reto, oni kutime markas tiajn afiŝojn #NSFW - Not Safe For Work - ne adekvata por la laborejo. La filtrilo ankaŭ serĉas ĉiujn vortojn kiujn vi agordas kaj tial funkcias kiel ĝenerala filtrilo."; +$a->strings["Enable Content filter"] = "Ŝalti la filtrilo por la enhavo"; +$a->strings["Comma separated list of keywords to hide"] = "Perkome disigita listo da kaŝontaj ŝlosilvortoj"; +$a->strings["Submit"] = "Sendi"; +$a->strings["Use /expression/ to provide regular expressions"] = "Uzu /expr/ por provizi regulajn esprimojn."; +$a->strings["NSFW Settings saved."] = "NSFW agordoj konservitaj."; +$a->strings["%s - Click to open/close"] = "%s - Klaku por malfermi/fermi"; diff --git a/nsfw/lang/es/messages.po b/nsfw/lang/es/messages.po index 43fde3cb..d1a72567 100644 --- a/nsfw/lang/es/messages.po +++ b/nsfw/lang/es/messages.po @@ -10,17 +10,21 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-10 14:42-0500\n" -"PO-Revision-Date: 2014-06-23 10:34+0000\n" -"Last-Translator: Senex Petrovic , 2021\n" -"Language-Team: Spanish (http://app.transifex.com/Friendica/friendica/language/es/)\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" +"PO-Revision-Date: 2021-04-06 01:49+0000\n" +"Last-Translator: Senex Petrovic \n" +"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: es\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: nsfw.php:65 +#: nsfw.php:68 nsfw.php:72 +msgid "Content Filter (NSFW and more)" +msgstr "Filtro de contenido (NSFW y más)" + +#: nsfw.php:76 msgid "" "This addon searches for specified words/text in posts and collapses them. It" " can be used to filter content tagged with for instance #NSFW that may be " @@ -28,35 +32,28 @@ msgid "" "is also useful for hiding irrelevant or annoying content from direct view." msgstr "Este complemento busca palabras / texto específicos en las publicaciones y las contrae. Se puede utilizar para filtrar contenido etiquetado con, por ejemplo, #NSFW que puede considerarse inapropiado en determinados momentos o lugares, como en el trabajo. También es útil para ocultar contenido irrelevante o molesto de la vista directa." -#: nsfw.php:66 +#: nsfw.php:77 msgid "Enable Content filter" msgstr "Habilitar filtro de contenido" -#: nsfw.php:67 +#: nsfw.php:80 msgid "Comma separated list of keywords to hide" msgstr "Lista de palabras claves separadas por coma para colapsar el contenido correspondiente." -#: nsfw.php:67 -msgid "" -"Use /expression/ to provide regular expressions, #tag to specfically match " -"hashtags (case-insensitive), or regular words (case-sensitive)" -msgstr "" +#: nsfw.php:84 +msgid "Save Settings" +msgstr "Grabar ajustes" -#: nsfw.php:72 -msgid "Content Filter (NSFW and more)" -msgstr "Filtro de contenido (NSFW y más)" +#: nsfw.php:85 +msgid "Use /expression/ to provide regular expressions" +msgstr "Utiliza /expresión/ para proveer expresiones regulares." -#: nsfw.php:96 -#, php-format -msgid "Regular expression \"%s\" fails to compile" -msgstr "" - -#: nsfw.php:154 +#: nsfw.php:152 #, php-format msgid "Filtered tag: %s" msgstr "Etiqueta filtrada: %s" -#: nsfw.php:156 +#: nsfw.php:154 #, php-format msgid "Filtered word: %s" msgstr "Palabra filtrada: %s" diff --git a/nsfw/lang/es/strings.php b/nsfw/lang/es/strings.php index 4b41bd14..e46967a6 100644 --- a/nsfw/lang/es/strings.php +++ b/nsfw/lang/es/strings.php @@ -3,11 +3,13 @@ if(! function_exists("string_plural_select_es")) { function string_plural_select_es($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} +$a->strings['Content Filter (NSFW and more)'] = 'Filtro de contenido (NSFW y más)'; $a->strings['This addon searches for specified words/text in posts and collapses them. It can be used to filter content tagged with for instance #NSFW that may be deemed inappropriate at certain times or places, such as being at work. It is also useful for hiding irrelevant or annoying content from direct view.'] = 'Este complemento busca palabras / texto específicos en las publicaciones y las contrae. Se puede utilizar para filtrar contenido etiquetado con, por ejemplo, #NSFW que puede considerarse inapropiado en determinados momentos o lugares, como en el trabajo. También es útil para ocultar contenido irrelevante o molesto de la vista directa.'; $a->strings['Enable Content filter'] = 'Habilitar filtro de contenido'; $a->strings['Comma separated list of keywords to hide'] = 'Lista de palabras claves separadas por coma para colapsar el contenido correspondiente.'; -$a->strings['Content Filter (NSFW and more)'] = 'Filtro de contenido (NSFW y más)'; +$a->strings['Save Settings'] = 'Grabar ajustes'; +$a->strings['Use /expression/ to provide regular expressions'] = 'Utiliza /expresión/ para proveer expresiones regulares.'; $a->strings['Filtered tag: %s'] = 'Etiqueta filtrada: %s'; $a->strings['Filtered word: %s'] = 'Palabra filtrada: %s'; diff --git a/nsfw/lang/et/messages.po b/nsfw/lang/et/messages.po deleted file mode 100644 index 78be66df..00000000 --- a/nsfw/lang/et/messages.po +++ /dev/null @@ -1,60 +0,0 @@ -# ADDON nsfw -# Copyright (C) -# This file is distributed under the same license as the Friendica nsfw addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-10 14:42-0500\n" -"PO-Revision-Date: 2014-06-23 10:34+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: et\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: nsfw.php:65 -msgid "" -"This addon searches for specified words/text in posts and collapses them. It" -" can be used to filter content tagged with for instance #NSFW that may be " -"deemed inappropriate at certain times or places, such as being at work. It " -"is also useful for hiding irrelevant or annoying content from direct view." -msgstr "" - -#: nsfw.php:66 -msgid "Enable Content filter" -msgstr "" - -#: nsfw.php:67 -msgid "Comma separated list of keywords to hide" -msgstr "" - -#: nsfw.php:67 -msgid "" -"Use /expression/ to provide regular expressions, #tag to specfically match " -"hashtags (case-insensitive), or regular words (case-sensitive)" -msgstr "" - -#: nsfw.php:72 -msgid "Content Filter (NSFW and more)" -msgstr "" - -#: nsfw.php:96 -#, php-format -msgid "Regular expression \"%s\" fails to compile" -msgstr "" - -#: nsfw.php:154 -#, php-format -msgid "Filtered tag: %s" -msgstr "" - -#: nsfw.php:156 -#, php-format -msgid "Filtered word: %s" -msgstr "" diff --git a/nsfw/lang/et/strings.php b/nsfw/lang/et/strings.php deleted file mode 100644 index dfe78358..00000000 --- a/nsfw/lang/et/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -, 2015 # Vincent Vindarel , 2018 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-10 14:42-0500\n" +"POT-Creation-Date: 2022-11-18 11:57-0500\n" "PO-Revision-Date: 2014-06-23 10:34+0000\n" -"Last-Translator: cracrayol, 2023-2024\n" -"Language-Team: French (http://app.transifex.com/Friendica/friendica/language/fr/)\n" +"Last-Translator: Nicolas Derive, 2022\n" +"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -42,23 +41,18 @@ msgstr "Liste de mots-clés - séparés par des virgules - à cacher" msgid "" "Use /expression/ to provide regular expressions, #tag to specfically match " "hashtags (case-insensitive), or regular words (case-sensitive)" -msgstr "Utiliser /expression/ pour fournir des expressions régulières, #etiquette pour correspondre à une étiquette (insensible à la casse), ou des mots classiques (sensible à la casse)" +msgstr "Utiliser /expression/ pour fournir des expressions régulières, #tag pour correspondre à un mot-dièse (hashtag, insensible à la casse), ou des mots classiques (sensible à la casse)" #: nsfw.php:72 msgid "Content Filter (NSFW and more)" msgstr "Filtre de contenu (NSFW et autres)" -#: nsfw.php:96 -#, php-format -msgid "Regular expression \"%s\" fails to compile" -msgstr "La compilation de l'expression régulière \"%s\" a échoué" - -#: nsfw.php:154 +#: nsfw.php:140 #, php-format msgid "Filtered tag: %s" -msgstr "Tag filtré : %s" +msgstr "Tag filtré: %s" -#: nsfw.php:156 +#: nsfw.php:142 #, php-format msgid "Filtered word: %s" msgstr "Mot filtré: %s" diff --git a/nsfw/lang/fr/strings.php b/nsfw/lang/fr/strings.php index 0f717797..7b334956 100644 --- a/nsfw/lang/fr/strings.php +++ b/nsfw/lang/fr/strings.php @@ -8,8 +8,7 @@ function string_plural_select_fr($n){ $a->strings['This addon searches for specified words/text in posts and collapses them. It can be used to filter content tagged with for instance #NSFW that may be deemed inappropriate at certain times or places, such as being at work. It is also useful for hiding irrelevant or annoying content from direct view.'] = 'Cette extension recherche des mots/textes spécifiés dans les publications et les masque. Elle peut être utilisée pour filtrer le contenu étiqueté par exemple avec #NSFW qui peut être considéré comme inapproprié à certains moments ou endroits, comme par exemple au travail. Elle est aussi utile pour cacher du contenu non pertinent ou ennuyeux d\'une vue directe.'; $a->strings['Enable Content filter'] = 'Activer le filtrage de contenu'; $a->strings['Comma separated list of keywords to hide'] = 'Liste de mots-clés - séparés par des virgules - à cacher'; -$a->strings['Use /expression/ to provide regular expressions, #tag to specfically match hashtags (case-insensitive), or regular words (case-sensitive)'] = 'Utiliser /expression/ pour fournir des expressions régulières, #etiquette pour correspondre à une étiquette (insensible à la casse), ou des mots classiques (sensible à la casse)'; +$a->strings['Use /expression/ to provide regular expressions, #tag to specfically match hashtags (case-insensitive), or regular words (case-sensitive)'] = 'Utiliser /expression/ pour fournir des expressions régulières, #tag pour correspondre à un mot-dièse (hashtag, insensible à la casse), ou des mots classiques (sensible à la casse)'; $a->strings['Content Filter (NSFW and more)'] = 'Filtre de contenu (NSFW et autres)'; -$a->strings['Regular expression "%s" fails to compile'] = 'La compilation de l\'expression régulière "%s" a échoué'; -$a->strings['Filtered tag: %s'] = 'Tag filtré : %s'; +$a->strings['Filtered tag: %s'] = 'Tag filtré: %s'; $a->strings['Filtered word: %s'] = 'Mot filtré: %s'; diff --git a/nsfw/lang/gd/messages.po b/nsfw/lang/gd/messages.po deleted file mode 100644 index a6f6691e..00000000 --- a/nsfw/lang/gd/messages.po +++ /dev/null @@ -1,60 +0,0 @@ -# ADDON nsfw -# Copyright (C) -# This file is distributed under the same license as the Friendica nsfw addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-10 14:42-0500\n" -"PO-Revision-Date: 2014-06-23 10:34+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gd\n" -"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" - -#: nsfw.php:65 -msgid "" -"This addon searches for specified words/text in posts and collapses them. It" -" can be used to filter content tagged with for instance #NSFW that may be " -"deemed inappropriate at certain times or places, such as being at work. It " -"is also useful for hiding irrelevant or annoying content from direct view." -msgstr "" - -#: nsfw.php:66 -msgid "Enable Content filter" -msgstr "" - -#: nsfw.php:67 -msgid "Comma separated list of keywords to hide" -msgstr "" - -#: nsfw.php:67 -msgid "" -"Use /expression/ to provide regular expressions, #tag to specfically match " -"hashtags (case-insensitive), or regular words (case-sensitive)" -msgstr "" - -#: nsfw.php:72 -msgid "Content Filter (NSFW and more)" -msgstr "" - -#: nsfw.php:96 -#, php-format -msgid "Regular expression \"%s\" fails to compile" -msgstr "" - -#: nsfw.php:154 -#, php-format -msgid "Filtered tag: %s" -msgstr "" - -#: nsfw.php:156 -#, php-format -msgid "Filtered word: %s" -msgstr "" diff --git a/nsfw/lang/gd/strings.php b/nsfw/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/nsfw/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/nsfw/lang/hu/messages.po b/nsfw/lang/hu/messages.po index 9632a2ff..a862c0da 100644 --- a/nsfw/lang/hu/messages.po +++ b/nsfw/lang/hu/messages.po @@ -4,15 +4,15 @@ # # # Translators: -# Balázs Úr, 2020-2023 +# Balázs Úr, 2020-2022 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-10 14:42-0500\n" +"POT-Creation-Date: 2022-11-18 11:57-0500\n" "PO-Revision-Date: 2014-06-23 10:34+0000\n" -"Last-Translator: Balázs Úr, 2020-2023\n" -"Language-Team: Hungarian (http://app.transifex.com/Friendica/friendica/language/hu/)\n" +"Last-Translator: Balázs Úr, 2020-2022\n" +"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -45,17 +45,12 @@ msgstr "Használjon /kifejezést/ reguláris kifejezések megadásához, #címk msgid "Content Filter (NSFW and more)" msgstr "Tartalomszűrő (érzékeny tartalmak és egyebek)" -#: nsfw.php:96 -#, php-format -msgid "Regular expression \"%s\" fails to compile" -msgstr "A(z) „%s” reguláris kifejezés nem fordítható le" - -#: nsfw.php:154 +#: nsfw.php:140 #, php-format msgid "Filtered tag: %s" msgstr "Kiszűrt címke: %s" -#: nsfw.php:156 +#: nsfw.php:142 #, php-format msgid "Filtered word: %s" msgstr "Kiszűrt szó: %s" diff --git a/nsfw/lang/hu/strings.php b/nsfw/lang/hu/strings.php index 5f335b3e..c837a423 100644 --- a/nsfw/lang/hu/strings.php +++ b/nsfw/lang/hu/strings.php @@ -10,6 +10,5 @@ $a->strings['Enable Content filter'] = 'Tartalomszűrő engedélyezése'; $a->strings['Comma separated list of keywords to hide'] = 'Kulcsszavak vesszővel elválasztott listája az elrejtéshez'; $a->strings['Use /expression/ to provide regular expressions, #tag to specfically match hashtags (case-insensitive), or regular words (case-sensitive)'] = 'Használjon /kifejezést/ reguláris kifejezések megadásához, #címkét a kettőskeresztescímkék kifejezett illesztéséhez (nem érzékeny a kis- és nagybetűkre) vagy szabályos szavakat (kis- és nagybetűérzékeny)'; $a->strings['Content Filter (NSFW and more)'] = 'Tartalomszűrő (érzékeny tartalmak és egyebek)'; -$a->strings['Regular expression "%s" fails to compile'] = 'A(z) „%s” reguláris kifejezés nem fordítható le'; $a->strings['Filtered tag: %s'] = 'Kiszűrt címke: %s'; $a->strings['Filtered word: %s'] = 'Kiszűrt szó: %s'; diff --git a/nsfw/lang/is/messages.po b/nsfw/lang/is/messages.po deleted file mode 100644 index 56c26ced..00000000 --- a/nsfw/lang/is/messages.po +++ /dev/null @@ -1,60 +0,0 @@ -# ADDON nsfw -# Copyright (C) -# This file is distributed under the same license as the Friendica nsfw addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-10 14:42-0500\n" -"PO-Revision-Date: 2014-06-23 10:34+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: is\n" -"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" - -#: nsfw.php:65 -msgid "" -"This addon searches for specified words/text in posts and collapses them. It" -" can be used to filter content tagged with for instance #NSFW that may be " -"deemed inappropriate at certain times or places, such as being at work. It " -"is also useful for hiding irrelevant or annoying content from direct view." -msgstr "" - -#: nsfw.php:66 -msgid "Enable Content filter" -msgstr "" - -#: nsfw.php:67 -msgid "Comma separated list of keywords to hide" -msgstr "" - -#: nsfw.php:67 -msgid "" -"Use /expression/ to provide regular expressions, #tag to specfically match " -"hashtags (case-insensitive), or regular words (case-sensitive)" -msgstr "" - -#: nsfw.php:72 -msgid "Content Filter (NSFW and more)" -msgstr "" - -#: nsfw.php:96 -#, php-format -msgid "Regular expression \"%s\" fails to compile" -msgstr "" - -#: nsfw.php:154 -#, php-format -msgid "Filtered tag: %s" -msgstr "" - -#: nsfw.php:156 -#, php-format -msgid "Filtered word: %s" -msgstr "" diff --git a/nsfw/lang/is/strings.php b/nsfw/lang/is/strings.php index 975c341e..534f19c2 100644 --- a/nsfw/lang/is/strings.php +++ b/nsfw/lang/is/strings.php @@ -1,7 +1,10 @@ -strings["Not Safe For Work (General Purpose Content Filter) settings"] = ""; +$a->strings["This addon looks in posts for the words/text you specify below, and collapses any content containing those keywords so it is not displayed at inappropriate times, such as sexual innuendo that may be improper in a work setting. It is polite and recommended to tag any content containing nudity with #NSFW. This filter can also match any other word/text you specify, and can thereby be used as a general purpose content filter."] = ""; +$a->strings["Enable Content filter"] = ""; +$a->strings["Comma separated list of keywords to hide"] = ""; +$a->strings["Submit"] = "Senda inn"; +$a->strings["Use /expression/ to provide regular expressions"] = ""; +$a->strings["NSFW Settings saved."] = "NSFW stillingar vistað."; +$a->strings["%s - Click to open/close"] = "%s - Smelltu til að opna/loka"; diff --git a/nsfw/lang/it/messages.po b/nsfw/lang/it/messages.po index eadbb1aa..a84d0a13 100644 --- a/nsfw/lang/it/messages.po +++ b/nsfw/lang/it/messages.po @@ -5,22 +5,26 @@ # # Translators: # fabrixxm , 2014-2015,2018 -# Sylke Vicious , 2020,2023 +# Sylke Vicious , 2020 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-10 14:42-0500\n" -"PO-Revision-Date: 2014-06-23 10:34+0000\n" -"Last-Translator: Sylke Vicious , 2020,2023\n" -"Language-Team: Italian (http://app.transifex.com/Friendica/friendica/language/it/)\n" +"POT-Creation-Date: 2018-04-01 11:11-0400\n" +"PO-Revision-Date: 2020-09-17 11:25+0000\n" +"Last-Translator: Sylke Vicious \n" +"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: nsfw.php:65 +#: nsfw.php:77 nsfw.php:81 +msgid "Content Filter (NSFW and more)" +msgstr "Filtro Contenuto (NSFW e altro)" + +#: nsfw.php:85 msgid "" "This addon searches for specified words/text in posts and collapses them. It" " can be used to filter content tagged with for instance #NSFW that may be " @@ -28,35 +32,32 @@ msgid "" "is also useful for hiding irrelevant or annoying content from direct view." msgstr "Questo componente aggiuntivo cerca per le parole specificate nei messaggi e li collassa. Può essere usato per filtrare contenuto taggato, per esempio, #NSFW (non sicuro per il lavoro), che può risultare inappropriato in certi orari o in certi luoghi, come appunto al lavoro. È anche utile per nascondere contenuto irrilevante o fastidioso." -#: nsfw.php:66 +#: nsfw.php:86 msgid "Enable Content filter" msgstr "Abilita il Filtro Contenuti" -#: nsfw.php:67 +#: nsfw.php:89 msgid "Comma separated list of keywords to hide" msgstr "Elenco separato da virgole di parole da nascondere" -#: nsfw.php:67 -msgid "" -"Use /expression/ to provide regular expressions, #tag to specfically match " -"hashtags (case-insensitive), or regular words (case-sensitive)" -msgstr "Usa /expression/ per fornire espressioni regolari, #tag per gli hashtag che coincidono specificatamente (insensibile alle maiuscole), o parole normali (sensibile alle maiuscole)" +#: nsfw.php:93 +msgid "Save Settings" +msgstr "Salva Impostazioni" -#: nsfw.php:72 -msgid "Content Filter (NSFW and more)" -msgstr "Filtro Contenuto (NSFW e altro)" +#: nsfw.php:94 +msgid "Use /expression/ to provide regular expressions" +msgstr "Utilizza /espressione/ per inserire espressioni regolari" -#: nsfw.php:96 -#, php-format -msgid "Regular expression \"%s\" fails to compile" -msgstr "L'espressione regolare \"%s\" fallisce la compilazione" +#: nsfw.php:109 +msgid "NSFW Settings saved." +msgstr "Impostazioni NSFW salvate." -#: nsfw.php:154 +#: nsfw.php:162 #, php-format msgid "Filtered tag: %s" msgstr "Tag filtrato: %s" -#: nsfw.php:156 +#: nsfw.php:164 #, php-format msgid "Filtered word: %s" msgstr "Parola filtrata: %s" diff --git a/nsfw/lang/it/strings.php b/nsfw/lang/it/strings.php index ff963972..05bd0112 100644 --- a/nsfw/lang/it/strings.php +++ b/nsfw/lang/it/strings.php @@ -3,13 +3,14 @@ if(! function_exists("string_plural_select_it")) { function string_plural_select_it($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} +$a->strings['Content Filter (NSFW and more)'] = 'Filtro Contenuto (NSFW e altro)'; $a->strings['This addon searches for specified words/text in posts and collapses them. It can be used to filter content tagged with for instance #NSFW that may be deemed inappropriate at certain times or places, such as being at work. It is also useful for hiding irrelevant or annoying content from direct view.'] = 'Questo componente aggiuntivo cerca per le parole specificate nei messaggi e li collassa. Può essere usato per filtrare contenuto taggato, per esempio, #NSFW (non sicuro per il lavoro), che può risultare inappropriato in certi orari o in certi luoghi, come appunto al lavoro. È anche utile per nascondere contenuto irrilevante o fastidioso.'; $a->strings['Enable Content filter'] = 'Abilita il Filtro Contenuti'; $a->strings['Comma separated list of keywords to hide'] = 'Elenco separato da virgole di parole da nascondere'; -$a->strings['Use /expression/ to provide regular expressions, #tag to specfically match hashtags (case-insensitive), or regular words (case-sensitive)'] = 'Usa /expression/ per fornire espressioni regolari, #tag per gli hashtag che coincidono specificatamente (insensibile alle maiuscole), o parole normali (sensibile alle maiuscole)'; -$a->strings['Content Filter (NSFW and more)'] = 'Filtro Contenuto (NSFW e altro)'; -$a->strings['Regular expression "%s" fails to compile'] = 'L\'espressione regolare "%s" fallisce la compilazione'; +$a->strings['Save Settings'] = 'Salva Impostazioni'; +$a->strings['Use /expression/ to provide regular expressions'] = 'Utilizza /espressione/ per inserire espressioni regolari'; +$a->strings['NSFW Settings saved.'] = 'Impostazioni NSFW salvate.'; $a->strings['Filtered tag: %s'] = 'Tag filtrato: %s'; $a->strings['Filtered word: %s'] = 'Parola filtrata: %s'; diff --git a/nsfw/lang/pl/messages.po b/nsfw/lang/pl/messages.po index 84d42415..67de5248 100644 --- a/nsfw/lang/pl/messages.po +++ b/nsfw/lang/pl/messages.po @@ -4,17 +4,16 @@ # # # Translators: -# Bartosz Kozień, 2025 -# Piotr Strebski , 2022 +# Piotr Strębski , 2022 # Waldemar Stoczkowski, 2018 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-10 14:42-0500\n" +"POT-Creation-Date: 2022-11-18 11:57-0500\n" "PO-Revision-Date: 2014-06-23 10:34+0000\n" -"Last-Translator: Bartosz Kozień, 2025\n" -"Language-Team: Polish (http://app.transifex.com/Friendica/friendica/language/pl/)\n" +"Last-Translator: Piotr Strębski , 2022\n" +"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -41,23 +40,18 @@ msgstr "Rozdzielana przecinkami lista słów kluczowych do ukrycia" msgid "" "Use /expression/ to provide regular expressions, #tag to specfically match " "hashtags (case-insensitive), or regular words (case-sensitive)" -msgstr "Użyj /wyrażenie/ dla wyrażenia regularnego, #tag by dopasować konkretne tagi (bez rozróżniania wielkości liter), lub zwykłych słów (z rozróżnianiem wielkości liter)" +msgstr "" #: nsfw.php:72 msgid "Content Filter (NSFW and more)" msgstr "Filtr zawartości (NSFW i więcej)" -#: nsfw.php:96 -#, php-format -msgid "Regular expression \"%s\" fails to compile" -msgstr "Błąd kompilacji wyrażenia regularnego \"%s\"" - -#: nsfw.php:154 +#: nsfw.php:140 #, php-format msgid "Filtered tag: %s" msgstr "Filtrowane znaczników: %s" -#: nsfw.php:156 +#: nsfw.php:142 #, php-format msgid "Filtered word: %s" msgstr "Filtrowane słowo: %s" diff --git a/nsfw/lang/pl/strings.php b/nsfw/lang/pl/strings.php index 6e6124f6..3fc65a76 100644 --- a/nsfw/lang/pl/strings.php +++ b/nsfw/lang/pl/strings.php @@ -8,8 +8,6 @@ function string_plural_select_pl($n){ $a->strings['This addon searches for specified words/text in posts and collapses them. It can be used to filter content tagged with for instance #NSFW that may be deemed inappropriate at certain times or places, such as being at work. It is also useful for hiding irrelevant or annoying content from direct view.'] = 'Ten dodatek szuka określonych słów/tekstów w postach i zwija je. Może służyć do filtrowania treści oznaczonych np. NSFW, które mogą zostać uznane za nieodpowiednie w określonych momentach lub miejscach, na przykład w pracy. Jest to również przydatne do ukrywania nieistotnych lub irytujących treści z bezpośredniego widoku.'; $a->strings['Enable Content filter'] = 'Włącz filtr treści'; $a->strings['Comma separated list of keywords to hide'] = 'Rozdzielana przecinkami lista słów kluczowych do ukrycia'; -$a->strings['Use /expression/ to provide regular expressions, #tag to specfically match hashtags (case-insensitive), or regular words (case-sensitive)'] = 'Użyj /wyrażenie/ dla wyrażenia regularnego, #tag by dopasować konkretne tagi (bez rozróżniania wielkości liter), lub zwykłych słów (z rozróżnianiem wielkości liter)'; $a->strings['Content Filter (NSFW and more)'] = 'Filtr zawartości (NSFW i więcej)'; -$a->strings['Regular expression "%s" fails to compile'] = 'Błąd kompilacji wyrażenia regularnego "%s"'; $a->strings['Filtered tag: %s'] = 'Filtrowane znaczników: %s'; $a->strings['Filtered word: %s'] = 'Filtrowane słowo: %s'; diff --git a/nsfw/lang/ru/messages.po b/nsfw/lang/ru/messages.po index b3298e11..caa7ef3a 100644 --- a/nsfw/lang/ru/messages.po +++ b/nsfw/lang/ru/messages.po @@ -9,17 +9,21 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-10 14:42-0500\n" -"PO-Revision-Date: 2014-06-23 10:34+0000\n" -"Last-Translator: Alexander An , 2020\n" -"Language-Team: Russian (http://app.transifex.com/Friendica/friendica/language/ru/)\n" +"POT-Creation-Date: 2018-04-01 11:11-0400\n" +"PO-Revision-Date: 2020-09-01 05:38+0000\n" +"Last-Translator: Alexander An \n" +"Language-Team: Russian (http://www.transifex.com/Friendica/friendica/language/ru/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: ru\n" "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" -#: nsfw.php:65 +#: nsfw.php:77 nsfw.php:81 +msgid "Content Filter (NSFW and more)" +msgstr "Фильтр контента (NSFW и прочее)" + +#: nsfw.php:85 msgid "" "This addon searches for specified words/text in posts and collapses them. It" " can be used to filter content tagged with for instance #NSFW that may be " @@ -27,35 +31,32 @@ msgid "" "is also useful for hiding irrelevant or annoying content from direct view." msgstr "Это дополнение ищет указанные слова и выражения в записях и сворачивает запись, если найдёт. Это можно использовать для скрытия записей с тэгом #NSFW, просмотр которых может быть нежелателен в определённое время, например, на работе. Так же можно использовать для скрытия иного контента." -#: nsfw.php:66 +#: nsfw.php:86 msgid "Enable Content filter" msgstr "Включить фильтр контента" -#: nsfw.php:67 +#: nsfw.php:89 msgid "Comma separated list of keywords to hide" msgstr "Ключевые слова для скрытия, через запятую" -#: nsfw.php:67 -msgid "" -"Use /expression/ to provide regular expressions, #tag to specfically match " -"hashtags (case-insensitive), or regular words (case-sensitive)" -msgstr "" +#: nsfw.php:93 +msgid "Save Settings" +msgstr "Сохранить настройки" -#: nsfw.php:72 -msgid "Content Filter (NSFW and more)" -msgstr "Фильтр контента (NSFW и прочее)" +#: nsfw.php:94 +msgid "Use /expression/ to provide regular expressions" +msgstr "Используйте формат /expression/ для регулярных выражений" -#: nsfw.php:96 -#, php-format -msgid "Regular expression \"%s\" fails to compile" -msgstr "" +#: nsfw.php:109 +msgid "NSFW Settings saved." +msgstr "Настройки NSFW сохранены" -#: nsfw.php:154 +#: nsfw.php:162 #, php-format msgid "Filtered tag: %s" msgstr "Скрыт тэг: %s" -#: nsfw.php:156 +#: nsfw.php:164 #, php-format msgid "Filtered word: %s" msgstr "Скрыто слово: %s" diff --git a/nsfw/lang/ru/strings.php b/nsfw/lang/ru/strings.php index c9035421..71a02e12 100644 --- a/nsfw/lang/ru/strings.php +++ b/nsfw/lang/ru/strings.php @@ -5,9 +5,12 @@ function string_plural_select_ru($n){ $n = intval($n); if ($n%10==1 && $n%100!=11) { return 0; } else if ($n%10>=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; } }} +$a->strings['Content Filter (NSFW and more)'] = 'Фильтр контента (NSFW и прочее)'; $a->strings['This addon searches for specified words/text in posts and collapses them. It can be used to filter content tagged with for instance #NSFW that may be deemed inappropriate at certain times or places, such as being at work. It is also useful for hiding irrelevant or annoying content from direct view.'] = 'Это дополнение ищет указанные слова и выражения в записях и сворачивает запись, если найдёт. Это можно использовать для скрытия записей с тэгом #NSFW, просмотр которых может быть нежелателен в определённое время, например, на работе. Так же можно использовать для скрытия иного контента.'; $a->strings['Enable Content filter'] = 'Включить фильтр контента'; $a->strings['Comma separated list of keywords to hide'] = 'Ключевые слова для скрытия, через запятую'; -$a->strings['Content Filter (NSFW and more)'] = 'Фильтр контента (NSFW и прочее)'; +$a->strings['Save Settings'] = 'Сохранить настройки'; +$a->strings['Use /expression/ to provide regular expressions'] = 'Используйте формат /expression/ для регулярных выражений'; +$a->strings['NSFW Settings saved.'] = 'Настройки NSFW сохранены'; $a->strings['Filtered tag: %s'] = 'Скрыт тэг: %s'; $a->strings['Filtered word: %s'] = 'Скрыто слово: %s'; diff --git a/nsfw/nsfw.php b/nsfw/nsfw.php index 37d34d7d..2c8235dd 100644 --- a/nsfw/nsfw.php +++ b/nsfw/nsfw.php @@ -8,6 +8,7 @@ * */ +use Friendica\App; use Friendica\Core\Hook; use Friendica\Core\Renderer; use Friendica\DI; @@ -87,7 +88,7 @@ function nsfw_addon_settings_post(array &$b) $word_list = explode(',', $words); foreach ($word_list as $word) { $word = trim($word); - if (!$words || strpos($word, '/') !== 0) { + if (!$words || $word[0] != '/') { continue; } @@ -104,13 +105,12 @@ function nsfw_addon_settings_post(array &$b) function nsfw_prepare_body_content_filter(&$hook_data) { $words = null; - $uid = $hook_data['uid'] ?? DI::userSession()->getLocalUserId(); - if (DI::pConfig()->get($uid, 'nsfw', 'disable')) { + if (DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'nsfw', 'disable')) { return; } - if ($uid) { - $words = DI::pConfig()->get($uid, 'nsfw', 'words'); + if (DI::userSession()->getLocalUserId()) { + $words = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'nsfw', 'words'); } if ($words) { @@ -119,9 +119,7 @@ function nsfw_prepare_body_content_filter(&$hook_data) $word_list = ['nsfw']; } - $found = false; - $tag_search = false; - + $found = false; if (count($word_list)) { $body = $hook_data['item']['title'] . "\n" . nsfw_extract_photos($hook_data['item']['body']); @@ -131,16 +129,17 @@ function nsfw_prepare_body_content_filter(&$hook_data) continue; } + $tag_search = false; switch ($word[0]) { case '/'; // Regular expression $found = @preg_match($word, $body); break; case '#': // Hashtag-only search $tag_search = true; - $found = nsfw_find_word_in_item_tags($hook_data['item']['hashtags'] ?? [], substr($word, 1)); + $found = nsfw_find_word_in_item_tags($hook_data['item']['hashtags'], substr($word, 1)); break; default: - $found = strpos($body, $word) !== false || nsfw_find_word_in_item_tags($hook_data['item']['tags'] ?? [], $word); + $found = strpos($body, $word) !== false || nsfw_find_word_in_item_tags($hook_data['item']['tags'], $word); break; } diff --git a/numfriends/lang/bg/messages.po b/numfriends/lang/bg/messages.po deleted file mode 100644 index 19f86de0..00000000 --- a/numfriends/lang/bg/messages.po +++ /dev/null @@ -1,27 +0,0 @@ -# ADDON numfriends -# Copyright (C) -# This file is distributed under the same license as the Friendica numfriends addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 10:58+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: numfriends.php:55 -msgid "How many contacts to display on profile sidebar" -msgstr "" - -#: numfriends.php:60 -msgid "Numfriends Settings" -msgstr "" diff --git a/numfriends/lang/bg/strings.php b/numfriends/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/numfriends/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: numfriends.php:55 -msgid "How many contacts to display on profile sidebar" -msgstr "" - -#: numfriends.php:60 -msgid "Numfriends Settings" -msgstr "" diff --git a/numfriends/lang/ca/strings.php b/numfriends/lang/ca/strings.php index d34874f6..6e4bea3c 100644 --- a/numfriends/lang/ca/strings.php +++ b/numfriends/lang/ca/strings.php @@ -1,7 +1,6 @@ -strings["Numfriends settings updated."] = "Actualitzar la configuració de Numfriends."; +$a->strings["Numfriends Settings"] = "Configuració de Numfriends"; +$a->strings["How many contacts to display on profile sidebar"] = "Quants contactes per mostrar a la barra lateral el perfil"; +$a->strings["Submit"] = "Enviar"; diff --git a/numfriends/lang/cs/messages.po b/numfriends/lang/cs/messages.po index 1598bc1d..1c2b092e 100644 --- a/numfriends/lang/cs/messages.po +++ b/numfriends/lang/cs/messages.po @@ -10,20 +10,28 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 10:58+0000\n" -"Last-Translator: Aditoo, 2018\n" -"Language-Team: Czech (http://app.transifex.com/Friendica/friendica/language/cs/)\n" +"POT-Creation-Date: 2013-02-27 05:01-0500\n" +"PO-Revision-Date: 2018-07-03 14:45+0000\n" +"Last-Translator: Aditoo\n" +"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" "Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" -#: numfriends.php:55 -msgid "How many contacts to display on profile sidebar" -msgstr "Počet kontaktů k zobrazení na profilové postranní liště" +#: numfriends.php:46 +msgid "Numfriends settings updated." +msgstr "Nastavení Numfriends aktualizováno" -#: numfriends.php:60 +#: numfriends.php:77 msgid "Numfriends Settings" msgstr "Nastavení Numfriends" + +#: numfriends.php:79 +msgid "How many contacts to display on profile sidebar" +msgstr "Kolik kontaktů zobrazit na profilové postranní liště" + +#: numfriends.php:85 +msgid "Submit" +msgstr "Odeslat" diff --git a/numfriends/lang/cs/strings.php b/numfriends/lang/cs/strings.php index 2f58574d..d7535632 100644 --- a/numfriends/lang/cs/strings.php +++ b/numfriends/lang/cs/strings.php @@ -5,5 +5,7 @@ function string_plural_select_cs($n){ $n = intval($n); if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; } }} -$a->strings['How many contacts to display on profile sidebar'] = 'Počet kontaktů k zobrazení na profilové postranní liště'; +$a->strings['Numfriends settings updated.'] = 'Nastavení Numfriends aktualizováno'; $a->strings['Numfriends Settings'] = 'Nastavení Numfriends'; +$a->strings['How many contacts to display on profile sidebar'] = 'Kolik kontaktů zobrazit na profilové postranní liště'; +$a->strings['Submit'] = 'Odeslat'; diff --git a/numfriends/lang/eo/messages.po b/numfriends/lang/eo/messages.po deleted file mode 100644 index 0a8b36a9..00000000 --- a/numfriends/lang/eo/messages.po +++ /dev/null @@ -1,27 +0,0 @@ -# ADDON numfriends -# Copyright (C) -# This file is distributed under the same license as the Friendica numfriends addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 10:58+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: numfriends.php:55 -msgid "How many contacts to display on profile sidebar" -msgstr "" - -#: numfriends.php:60 -msgid "Numfriends Settings" -msgstr "" diff --git a/numfriends/lang/eo/strings.php b/numfriends/lang/eo/strings.php index 68e8a64c..6ad728c1 100644 --- a/numfriends/lang/eo/strings.php +++ b/numfriends/lang/eo/strings.php @@ -1,7 +1,6 @@ -strings["Numfriends settings updated."] = "Ĝisdatigis agordojn por Numfriends."; +$a->strings["Numfriends Settings"] = "Agordoj por Numfriends"; +$a->strings["How many contacts to display on profile sidebar"] = "Kiom da kontaktoj mi montru en la flanka strio"; +$a->strings["Submit"] = "Sendi"; diff --git a/numfriends/lang/et/messages.po b/numfriends/lang/et/messages.po deleted file mode 100644 index b1494fd4..00000000 --- a/numfriends/lang/et/messages.po +++ /dev/null @@ -1,28 +0,0 @@ -# ADDON numfriends -# Copyright (C) -# This file is distributed under the same license as the Friendica numfriends addon package. -# -# -# Translators: -# Rain Hawk, 2020 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 10:58+0000\n" -"Last-Translator: Rain Hawk, 2020\n" -"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: et\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: numfriends.php:55 -msgid "How many contacts to display on profile sidebar" -msgstr "" - -#: numfriends.php:60 -msgid "Numfriends Settings" -msgstr "" diff --git a/numfriends/lang/et/strings.php b/numfriends/lang/et/strings.php deleted file mode 100644 index dfe78358..00000000 --- a/numfriends/lang/et/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gd\n" -"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" - -#: numfriends.php:55 -msgid "How many contacts to display on profile sidebar" -msgstr "" - -#: numfriends.php:60 -msgid "Numfriends Settings" -msgstr "" diff --git a/numfriends/lang/gd/strings.php b/numfriends/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/numfriends/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/numfriends/lang/is/messages.po b/numfriends/lang/is/messages.po deleted file mode 100644 index 3fb035b4..00000000 --- a/numfriends/lang/is/messages.po +++ /dev/null @@ -1,27 +0,0 @@ -# ADDON numfriends -# Copyright (C) -# This file is distributed under the same license as the Friendica numfriends addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 10:58+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: is\n" -"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" - -#: numfriends.php:55 -msgid "How many contacts to display on profile sidebar" -msgstr "" - -#: numfriends.php:60 -msgid "Numfriends Settings" -msgstr "" diff --git a/numfriends/lang/is/strings.php b/numfriends/lang/is/strings.php index 975c341e..ea23b9d5 100644 --- a/numfriends/lang/is/strings.php +++ b/numfriends/lang/is/strings.php @@ -1,7 +1,6 @@ -strings["Numfriends settings updated."] = ""; +$a->strings["Numfriends Settings"] = ""; +$a->strings["How many contacts to display on profile sidebar"] = ""; +$a->strings["Submit"] = "Senda inn"; diff --git a/numfriends/lang/it/messages.po b/numfriends/lang/it/messages.po index 55ac96af..167ad9e1 100644 --- a/numfriends/lang/it/messages.po +++ b/numfriends/lang/it/messages.po @@ -10,20 +10,24 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 10:58+0000\n" -"Last-Translator: Sylke Vicious , 2021\n" -"Language-Team: Italian (http://app.transifex.com/Friendica/friendica/language/it/)\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" +"PO-Revision-Date: 2021-02-16 12:44+0000\n" +"Last-Translator: Sylke Vicious \n" +"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: numfriends.php:55 +#: numfriends.php:59 +msgid "Numfriends Settings" +msgstr "Impostazioni Numfriends" + +#: numfriends.php:61 msgid "How many contacts to display on profile sidebar" msgstr "Quanti contatti visualizzare nella barra laterale del profilo" -#: numfriends.php:60 -msgid "Numfriends Settings" -msgstr "Impostazioni Numfriends" +#: numfriends.php:67 +msgid "Save Settings" +msgstr "Salva Impostazioni" diff --git a/numfriends/lang/it/strings.php b/numfriends/lang/it/strings.php index d593d0ea..208af559 100644 --- a/numfriends/lang/it/strings.php +++ b/numfriends/lang/it/strings.php @@ -3,7 +3,8 @@ if(! function_exists("string_plural_select_it")) { function string_plural_select_it($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} -$a->strings['How many contacts to display on profile sidebar'] = 'Quanti contatti visualizzare nella barra laterale del profilo'; $a->strings['Numfriends Settings'] = 'Impostazioni Numfriends'; +$a->strings['How many contacts to display on profile sidebar'] = 'Quanti contatti visualizzare nella barra laterale del profilo'; +$a->strings['Save Settings'] = 'Salva Impostazioni'; diff --git a/numfriends/numfriends.php b/numfriends/numfriends.php index 5652c8f0..538a4a3e 100644 --- a/numfriends/numfriends.php +++ b/numfriends/numfriends.php @@ -6,7 +6,9 @@ * Author: Mike Macgirvin */ +use Friendica\App; use Friendica\Core\Hook; +use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; @@ -15,7 +17,7 @@ function numfriends_install() { Hook::register('addon_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings'); Hook::register('addon_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post'); - DI::logger()->notice("installed numfriends"); + Logger::notice("installed numfriends"); } /** @@ -37,7 +39,7 @@ function numfriends_settings_post($post) { /** * - * Called from the Addon Setting form. + * Called from the Addon Setting form. * Add our own settings info to the page. * */ @@ -48,7 +50,7 @@ function numfriends_settings(array &$data) } $numfriends = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'display_friend_count', 24); - + $t = Renderer::getMarkupTemplate('settings.tpl', 'addon/numfriends/'); $html = Renderer::replaceMacros($t, [ '$numfriends' => ['numfriends', DI::l10n()->t('How many contacts to display on profile sidebar'), $numfriends], diff --git a/openstreetmap/config/openstreetmap.config.php b/openstreetmap/config/openstreetmap.config.php index d633fd26..c649da5f 100644 --- a/openstreetmap/config/openstreetmap.config.php +++ b/openstreetmap/config/openstreetmap.config.php @@ -10,7 +10,7 @@ return [ 'tmsserver' => 'https://www.openstreetmap.org', // nomserver (String) - 'nomserver' => 'https://nominatim.openstreetmap.org/search', + 'nomserver' => 'https://nominatim.openstreetmap.org/search.php', // zoom (Integer) // The default zoom level on the map. diff --git a/openstreetmap/lang/bg/messages.po b/openstreetmap/lang/bg/messages.po deleted file mode 100644 index e04a56f5..00000000 --- a/openstreetmap/lang/bg/messages.po +++ /dev/null @@ -1,64 +0,0 @@ -# ADDON openstreetmap -# Copyright (C) -# This file is distributed under the same license as the Friendica openstreetmap addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 11:01+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: openstreetmap.php:167 -msgid "View Larger" -msgstr "" - -#: openstreetmap.php:194 -msgid "Submit" -msgstr "" - -#: openstreetmap.php:195 -msgid "Tile Server URL" -msgstr "" - -#: openstreetmap.php:195 -msgid "" -"A list of public tile servers" -msgstr "" - -#: openstreetmap.php:196 -msgid "Nominatim (reverse geocoding) Server URL" -msgstr "" - -#: openstreetmap.php:196 -msgid "" -"A list of Nominatim servers" -msgstr "" - -#: openstreetmap.php:197 -msgid "Default zoom" -msgstr "" - -#: openstreetmap.php:197 -msgid "" -"The default zoom level. (1:world, 18:highest, also depends on tile server)" -msgstr "" - -#: openstreetmap.php:198 -msgid "Include marker on map" -msgstr "" - -#: openstreetmap.php:198 -msgid "Include a marker on the map." -msgstr "" diff --git a/openstreetmap/lang/bg/strings.php b/openstreetmap/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/openstreetmap/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: openstreetmap.php:167 -msgid "View Larger" -msgstr "" - -#: openstreetmap.php:194 -msgid "Submit" -msgstr "" - -#: openstreetmap.php:195 -msgid "Tile Server URL" -msgstr "" - -#: openstreetmap.php:195 -msgid "" -"A list of public tile servers" -msgstr "" - -#: openstreetmap.php:196 -msgid "Nominatim (reverse geocoding) Server URL" -msgstr "" - -#: openstreetmap.php:196 -msgid "" -"A list of Nominatim servers" -msgstr "" - -#: openstreetmap.php:197 -msgid "Default zoom" -msgstr "" - -#: openstreetmap.php:197 -msgid "" -"The default zoom level. (1:world, 18:highest, also depends on tile server)" -msgstr "" - -#: openstreetmap.php:198 -msgid "Include marker on map" -msgstr "" - -#: openstreetmap.php:198 -msgid "Include a marker on the map." -msgstr "" diff --git a/openstreetmap/lang/ca/strings.php b/openstreetmap/lang/ca/strings.php index d34874f6..3c7eeee2 100644 --- a/openstreetmap/lang/ca/strings.php +++ b/openstreetmap/lang/ca/strings.php @@ -1,7 +1,8 @@ -strings["Submit"] = "Enviar"; +$a->strings["Tile Server URL"] = "URL del servidor, del mosaico de servidores"; +$a->strings["A list of public tile servers"] = "Una llista de un mosaic de servidors públics"; +$a->strings["Default zoom"] = "Zoom per defecte"; +$a->strings["The default zoom level. (1:world, 18:highest)"] = "Nivell de zoom per defecte. (1: el món, 18: el més alt)"; +$a->strings["Settings updated."] = "Ajustos actualitzats."; diff --git a/openstreetmap/lang/cs/messages.po b/openstreetmap/lang/cs/messages.po index ee350a4e..6385626b 100644 --- a/openstreetmap/lang/cs/messages.po +++ b/openstreetmap/lang/cs/messages.po @@ -4,63 +4,43 @@ # # # Translators: -# Aditoo, 2018 -# michal_s , 2014-2015 +# Michal Šupler , 2014-2015 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 11:01+0000\n" -"Last-Translator: Aditoo, 2018\n" -"Language-Team: Czech (http://app.transifex.com/Friendica/friendica/language/cs/)\n" +"POT-Creation-Date: 2013-02-27 05:01-0500\n" +"PO-Revision-Date: 2015-02-11 19:39+0000\n" +"Last-Translator: Michal Šupler \n" +"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" -"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: openstreetmap.php:167 -msgid "View Larger" -msgstr "" - -#: openstreetmap.php:194 +#: openstreetmap.php:94 msgid "Submit" msgstr "Odeslat" -#: openstreetmap.php:195 +#: openstreetmap.php:95 msgid "Tile Server URL" msgstr "URL adresa Tile serveru" -#: openstreetmap.php:195 +#: openstreetmap.php:95 msgid "" "A list of public tile servers" -msgstr "" +"target=\"_blank\">public tile servers" +msgstr "Seznam veřejných tile serverů" -#: openstreetmap.php:196 -msgid "Nominatim (reverse geocoding) Server URL" -msgstr "" - -#: openstreetmap.php:196 -msgid "" -"A list of Nominatim servers" -msgstr "" - -#: openstreetmap.php:197 +#: openstreetmap.php:96 msgid "Default zoom" -msgstr "Výchozí zvětšení" +msgstr "Defaultní lupa" -#: openstreetmap.php:197 -msgid "" -"The default zoom level. (1:world, 18:highest, also depends on tile server)" -msgstr "" +#: openstreetmap.php:96 +msgid "The default zoom level. (1:world, 18:highest)" +msgstr "Defaultní nastavení lupy (1:svět, 18:nejvyšší)" -#: openstreetmap.php:198 -msgid "Include marker on map" -msgstr "" - -#: openstreetmap.php:198 -msgid "Include a marker on the map." -msgstr "" +#: openstreetmap.php:104 +msgid "Settings updated." +msgstr "Nastavení aktualizováno." diff --git a/openstreetmap/lang/cs/strings.php b/openstreetmap/lang/cs/strings.php index dc941275..fd4d896d 100644 --- a/openstreetmap/lang/cs/strings.php +++ b/openstreetmap/lang/cs/strings.php @@ -3,8 +3,11 @@ if(! function_exists("string_plural_select_cs")) { function string_plural_select_cs($n){ $n = intval($n); - if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; } + if (($n==1)) { return 0; } else if (($n>=2 && $n<=4)) { return 1; } else { return 2; } }} $a->strings['Submit'] = 'Odeslat'; $a->strings['Tile Server URL'] = 'URL adresa Tile serveru'; -$a->strings['Default zoom'] = 'Výchozí zvětšení'; +$a->strings['A list of public tile servers'] = 'Seznam veřejných tile serverů'; +$a->strings['Default zoom'] = 'Defaultní lupa'; +$a->strings['The default zoom level. (1:world, 18:highest)'] = 'Defaultní nastavení lupy (1:svět, 18:nejvyšší)'; +$a->strings['Settings updated.'] = 'Nastavení aktualizováno.'; diff --git a/openstreetmap/lang/de/messages.po b/openstreetmap/lang/de/messages.po index f99bdb2f..693ed136 100644 --- a/openstreetmap/lang/de/messages.po +++ b/openstreetmap/lang/de/messages.po @@ -13,9 +13,9 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 11:01+0000\n" -"Last-Translator: Tobias Diekershoff , 2021\n" -"Language-Team: German (http://app.transifex.com/Friendica/friendica/language/de/)\n" +"PO-Revision-Date: 2021-12-13 05:55+0000\n" +"Last-Translator: Tobias Diekershoff \n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/openstreetmap/lang/eo/messages.po b/openstreetmap/lang/eo/messages.po deleted file mode 100644 index 9811fde4..00000000 --- a/openstreetmap/lang/eo/messages.po +++ /dev/null @@ -1,64 +0,0 @@ -# ADDON openstreetmap -# Copyright (C) -# This file is distributed under the same license as the Friendica openstreetmap addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 11:01+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: openstreetmap.php:167 -msgid "View Larger" -msgstr "" - -#: openstreetmap.php:194 -msgid "Submit" -msgstr "" - -#: openstreetmap.php:195 -msgid "Tile Server URL" -msgstr "" - -#: openstreetmap.php:195 -msgid "" -"A list of public tile servers" -msgstr "" - -#: openstreetmap.php:196 -msgid "Nominatim (reverse geocoding) Server URL" -msgstr "" - -#: openstreetmap.php:196 -msgid "" -"A list of Nominatim servers" -msgstr "" - -#: openstreetmap.php:197 -msgid "Default zoom" -msgstr "" - -#: openstreetmap.php:197 -msgid "" -"The default zoom level. (1:world, 18:highest, also depends on tile server)" -msgstr "" - -#: openstreetmap.php:198 -msgid "Include marker on map" -msgstr "" - -#: openstreetmap.php:198 -msgid "Include a marker on the map." -msgstr "" diff --git a/openstreetmap/lang/eo/strings.php b/openstreetmap/lang/eo/strings.php index 68e8a64c..5f256dd6 100644 --- a/openstreetmap/lang/eo/strings.php +++ b/openstreetmap/lang/eo/strings.php @@ -1,7 +1,8 @@ -strings["Submit"] = "Sendi"; +$a->strings["Tile Server URL"] = "Adreso de Kahelservilo"; +$a->strings["A list of public tile servers"] = "Listo de publikaj kahelserviloj"; +$a->strings["Default zoom"] = "Defaŭlta zoma faktoro"; +$a->strings["The default zoom level. (1:world, 18:highest)"] = "La defaŭlta zoma faktoro. (1:tutmonda, 18:plej proksima)"; +$a->strings["Settings updated."] = "Agordoj ĝisdatigita."; diff --git a/openstreetmap/lang/et/messages.po b/openstreetmap/lang/et/messages.po deleted file mode 100644 index c6654a5f..00000000 --- a/openstreetmap/lang/et/messages.po +++ /dev/null @@ -1,65 +0,0 @@ -# ADDON openstreetmap -# Copyright (C) -# This file is distributed under the same license as the Friendica openstreetmap addon package. -# -# -# Translators: -# Rain Hawk, 2020 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 11:01+0000\n" -"Last-Translator: Rain Hawk, 2020\n" -"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: et\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: openstreetmap.php:167 -msgid "View Larger" -msgstr "" - -#: openstreetmap.php:194 -msgid "Submit" -msgstr "Saada" - -#: openstreetmap.php:195 -msgid "Tile Server URL" -msgstr "" - -#: openstreetmap.php:195 -msgid "" -"A list of public tile servers" -msgstr "" - -#: openstreetmap.php:196 -msgid "Nominatim (reverse geocoding) Server URL" -msgstr "" - -#: openstreetmap.php:196 -msgid "" -"A list of Nominatim servers" -msgstr "" - -#: openstreetmap.php:197 -msgid "Default zoom" -msgstr "" - -#: openstreetmap.php:197 -msgid "" -"The default zoom level. (1:world, 18:highest, also depends on tile server)" -msgstr "" - -#: openstreetmap.php:198 -msgid "Include marker on map" -msgstr "" - -#: openstreetmap.php:198 -msgid "Include a marker on the map." -msgstr "" diff --git a/openstreetmap/lang/et/strings.php b/openstreetmap/lang/et/strings.php deleted file mode 100644 index 04ee22e7..00000000 --- a/openstreetmap/lang/et/strings.php +++ /dev/null @@ -1,8 +0,0 @@ -strings['Submit'] = 'Saada'; diff --git a/openstreetmap/lang/gd/messages.po b/openstreetmap/lang/gd/messages.po deleted file mode 100644 index 2800943e..00000000 --- a/openstreetmap/lang/gd/messages.po +++ /dev/null @@ -1,64 +0,0 @@ -# ADDON openstreetmap -# Copyright (C) -# This file is distributed under the same license as the Friendica openstreetmap addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 11:01+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gd\n" -"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" - -#: openstreetmap.php:167 -msgid "View Larger" -msgstr "" - -#: openstreetmap.php:194 -msgid "Submit" -msgstr "" - -#: openstreetmap.php:195 -msgid "Tile Server URL" -msgstr "" - -#: openstreetmap.php:195 -msgid "" -"A list of public tile servers" -msgstr "" - -#: openstreetmap.php:196 -msgid "Nominatim (reverse geocoding) Server URL" -msgstr "" - -#: openstreetmap.php:196 -msgid "" -"A list of Nominatim servers" -msgstr "" - -#: openstreetmap.php:197 -msgid "Default zoom" -msgstr "" - -#: openstreetmap.php:197 -msgid "" -"The default zoom level. (1:world, 18:highest, also depends on tile server)" -msgstr "" - -#: openstreetmap.php:198 -msgid "Include marker on map" -msgstr "" - -#: openstreetmap.php:198 -msgid "Include a marker on the map." -msgstr "" diff --git a/openstreetmap/lang/gd/strings.php b/openstreetmap/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/openstreetmap/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/openstreetmap/lang/ru/messages.po b/openstreetmap/lang/ru/messages.po deleted file mode 100644 index 3dc8cc2a..00000000 --- a/openstreetmap/lang/ru/messages.po +++ /dev/null @@ -1,64 +0,0 @@ -# ADDON openstreetmap -# Copyright (C) -# This file is distributed under the same license as the Friendica openstreetmap addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 11:01+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Russian (http://app.transifex.com/Friendica/friendica/language/ru/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" - -#: openstreetmap.php:167 -msgid "View Larger" -msgstr "" - -#: openstreetmap.php:194 -msgid "Submit" -msgstr "Добавить" - -#: openstreetmap.php:195 -msgid "Tile Server URL" -msgstr "" - -#: openstreetmap.php:195 -msgid "" -"A list of public tile servers" -msgstr "" - -#: openstreetmap.php:196 -msgid "Nominatim (reverse geocoding) Server URL" -msgstr "" - -#: openstreetmap.php:196 -msgid "" -"A list of Nominatim servers" -msgstr "" - -#: openstreetmap.php:197 -msgid "Default zoom" -msgstr "" - -#: openstreetmap.php:197 -msgid "" -"The default zoom level. (1:world, 18:highest, also depends on tile server)" -msgstr "" - -#: openstreetmap.php:198 -msgid "Include marker on map" -msgstr "" - -#: openstreetmap.php:198 -msgid "Include a marker on the map." -msgstr "" diff --git a/openstreetmap/lang/ru/strings.php b/openstreetmap/lang/ru/strings.php index 0b7afb84..e249d2dc 100644 --- a/openstreetmap/lang/ru/strings.php +++ b/openstreetmap/lang/ru/strings.php @@ -1,8 +1,8 @@ -=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; } -}} -$a->strings['Submit'] = 'Добавить'; +strings["Submit"] = "Подтвердить"; +$a->strings["Tile Server URL"] = ""; +$a->strings["A list of public tile servers"] = "Список общедоступных серверов"; +$a->strings["Default zoom"] = "zoom по умолчанию"; +$a->strings["The default zoom level. (1:world, 18:highest)"] = ""; +$a->strings["Settings updated."] = "Настройки обновлены."; diff --git a/openstreetmap/openstreetmap.php b/openstreetmap/openstreetmap.php index bf0f54b6..3c21a51f 100644 --- a/openstreetmap/openstreetmap.php +++ b/openstreetmap/openstreetmap.php @@ -9,8 +9,10 @@ * */ +use Friendica\App; use Friendica\Core\Cache\Enum\Duration; use Friendica\Core\Hook; +use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; use Friendica\Core\Config\Util\ConfigFileManager; @@ -30,17 +32,17 @@ function openstreetmap_install() Hook::register('Map::getCoordinates', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_get_coordinates'); Hook::register('page_header', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_alterheader'); - DI::logger()->notice("installed openstreetmap"); + Logger::notice("installed openstreetmap"); } function openstreetmap_load_config(ConfigFileManager $loader) { - DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('openstreetmap'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); + DI::app()->getConfigCache()->load($loader->loadAddonConfig('openstreetmap'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } function openstreetmap_alterheader(&$navHtml) { - $addScriptTag = '' . "\r\n"; + $addScriptTag = '' . "\r\n"; DI::page()['htmlhead'] .= $addScriptTag; } @@ -119,7 +121,7 @@ function openstreetmap_get_coordinates(array &$b) if (is_null($j)) { $curlResult = DI::httpClient()->get($nomserver . $args); if ($curlResult->isSuccess()) { - $j = json_decode($curlResult->getBodyString(), true); + $j = json_decode($curlResult->getBody(), true); DI::cache()->set($cachekey, $j, Duration::MONTH); } } @@ -143,7 +145,7 @@ function openstreetmap_generate_map(array &$b) { $tmsserver = DI::config()->get('openstreetmap', 'tmsserver', OSM_TMS); - if (strpos(DI::baseUrl(), 'https:') !== false) { + if (strpos(DI::baseUrl()->get(true), 'https:') !== false) { $tmsserver = str_replace('http:','https:',$tmsserver); } @@ -153,8 +155,8 @@ function openstreetmap_generate_map(array &$b) $lat = $b['lat']; // round($b['lat'], 5); $lon = $b['lon']; // round($b['lon'], 5); - DI::logger()->debug('lat: ' . $lat); - DI::logger()->debug('lon: ' . $lon); + Logger::debug('lat: ' . $lat); + Logger::debug('lon: ' . $lon); $cardlink = '\n" -"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: pageheader.php:36 -msgid "\"pageheader\" Settings" -msgstr "" - -#: pageheader.php:37 -msgid "Message" -msgstr "" - -#: pageheader.php:37 -msgid "" -"Message to display on every page on this server (or put a pageheader.html " -"file in your docroot)" -msgstr "" - -#: pageheader.php:38 -msgid "Save Settings" -msgstr "" diff --git a/pageheader/lang/bg/strings.php b/pageheader/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/pageheader/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: pageheader.php:36 -msgid "\"pageheader\" Settings" -msgstr "" - -#: pageheader.php:37 -msgid "Message" -msgstr "" - -#: pageheader.php:37 -msgid "" -"Message to display on every page on this server (or put a pageheader.html " -"file in your docroot)" -msgstr "" - -#: pageheader.php:38 -msgid "Save Settings" -msgstr "" diff --git a/pageheader/lang/ca/strings.php b/pageheader/lang/ca/strings.php index d34874f6..389bdc27 100644 --- a/pageheader/lang/ca/strings.php +++ b/pageheader/lang/ca/strings.php @@ -1,7 +1,5 @@ -strings["\"pageheader\" Settings"] = "Configuració de la capçalera de pàgina."; +$a->strings["Submit"] = "Enviar"; +$a->strings["pageheader Settings saved."] = "guardada la configuració de la capçalera de pàgina."; diff --git a/pageheader/lang/cs/messages.po b/pageheader/lang/cs/messages.po index 4caf402e..1621e180 100644 --- a/pageheader/lang/cs/messages.po +++ b/pageheader/lang/cs/messages.po @@ -4,37 +4,40 @@ # # # Translators: -# Aditoo, 2018 -# Aditoo, 2018 +# Lorem Ipsum , 2018 # michal_s , 2014-2015 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 11:17+0000\n" -"Last-Translator: Aditoo, 2018\n" -"Language-Team: Czech (http://app.transifex.com/Friendica/friendica/language/cs/)\n" +"POT-Creation-Date: 2018-03-11 18:52+0100\n" +"PO-Revision-Date: 2018-06-10 09:12+0000\n" +"Last-Translator: Lorem Ipsum \n" +"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" "Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" -#: pageheader.php:36 +#: pageheader.php:53 msgid "\"pageheader\" Settings" msgstr "Nastavení záhlaví stránky" -#: pageheader.php:37 +#: pageheader.php:54 msgid "Message" msgstr "Zpráva" -#: pageheader.php:37 +#: pageheader.php:54 msgid "" "Message to display on every page on this server (or put a pageheader.html " "file in your docroot)" -msgstr "Zpráva, která má být zobrazena na každé stránce tohoto serveru (nebo vložte do kořenové složky Vašeho serveru soubor pageheader.html)" +msgstr "Zpráva, která má být zobrazena na každé stránce tohoto serveru (nebo vložte soubor pageheader.html do kořenové složky Vašeho serveru)" -#: pageheader.php:38 +#: pageheader.php:55 msgid "Save Settings" msgstr "Uložit nastavení" + +#: pageheader.php:69 +msgid "pageheader Settings saved." +msgstr "Nastavení záhlaví stránky uloženo." diff --git a/pageheader/lang/cs/strings.php b/pageheader/lang/cs/strings.php index 3cb727cc..0675ea52 100644 --- a/pageheader/lang/cs/strings.php +++ b/pageheader/lang/cs/strings.php @@ -7,5 +7,6 @@ function string_plural_select_cs($n){ }} $a->strings['"pageheader" Settings'] = 'Nastavení záhlaví stránky'; $a->strings['Message'] = 'Zpráva'; -$a->strings['Message to display on every page on this server (or put a pageheader.html file in your docroot)'] = 'Zpráva, která má být zobrazena na každé stránce tohoto serveru (nebo vložte do kořenové složky Vašeho serveru soubor pageheader.html)'; +$a->strings['Message to display on every page on this server (or put a pageheader.html file in your docroot)'] = 'Zpráva, která má být zobrazena na každé stránce tohoto serveru (nebo vložte soubor pageheader.html do kořenové složky Vašeho serveru)'; $a->strings['Save Settings'] = 'Uložit nastavení'; +$a->strings['pageheader Settings saved.'] = 'Nastavení záhlaví stránky uloženo.'; diff --git a/pageheader/lang/eo/messages.po b/pageheader/lang/eo/messages.po deleted file mode 100644 index cba09466..00000000 --- a/pageheader/lang/eo/messages.po +++ /dev/null @@ -1,37 +0,0 @@ -# ADDON pageheader -# Copyright (C) -# This file is distributed under the same license as the Friendica pageheader addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 11:17+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: pageheader.php:36 -msgid "\"pageheader\" Settings" -msgstr "" - -#: pageheader.php:37 -msgid "Message" -msgstr "" - -#: pageheader.php:37 -msgid "" -"Message to display on every page on this server (or put a pageheader.html " -"file in your docroot)" -msgstr "" - -#: pageheader.php:38 -msgid "Save Settings" -msgstr "" diff --git a/pageheader/lang/eo/strings.php b/pageheader/lang/eo/strings.php index 68e8a64c..5a23c2af 100644 --- a/pageheader/lang/eo/strings.php +++ b/pageheader/lang/eo/strings.php @@ -1,7 +1,5 @@ -strings["\"pageheader\" Settings"] = "\"pageheader\" Agordoj"; +$a->strings["Submit"] = "Sendi"; +$a->strings["pageheader Settings saved."] = "Konservis Agordojn de pageheader."; diff --git a/pageheader/lang/et/messages.po b/pageheader/lang/et/messages.po deleted file mode 100644 index bb50926a..00000000 --- a/pageheader/lang/et/messages.po +++ /dev/null @@ -1,37 +0,0 @@ -# ADDON pageheader -# Copyright (C) -# This file is distributed under the same license as the Friendica pageheader addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 11:17+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: et\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: pageheader.php:36 -msgid "\"pageheader\" Settings" -msgstr "" - -#: pageheader.php:37 -msgid "Message" -msgstr "" - -#: pageheader.php:37 -msgid "" -"Message to display on every page on this server (or put a pageheader.html " -"file in your docroot)" -msgstr "" - -#: pageheader.php:38 -msgid "Save Settings" -msgstr "" diff --git a/pageheader/lang/et/strings.php b/pageheader/lang/et/strings.php deleted file mode 100644 index dfe78358..00000000 --- a/pageheader/lang/et/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gd\n" -"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" - -#: pageheader.php:36 -msgid "\"pageheader\" Settings" -msgstr "" - -#: pageheader.php:37 -msgid "Message" -msgstr "" - -#: pageheader.php:37 -msgid "" -"Message to display on every page on this server (or put a pageheader.html " -"file in your docroot)" -msgstr "" - -#: pageheader.php:38 -msgid "Save Settings" -msgstr "" diff --git a/pageheader/lang/gd/strings.php b/pageheader/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/pageheader/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/pageheader/lang/is/messages.po b/pageheader/lang/is/messages.po deleted file mode 100644 index c2eb5d5c..00000000 --- a/pageheader/lang/is/messages.po +++ /dev/null @@ -1,37 +0,0 @@ -# ADDON pageheader -# Copyright (C) -# This file is distributed under the same license as the Friendica pageheader addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 11:17+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: is\n" -"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" - -#: pageheader.php:36 -msgid "\"pageheader\" Settings" -msgstr "" - -#: pageheader.php:37 -msgid "Message" -msgstr "" - -#: pageheader.php:37 -msgid "" -"Message to display on every page on this server (or put a pageheader.html " -"file in your docroot)" -msgstr "" - -#: pageheader.php:38 -msgid "Save Settings" -msgstr "" diff --git a/pageheader/lang/is/strings.php b/pageheader/lang/is/strings.php index 975c341e..86c571ee 100644 --- a/pageheader/lang/is/strings.php +++ b/pageheader/lang/is/strings.php @@ -1,7 +1,5 @@ -strings["\"pageheader\" Settings"] = "Stillingar \"pageheader\""; +$a->strings["Submit"] = "Senda inn"; +$a->strings["pageheader Settings saved."] = "Stillingar pageheader vistaðar."; diff --git a/pageheader/lang/it/messages.po b/pageheader/lang/it/messages.po index 2da356d0..f3ac805c 100644 --- a/pageheader/lang/it/messages.po +++ b/pageheader/lang/it/messages.po @@ -9,30 +9,34 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 11:17+0000\n" -"Last-Translator: fabrixxm , 2014-2015,2018\n" -"Language-Team: Italian (http://app.transifex.com/Friendica/friendica/language/it/)\n" +"POT-Creation-Date: 2018-03-11 18:52+0100\n" +"PO-Revision-Date: 2018-03-19 13:19+0000\n" +"Last-Translator: fabrixxm \n" +"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: pageheader.php:36 +#: pageheader.php:53 msgid "\"pageheader\" Settings" msgstr "Impostazioni \"Intestazione pagina\"" -#: pageheader.php:37 +#: pageheader.php:54 msgid "Message" msgstr "Messaggio" -#: pageheader.php:37 +#: pageheader.php:54 msgid "" "Message to display on every page on this server (or put a pageheader.html " "file in your docroot)" msgstr "Il messaggio da mostrare su ogni pagina di questo server (puoi anche aggiungere un file pageheader.html nella root)" -#: pageheader.php:38 +#: pageheader.php:55 msgid "Save Settings" msgstr "Salva Impostazioni" + +#: pageheader.php:69 +msgid "pageheader Settings saved." +msgstr "Impostazioni \"Intestazione pagina\" salvate." diff --git a/pageheader/lang/it/strings.php b/pageheader/lang/it/strings.php index deed2ed9..ed5257f7 100644 --- a/pageheader/lang/it/strings.php +++ b/pageheader/lang/it/strings.php @@ -3,9 +3,10 @@ if(! function_exists("string_plural_select_it")) { function string_plural_select_it($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} $a->strings['"pageheader" Settings'] = 'Impostazioni "Intestazione pagina"'; $a->strings['Message'] = 'Messaggio'; $a->strings['Message to display on every page on this server (or put a pageheader.html file in your docroot)'] = 'Il messaggio da mostrare su ogni pagina di questo server (puoi anche aggiungere un file pageheader.html nella root)'; $a->strings['Save Settings'] = 'Salva Impostazioni'; +$a->strings['pageheader Settings saved.'] = 'Impostazioni "Intestazione pagina" salvate.'; diff --git a/pageheader/pageheader.css b/pageheader/pageheader.css index f6c28fbf..8b3282fb 100644 --- a/pageheader/pageheader.css +++ b/pageheader/pageheader.css @@ -20,9 +20,4 @@ width: 100%; margin-top: 25px; font-size: 20px; - /* The pageheader box */ - padding: 20px; - border: 1px solid transparent; - border-radius: 2px; - margin-bottom: 15px; } diff --git a/pageheader/pageheader.php b/pageheader/pageheader.php index d729acc1..057bb863 100644 --- a/pageheader/pageheader.php +++ b/pageheader/pageheader.php @@ -5,9 +5,10 @@ * Version: 1.1 * Author: Keith Fernie * Hauke Altmann - * + * */ +use Friendica\App; use Friendica\Core\Hook; use Friendica\Core\Renderer; use Friendica\DI; diff --git a/phpmailer/composer.json b/phpmailer/composer.json index 84d18543..5779773a 100644 --- a/phpmailer/composer.json +++ b/phpmailer/composer.json @@ -1,22 +1,22 @@ { - "name": "friendica-addons/phpmailer", - "description": "Replaces the default `mail()` function by the `PHPMailer` library", - "type": "friendica-addon", - "authors": [ - { - "name": "Marcus Mueller", - "role": "Developer" - } - ], - "require": { - "php": ">=7.0", - "phpmailer/phpmailer": "^6.1" - }, - "license": "3-clause BSD license", - "minimum-stability": "stable", - "config": { - "optimize-autoloader": true, - "autoloader-suffix": "PhpMailerAddon", - "preferred-install": "dist" - } + "name": "friendica-addons/phpmailer", + "description": "Replaces the default `mail()` function by the `PHPMailer` library", + "type": "friendica-addon", + "authors": [ + { + "name": "Marcus Mueller", + "role": "Developer" + } + ], + "require": { + "php": ">=7.0", + "phpmailer/phpmailer": "^6.1" + }, + "license": "3-clause BSD license", + "minimum-stability": "stable", + "config": { + "optimize-autoloader": true, + "autoloader-suffix": "PhpMailerAddon", + "preferred-install": "dist" + } } diff --git a/phpmailer/composer.lock b/phpmailer/composer.lock index 7cd1afd5..b1f2a5d9 100644 --- a/phpmailer/composer.lock +++ b/phpmailer/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "phpmailer/phpmailer", - "version": "v6.10.0", + "version": "v6.5.0", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "bf74d75a1fde6beaa34a0ddae2ec5fce0f72a144" + "reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/bf74d75a1fde6beaa34a0ddae2ec5fce0f72a144", - "reference": "bf74d75a1fde6beaa34a0ddae2ec5fce0f72a144", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a5b5c43e50b7fba655f793ad27303cd74c57363c", + "reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c", "shasum": "" }, "require": { @@ -27,25 +27,20 @@ "php": ">=5.5.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^1.0", - "doctrine/annotations": "^1.2.6 || ^1.13.3", - "php-parallel-lint/php-console-highlighter": "^1.0.0", - "php-parallel-lint/php-parallel-lint": "^1.3.2", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "doctrine/annotations": "^1.2", "phpcompatibility/php-compatibility": "^9.3.5", "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.7.2", - "yoast/phpunit-polyfills": "^1.0.4" + "squizlabs/php_codesniffer": "^3.5.6", + "yoast/phpunit-polyfills": "^0.2.0" }, "suggest": { - "decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication", "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", - "ext-openssl": "Needed for secure SMTP sending and DKIM signing", - "greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication", "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", "league/oauth2-google": "Needed for Google XOAUTH2 authentication", "psr/log": "For optional PSR-3 debug logging", - "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)", - "thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication" + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" }, "type": "library", "autoload": { @@ -77,7 +72,7 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.10.0" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.0" }, "funding": [ { @@ -85,18 +80,18 @@ "type": "github" } ], - "time": "2025-04-24T15:19:31+00:00" + "time": "2021-06-16T14:33:43+00:00" } ], "packages-dev": [], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { "php": ">=7.0" }, - "platform-dev": {}, - "plugin-api-version": "2.6.0" + "platform-dev": [], + "plugin-api-version": "2.1.0" } diff --git a/phpmailer/phpmailer.php b/phpmailer/phpmailer.php index 10287a04..4c12709d 100644 --- a/phpmailer/phpmailer.php +++ b/phpmailer/phpmailer.php @@ -7,6 +7,7 @@ * Maintainer: Hypolite Petovan */ +use Friendica\App; use Friendica\Core\Hook; use Friendica\DI; use Friendica\Object\EMail\IEmail; @@ -24,18 +25,14 @@ function phpmailer_install() function phpmailer_load_config(ConfigFileManager $loader) { - DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('phpmailer'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); + DI::app()->getConfigCache()->load($loader->loadAddonConfig('phpmailer'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } /** - * @param null|IEmail $email + * @param IEmail $email */ -function phpmailer_emailer_send_prepare(?IEmail &$email) +function phpmailer_emailer_send_prepare(IEmail &$email) { - if ($email === null) { - return; - } - // Passing `true` enables exceptions $mailer = new PHPMailer(true); try { diff --git a/phpmailer/vendor/autoload.php b/phpmailer/vendor/autoload.php index 1d45b283..60925835 100644 --- a/phpmailer/vendor/autoload.php +++ b/phpmailer/vendor/autoload.php @@ -2,24 +2,6 @@ // autoload.php @generated by Composer -if (PHP_VERSION_ID < 50600) { - if (!headers_sent()) { - header('HTTP/1.1 500 Internal Server Error'); - } - $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; - if (!ini_get('display_errors')) { - if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { - fwrite(STDERR, $err); - } elseif (!headers_sent()) { - echo $err; - } - } - trigger_error( - $err, - E_USER_ERROR - ); -} - require_once __DIR__ . '/composer/autoload_real.php'; return ComposerAutoloaderInitPhpMailerAddon::getLoader(); diff --git a/phpmailer/vendor/composer/ClassLoader.php b/phpmailer/vendor/composer/ClassLoader.php index 7824d8f7..03b9bb9c 100644 --- a/phpmailer/vendor/composer/ClassLoader.php +++ b/phpmailer/vendor/composer/ClassLoader.php @@ -37,81 +37,26 @@ namespace Composer\Autoload; * * @author Fabien Potencier * @author Jordi Boggiano - * @see https://www.php-fig.org/psr/psr-0/ - * @see https://www.php-fig.org/psr/psr-4/ + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ */ class ClassLoader { - /** @var \Closure(string):void */ - private static $includeFile; - - /** @var string|null */ - private $vendorDir; - // PSR-4 - /** - * @var array> - */ private $prefixLengthsPsr4 = array(); - /** - * @var array> - */ private $prefixDirsPsr4 = array(); - /** - * @var list - */ private $fallbackDirsPsr4 = array(); // PSR-0 - /** - * List of PSR-0 prefixes - * - * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) - * - * @var array>> - */ private $prefixesPsr0 = array(); - /** - * @var list - */ private $fallbackDirsPsr0 = array(); - /** @var bool */ private $useIncludePath = false; - - /** - * @var array - */ private $classMap = array(); - - /** @var bool */ private $classMapAuthoritative = false; - - /** - * @var array - */ private $missingClasses = array(); - - /** @var string|null */ private $apcuPrefix; - /** - * @var array - */ - private static $registeredLoaders = array(); - - /** - * @param string|null $vendorDir - */ - public function __construct($vendorDir = null) - { - $this->vendorDir = $vendorDir; - self::initializeIncludeClosure(); - } - - /** - * @return array> - */ public function getPrefixes() { if (!empty($this->prefixesPsr0)) { @@ -121,42 +66,28 @@ class ClassLoader return array(); } - /** - * @return array> - */ public function getPrefixesPsr4() { return $this->prefixDirsPsr4; } - /** - * @return list - */ public function getFallbackDirs() { return $this->fallbackDirsPsr0; } - /** - * @return list - */ public function getFallbackDirsPsr4() { return $this->fallbackDirsPsr4; } - /** - * @return array Array of classname => path - */ public function getClassMap() { return $this->classMap; } /** - * @param array $classMap Class to filename map - * - * @return void + * @param array $classMap Class to filename map */ public function addClassMap(array $classMap) { @@ -171,25 +102,22 @@ class ClassLoader * Registers a set of PSR-0 directories for a given prefix, either * appending or prepending to the ones previously set for this prefix. * - * @param string $prefix The prefix - * @param list|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - * - * @return void + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories */ public function add($prefix, $paths, $prepend = false) { - $paths = (array) $paths; if (!$prefix) { if ($prepend) { $this->fallbackDirsPsr0 = array_merge( - $paths, + (array) $paths, $this->fallbackDirsPsr0 ); } else { $this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0, - $paths + (array) $paths ); } @@ -198,19 +126,19 @@ class ClassLoader $first = $prefix[0]; if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = $paths; + $this->prefixesPsr0[$first][$prefix] = (array) $paths; return; } if ($prepend) { $this->prefixesPsr0[$first][$prefix] = array_merge( - $paths, + (array) $paths, $this->prefixesPsr0[$first][$prefix] ); } else { $this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix], - $paths + (array) $paths ); } } @@ -219,28 +147,25 @@ class ClassLoader * Registers a set of PSR-4 directories for a given namespace, either * appending or prepending to the ones previously set for this namespace. * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param list|string $paths The PSR-4 base directories - * @param bool $prepend Whether to prepend the directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories * * @throws \InvalidArgumentException - * - * @return void */ public function addPsr4($prefix, $paths, $prepend = false) { - $paths = (array) $paths; if (!$prefix) { // Register directories for the root namespace. if ($prepend) { $this->fallbackDirsPsr4 = array_merge( - $paths, + (array) $paths, $this->fallbackDirsPsr4 ); } else { $this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4, - $paths + (array) $paths ); } } elseif (!isset($this->prefixDirsPsr4[$prefix])) { @@ -250,18 +175,18 @@ class ClassLoader throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); } $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = $paths; + $this->prefixDirsPsr4[$prefix] = (array) $paths; } elseif ($prepend) { // Prepend directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( - $paths, + (array) $paths, $this->prefixDirsPsr4[$prefix] ); } else { // Append directories for an already registered namespace. $this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix], - $paths + (array) $paths ); } } @@ -270,10 +195,8 @@ class ClassLoader * Registers a set of PSR-0 directories for a given prefix, * replacing any others previously set for this prefix. * - * @param string $prefix The prefix - * @param list|string $paths The PSR-0 base directories - * - * @return void + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories */ public function set($prefix, $paths) { @@ -288,12 +211,10 @@ class ClassLoader * Registers a set of PSR-4 directories for a given namespace, * replacing any others previously set for this namespace. * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param list|string $paths The PSR-4 base directories + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories * * @throws \InvalidArgumentException - * - * @return void */ public function setPsr4($prefix, $paths) { @@ -313,8 +234,6 @@ class ClassLoader * Turns on searching the include path for class files. * * @param bool $useIncludePath - * - * @return void */ public function setUseIncludePath($useIncludePath) { @@ -337,8 +256,6 @@ class ClassLoader * that have not been registered with the class map. * * @param bool $classMapAuthoritative - * - * @return void */ public function setClassMapAuthoritative($classMapAuthoritative) { @@ -359,8 +276,6 @@ class ClassLoader * APCu prefix to use to cache found/not-found classes, if the extension is enabled. * * @param string|null $apcuPrefix - * - * @return void */ public function setApcuPrefix($apcuPrefix) { @@ -381,55 +296,33 @@ class ClassLoader * Registers this instance as an autoloader. * * @param bool $prepend Whether to prepend the autoloader or not - * - * @return void */ public function register($prepend = false) { spl_autoload_register(array($this, 'loadClass'), true, $prepend); - - if (null === $this->vendorDir) { - return; - } - - if ($prepend) { - self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; - } else { - unset(self::$registeredLoaders[$this->vendorDir]); - self::$registeredLoaders[$this->vendorDir] = $this; - } } /** * Unregisters this instance as an autoloader. - * - * @return void */ public function unregister() { spl_autoload_unregister(array($this, 'loadClass')); - - if (null !== $this->vendorDir) { - unset(self::$registeredLoaders[$this->vendorDir]); - } } /** * Loads the given class or interface. * * @param string $class The name of the class - * @return true|null True if loaded, null otherwise + * @return bool|null True if loaded, null otherwise */ public function loadClass($class) { if ($file = $this->findFile($class)) { - $includeFile = self::$includeFile; - $includeFile($file); + includeFile($file); return true; } - - return null; } /** @@ -474,21 +367,6 @@ class ClassLoader return $file; } - /** - * Returns the currently registered loaders keyed by their corresponding vendor directories. - * - * @return array - */ - public static function getRegisteredLoaders() - { - return self::$registeredLoaders; - } - - /** - * @param string $class - * @param string $ext - * @return string|false - */ private function findFileWithExtension($class, $ext) { // PSR-4 lookup @@ -554,26 +432,14 @@ class ClassLoader return false; } - - /** - * @return void - */ - private static function initializeIncludeClosure() - { - if (self::$includeFile !== null) { - return; - } - - /** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - * - * @param string $file - * @return void - */ - self::$includeFile = \Closure::bind(static function($file) { - include $file; - }, null, null); - } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; } diff --git a/phpmailer/vendor/composer/InstalledVersions.php b/phpmailer/vendor/composer/InstalledVersions.php deleted file mode 100644 index 51e734a7..00000000 --- a/phpmailer/vendor/composer/InstalledVersions.php +++ /dev/null @@ -1,359 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer; - -use Composer\Autoload\ClassLoader; -use Composer\Semver\VersionParser; - -/** - * This class is copied in every Composer installed project and available to all - * - * See also https://getcomposer.org/doc/07-runtime.md#installed-versions - * - * To require its presence, you can require `composer-runtime-api ^2.0` - * - * @final - */ -class InstalledVersions -{ - /** - * @var mixed[]|null - * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null - */ - private static $installed; - - /** - * @var bool|null - */ - private static $canGetVendors; - - /** - * @var array[] - * @psalm-var array}> - */ - private static $installedByVendor = array(); - - /** - * Returns a list of all package names which are present, either by being installed, replaced or provided - * - * @return string[] - * @psalm-return list - */ - public static function getInstalledPackages() - { - $packages = array(); - foreach (self::getInstalled() as $installed) { - $packages[] = array_keys($installed['versions']); - } - - if (1 === \count($packages)) { - return $packages[0]; - } - - return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); - } - - /** - * Returns a list of all package names with a specific type e.g. 'library' - * - * @param string $type - * @return string[] - * @psalm-return list - */ - public static function getInstalledPackagesByType($type) - { - $packagesByType = array(); - - foreach (self::getInstalled() as $installed) { - foreach ($installed['versions'] as $name => $package) { - if (isset($package['type']) && $package['type'] === $type) { - $packagesByType[] = $name; - } - } - } - - return $packagesByType; - } - - /** - * Checks whether the given package is installed - * - * This also returns true if the package name is provided or replaced by another package - * - * @param string $packageName - * @param bool $includeDevRequirements - * @return bool - */ - public static function isInstalled($packageName, $includeDevRequirements = true) - { - foreach (self::getInstalled() as $installed) { - if (isset($installed['versions'][$packageName])) { - return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; - } - } - - return false; - } - - /** - * Checks whether the given package satisfies a version constraint - * - * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: - * - * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') - * - * @param VersionParser $parser Install composer/semver to have access to this class and functionality - * @param string $packageName - * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package - * @return bool - */ - public static function satisfies(VersionParser $parser, $packageName, $constraint) - { - $constraint = $parser->parseConstraints((string) $constraint); - $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); - - return $provided->matches($constraint); - } - - /** - * Returns a version constraint representing all the range(s) which are installed for a given package - * - * It is easier to use this via isInstalled() with the $constraint argument if you need to check - * whether a given version of a package is installed, and not just whether it exists - * - * @param string $packageName - * @return string Version constraint usable with composer/semver - */ - public static function getVersionRanges($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - $ranges = array(); - if (isset($installed['versions'][$packageName]['pretty_version'])) { - $ranges[] = $installed['versions'][$packageName]['pretty_version']; - } - if (array_key_exists('aliases', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); - } - if (array_key_exists('replaced', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); - } - if (array_key_exists('provided', $installed['versions'][$packageName])) { - $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); - } - - return implode(' || ', $ranges); - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present - */ - public static function getVersion($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['version'])) { - return null; - } - - return $installed['versions'][$packageName]['version']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present - */ - public static function getPrettyVersion($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['pretty_version'])) { - return null; - } - - return $installed['versions'][$packageName]['pretty_version']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference - */ - public static function getReference($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - if (!isset($installed['versions'][$packageName]['reference'])) { - return null; - } - - return $installed['versions'][$packageName]['reference']; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @param string $packageName - * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path. - */ - public static function getInstallPath($packageName) - { - foreach (self::getInstalled() as $installed) { - if (!isset($installed['versions'][$packageName])) { - continue; - } - - return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null; - } - - throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); - } - - /** - * @return array - * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} - */ - public static function getRootPackage() - { - $installed = self::getInstalled(); - - return $installed[0]['root']; - } - - /** - * Returns the raw installed.php data for custom implementations - * - * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. - * @return array[] - * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} - */ - public static function getRawData() - { - @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED); - - if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { - self::$installed = include __DIR__ . '/installed.php'; - } else { - self::$installed = array(); - } - } - - return self::$installed; - } - - /** - * Returns the raw data of all installed.php which are currently loaded for custom implementations - * - * @return array[] - * @psalm-return list}> - */ - public static function getAllRawData() - { - return self::getInstalled(); - } - - /** - * Lets you reload the static array from another file - * - * This is only useful for complex integrations in which a project needs to use - * this class but then also needs to execute another project's autoloader in process, - * and wants to ensure both projects have access to their version of installed.php. - * - * A typical case would be PHPUnit, where it would need to make sure it reads all - * the data it needs from this class, then call reload() with - * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure - * the project in which it runs can then also use this class safely, without - * interference between PHPUnit's dependencies and the project's dependencies. - * - * @param array[] $data A vendor/composer/installed.php data set - * @return void - * - * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data - */ - public static function reload($data) - { - self::$installed = $data; - self::$installedByVendor = array(); - } - - /** - * @return array[] - * @psalm-return list}> - */ - private static function getInstalled() - { - if (null === self::$canGetVendors) { - self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); - } - - $installed = array(); - - if (self::$canGetVendors) { - foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { - if (isset(self::$installedByVendor[$vendorDir])) { - $installed[] = self::$installedByVendor[$vendorDir]; - } elseif (is_file($vendorDir.'/composer/installed.php')) { - /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ - $required = require $vendorDir.'/composer/installed.php'; - $installed[] = self::$installedByVendor[$vendorDir] = $required; - if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { - self::$installed = $installed[count($installed) - 1]; - } - } - } - } - - if (null === self::$installed) { - // only require the installed.php file if this file is loaded from its dumped location, - // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 - if (substr(__DIR__, -8, 1) !== 'C') { - /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ - $required = require __DIR__ . '/installed.php'; - self::$installed = $required; - } else { - self::$installed = array(); - } - } - - if (self::$installed !== array()) { - $installed[] = self::$installed; - } - - return $installed; - } -} diff --git a/phpmailer/vendor/composer/autoload_classmap.php b/phpmailer/vendor/composer/autoload_classmap.php index c20440c1..6000382d 100644 --- a/phpmailer/vendor/composer/autoload_classmap.php +++ b/phpmailer/vendor/composer/autoload_classmap.php @@ -2,15 +2,12 @@ // autoload_classmap.php @generated by Composer -$vendorDir = dirname(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( - 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', - 'PHPMailer\\PHPMailer\\DSNConfigurator' => $vendorDir . '/phpmailer/phpmailer/src/DSNConfigurator.php', 'PHPMailer\\PHPMailer\\Exception' => $vendorDir . '/phpmailer/phpmailer/src/Exception.php', 'PHPMailer\\PHPMailer\\OAuth' => $vendorDir . '/phpmailer/phpmailer/src/OAuth.php', - 'PHPMailer\\PHPMailer\\OAuthTokenProvider' => $vendorDir . '/phpmailer/phpmailer/src/OAuthTokenProvider.php', 'PHPMailer\\PHPMailer\\PHPMailer' => $vendorDir . '/phpmailer/phpmailer/src/PHPMailer.php', 'PHPMailer\\PHPMailer\\POP3' => $vendorDir . '/phpmailer/phpmailer/src/POP3.php', 'PHPMailer\\PHPMailer\\SMTP' => $vendorDir . '/phpmailer/phpmailer/src/SMTP.php', diff --git a/phpmailer/vendor/composer/autoload_namespaces.php b/phpmailer/vendor/composer/autoload_namespaces.php index 15a2ff3a..b7fc0125 100644 --- a/phpmailer/vendor/composer/autoload_namespaces.php +++ b/phpmailer/vendor/composer/autoload_namespaces.php @@ -2,7 +2,7 @@ // autoload_namespaces.php @generated by Composer -$vendorDir = dirname(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( diff --git a/phpmailer/vendor/composer/autoload_psr4.php b/phpmailer/vendor/composer/autoload_psr4.php index 28567a00..0706da6f 100644 --- a/phpmailer/vendor/composer/autoload_psr4.php +++ b/phpmailer/vendor/composer/autoload_psr4.php @@ -2,7 +2,7 @@ // autoload_psr4.php @generated by Composer -$vendorDir = dirname(__DIR__); +$vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( diff --git a/phpmailer/vendor/composer/autoload_real.php b/phpmailer/vendor/composer/autoload_real.php index 65adf3da..e7e97ae8 100644 --- a/phpmailer/vendor/composer/autoload_real.php +++ b/phpmailer/vendor/composer/autoload_real.php @@ -22,14 +22,31 @@ class ComposerAutoloaderInitPhpMailerAddon return self::$loader; } - require __DIR__ . '/platform_check.php'; - spl_autoload_register(array('ComposerAutoloaderInitPhpMailerAddon', 'loadClassLoader'), true, true); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); + self::$loader = $loader = new \Composer\Autoload\ClassLoader(); spl_autoload_unregister(array('ComposerAutoloaderInitPhpMailerAddon', 'loadClassLoader')); - require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInitPhpMailerAddon::getInitializer($loader)); + $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInitPhpMailerAddon::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } $loader->register(true); diff --git a/phpmailer/vendor/composer/autoload_static.php b/phpmailer/vendor/composer/autoload_static.php index 8fc70b40..20cd9684 100644 --- a/phpmailer/vendor/composer/autoload_static.php +++ b/phpmailer/vendor/composer/autoload_static.php @@ -21,11 +21,8 @@ class ComposerStaticInitPhpMailerAddon ); public static $classMap = array ( - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', - 'PHPMailer\\PHPMailer\\DSNConfigurator' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/DSNConfigurator.php', 'PHPMailer\\PHPMailer\\Exception' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/Exception.php', 'PHPMailer\\PHPMailer\\OAuth' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/OAuth.php', - 'PHPMailer\\PHPMailer\\OAuthTokenProvider' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/OAuthTokenProvider.php', 'PHPMailer\\PHPMailer\\PHPMailer' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/PHPMailer.php', 'PHPMailer\\PHPMailer\\POP3' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/POP3.php', 'PHPMailer\\PHPMailer\\SMTP' => __DIR__ . '/..' . '/phpmailer/phpmailer/src/SMTP.php', diff --git a/phpmailer/vendor/composer/installed.json b/phpmailer/vendor/composer/installed.json index 142a295b..20714abc 100644 --- a/phpmailer/vendor/composer/installed.json +++ b/phpmailer/vendor/composer/installed.json @@ -1,90 +1,80 @@ -{ - "packages": [ - { - "name": "phpmailer/phpmailer", - "version": "v6.10.0", - "version_normalized": "6.10.0.0", - "source": { - "type": "git", - "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "bf74d75a1fde6beaa34a0ddae2ec5fce0f72a144" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/bf74d75a1fde6beaa34a0ddae2ec5fce0f72a144", - "reference": "bf74d75a1fde6beaa34a0ddae2ec5fce0f72a144", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-filter": "*", - "ext-hash": "*", - "php": ">=5.5.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^1.0", - "doctrine/annotations": "^1.2.6 || ^1.13.3", - "php-parallel-lint/php-console-highlighter": "^1.0.0", - "php-parallel-lint/php-parallel-lint": "^1.3.2", - "phpcompatibility/php-compatibility": "^9.3.5", - "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.7.2", - "yoast/phpunit-polyfills": "^1.0.4" - }, - "suggest": { - "decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication", - "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", - "ext-openssl": "Needed for secure SMTP sending and DKIM signing", - "greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication", - "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", - "league/oauth2-google": "Needed for Google XOAUTH2 authentication", - "psr/log": "For optional PSR-3 debug logging", - "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)", - "thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication" - }, - "time": "2025-04-24T15:19:31+00:00", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "PHPMailer\\PHPMailer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1-only" - ], - "authors": [ - { - "name": "Marcus Bointon", - "email": "phpmailer@synchromedia.co.uk" - }, - { - "name": "Jim Jagielski", - "email": "jimjag@gmail.com" - }, - { - "name": "Andy Prevost", - "email": "codeworxtech@users.sourceforge.net" - }, - { - "name": "Brent R. Matzelle" - } - ], - "description": "PHPMailer is a full-featured email creation and transfer class for PHP", - "support": { - "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.10.0" - }, - "funding": [ - { - "url": "https://github.com/Synchro", - "type": "github" - } - ], - "install-path": "../phpmailer/phpmailer" - } +[ + { + "name": "phpmailer/phpmailer", + "version": "v6.5.0", + "version_normalized": "6.5.0.0", + "source": { + "type": "git", + "url": "https://github.com/PHPMailer/PHPMailer.git", + "reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a5b5c43e50b7fba655f793ad27303cd74c57363c", + "reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-filter": "*", + "ext-hash": "*", + "php": ">=5.5.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "doctrine/annotations": "^1.2", + "phpcompatibility/php-compatibility": "^9.3.5", + "roave/security-advisories": "dev-latest", + "squizlabs/php_codesniffer": "^3.5.6", + "yoast/phpunit-polyfills": "^0.2.0" + }, + "suggest": { + "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "psr/log": "For optional PSR-3 debug logging", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + }, + "time": "2021-06-16T14:33:43+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-only" ], - "dev": true, - "dev-package-names": [] -} + "authors": [ + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "support": { + "issues": "https://github.com/PHPMailer/PHPMailer/issues", + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.0" + }, + "funding": [ + { + "url": "https://github.com/Synchro", + "type": "github" + } + ] + } +] diff --git a/phpmailer/vendor/composer/installed.php b/phpmailer/vendor/composer/installed.php deleted file mode 100644 index 554d2c40..00000000 --- a/phpmailer/vendor/composer/installed.php +++ /dev/null @@ -1,32 +0,0 @@ - array( - 'name' => 'friendica-addons/phpmailer', - 'pretty_version' => 'dev-2025.07-rc', - 'version' => 'dev-2025.07-rc', - 'reference' => '715f70032330ad14f710284104c8593c7800e125', - 'type' => 'friendica-addon', - 'install_path' => __DIR__ . '/../../', - 'aliases' => array(), - 'dev' => true, - ), - 'versions' => array( - 'friendica-addons/phpmailer' => array( - 'pretty_version' => 'dev-2025.07-rc', - 'version' => 'dev-2025.07-rc', - 'reference' => '715f70032330ad14f710284104c8593c7800e125', - 'type' => 'friendica-addon', - 'install_path' => __DIR__ . '/../../', - 'aliases' => array(), - 'dev_requirement' => false, - ), - 'phpmailer/phpmailer' => array( - 'pretty_version' => 'v6.10.0', - 'version' => '6.10.0.0', - 'reference' => 'bf74d75a1fde6beaa34a0ddae2ec5fce0f72a144', - 'type' => 'library', - 'install_path' => __DIR__ . '/../phpmailer/phpmailer', - 'aliases' => array(), - 'dev_requirement' => false, - ), - ), -); diff --git a/phpmailer/vendor/phpmailer/phpmailer/README.md b/phpmailer/vendor/phpmailer/phpmailer/README.md index 862a4e1a..fa27d2f6 100644 --- a/phpmailer/vendor/phpmailer/phpmailer/README.md +++ b/phpmailer/vendor/phpmailer/phpmailer/README.md @@ -1,54 +1,45 @@ -[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://supportukrainenow.org/) - ![PHPMailer](https://raw.github.com/PHPMailer/PHPMailer/master/examples/images/phpmailer.png) # PHPMailer – A full-featured email creation and transfer class for PHP -[![Test status](https://github.com/PHPMailer/PHPMailer/workflows/Tests/badge.svg)](https://github.com/PHPMailer/PHPMailer/actions) -[![codecov.io](https://codecov.io/gh/PHPMailer/PHPMailer/branch/master/graph/badge.svg?token=iORZpwmYmM)](https://codecov.io/gh/PHPMailer/PHPMailer) -[![Latest Stable Version](https://poser.pugx.org/phpmailer/phpmailer/v/stable.svg)](https://packagist.org/packages/phpmailer/phpmailer) -[![Total Downloads](https://poser.pugx.org/phpmailer/phpmailer/downloads)](https://packagist.org/packages/phpmailer/phpmailer) -[![License](https://poser.pugx.org/phpmailer/phpmailer/license.svg)](https://packagist.org/packages/phpmailer/phpmailer) -[![API Docs](https://github.com/phpmailer/phpmailer/workflows/Docs/badge.svg)](https://phpmailer.github.io/PHPMailer/) -[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/PHPMailer/PHPMailer/badge)](https://api.securityscorecards.dev/projects/github.com/PHPMailer/PHPMailer) +[![Test status](https://github.com/PHPMailer/PHPMailer/workflows/Tests/badge.svg)](https://github.com/PHPMailer/PHPMailer/actions) [![Latest Stable Version](https://poser.pugx.org/phpmailer/phpmailer/v/stable.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![Total Downloads](https://poser.pugx.org/phpmailer/phpmailer/downloads)](https://packagist.org/packages/phpmailer/phpmailer) [![License](https://poser.pugx.org/phpmailer/phpmailer/license.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![API Docs](https://github.com/phpmailer/phpmailer/workflows/Docs/badge.svg)](https://phpmailer.github.io/PHPMailer/) ## Features - Probably the world's most popular code for sending email from PHP! - Used by many open-source projects: WordPress, Drupal, 1CRM, SugarCRM, Yii, Joomla! and many more - Integrated SMTP support – send without a local mail server -- Send emails with multiple To, CC, BCC, and Reply-to addresses +- Send emails with multiple To, CC, BCC and Reply-to addresses - Multipart/alternative emails for mail clients that do not read HTML email - Add attachments, including inline - Support for UTF-8 content and 8bit, base64, binary, and quoted-printable encodings -- Full UTF-8 support when using servers that support `SMTPUTF8`. -- Support for iCal events in multiparts and attachments -- SMTP authentication with `LOGIN`, `PLAIN`, `CRAM-MD5`, and `XOAUTH2` mechanisms over SMTPS and SMTP+STARTTLS transports +- SMTP authentication with LOGIN, PLAIN, CRAM-MD5, and XOAUTH2 mechanisms over SMTPS and SMTP+STARTTLS transports - Validates email addresses automatically - Protects against header injection attacks - Error messages in over 50 languages! - DKIM and S/MIME signing support -- Compatible with PHP 5.5 and later, including PHP 8.4 +- Compatible with PHP 5.5 and later, including PHP 8.0 - Namespaced to prevent name clashes - Much more! ## Why you might need it -Many PHP developers need to send email from their code. The only PHP function that supports this directly is [`mail()`](https://www.php.net/manual/en/function.mail.php). However, it does not provide any assistance for making use of popular features such as authentication, HTML messages, and attachments. +Many PHP developers need to send email from their code. The only PHP function that supports this directly is [`mail()`](https://www.php.net/manual/en/function.mail.php). However, it does not provide any assistance for making use of popular features such as encryption, authentication, HTML messages, and attachments. Formatting email correctly is surprisingly difficult. There are myriad overlapping (and conflicting) standards, requiring tight adherence to horribly complicated formatting and encoding rules – the vast majority of code that you'll find online that uses the `mail()` function directly is just plain wrong, if not unsafe! The PHP `mail()` function usually sends via a local mail server, typically fronted by a `sendmail` binary on Linux, BSD, and macOS platforms, however, Windows usually doesn't include a local mail server; PHPMailer's integrated SMTP client allows email sending on all platforms without needing a local mail server. Be aware though, that the `mail()` function should be avoided when possible; it's both faster and [safer](https://exploitbox.io/paper/Pwning-PHP-Mail-Function-For-Fun-And-RCE.html) to use SMTP to localhost. *Please* don't be tempted to do it yourself – if you don't use PHPMailer, there are many other excellent libraries that -you should look at before rolling your own. Try [Symfony Mailer](https://symfony.com/doc/current/mailer.html), [Laminas/Mail](https://docs.laminas.dev/laminas-mail/), [ZetaComponents](https://github.com/zetacomponents/Mail), etc. +you should look at before rolling your own. Try [SwiftMailer](https://swiftmailer.symfony.com/) +, [Laminas/Mail](https://docs.laminas.dev/laminas-mail/), [ZetaComponents](https://github.com/zetacomponents/Mail) etc. ## License -This software is distributed under the [LGPL 2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) license, along with the [GPL Cooperation Commitment](https://gplcc.github.io/gplcc/). Please read [LICENSE](https://github.com/PHPMailer/PHPMailer/blob/master/LICENSE) for information on the software availability and distribution. +This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) license, along with the [GPL Cooperation Commitment](https://gplcc.github.io/gplcc/). Please read [LICENSE](https://github.com/PHPMailer/PHPMailer/blob/master/LICENSE) for information on the software availability and distribution. ## Installation & loading PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file: ```json -"phpmailer/phpmailer": "^6.10.0" +"phpmailer/phpmailer": "^6.2" ``` or run @@ -59,8 +50,7 @@ composer require phpmailer/phpmailer Note that the `vendor` folder and the `vendor/autoload.php` script are generated by Composer; they are not part of PHPMailer. -If you want to use XOAUTH2 authentication, you will also need to add a dependency on the `league/oauth2-client` and appropriate service adapters package in your `composer.json`, or take a look at -by @decomplexity's [SendOauth2 wrapper](https://github.com/decomplexity/SendOauth2), especially if you're using Microsoft services. +If you want to use the Gmail XOAUTH2 authentication class, you will also need to add a dependency on the `league/oauth2-client` package in your `composer.json`. Alternatively, if you're not using Composer, you can [download PHPMailer as a zip file](https://github.com/PHPMailer/PHPMailer/archive/master.zip), (note that docs and examples are not included in the zip file), then copy the contents of the PHPMailer folder into one of the `include_path` directories specified in your PHP configuration and load each class file manually: @@ -75,7 +65,7 @@ require 'path/to/PHPMailer/src/PHPMailer.php'; require 'path/to/PHPMailer/src/SMTP.php'; ``` -If you're not using the `SMTP` class explicitly (you're probably not), you don't need a `use` line for it. Even if you're not using exceptions, you do still need to load the `Exception` class as it is used internally. +If you're not using the `SMTP` class explicitly (you're probably not), you don't need a `use` line for the SMTP class. Even if you're not using exceptions, you do still need to load the `Exception` class as it is used internally. ## Legacy versions PHPMailer 5.2 (which is compatible with PHP 5.0 — 7.0) is no longer supported, even for security updates. You will find the latest version of 5.2 in the [5.2-stable branch](https://github.com/PHPMailer/PHPMailer/tree/5.2-stable). If you're using PHP 5.5 or later (which you should be), switch to the 6.x releases. @@ -96,10 +86,10 @@ use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\SMTP; use PHPMailer\PHPMailer\Exception; -//Load Composer's autoloader (created by composer, not included with PHPMailer) +//Load Composer's autoloader require 'vendor/autoload.php'; -//Create an instance; passing `true` enables exceptions +//Instantiation and passing `true` enables exceptions $mail = new PHPMailer(true); try { @@ -110,8 +100,8 @@ try { $mail->SMTPAuth = true; //Enable SMTP authentication $mail->Username = 'user@example.com'; //SMTP username $mail->Password = 'secret'; //SMTP password - $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; //Enable implicit TLS encryption - $mail->Port = 465; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS` + $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; //Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged + $mail->Port = 587; //TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above //Recipients $mail->setFrom('from@example.com', 'Mailer'); @@ -138,21 +128,21 @@ try { } ``` -You'll find plenty to play with in the [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) folder, which covers many common scenarios including sending through Gmail, building contact forms, sending to mailing lists, and more. +You'll find plenty to play with in the [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) folder, which covers many common scenarios including sending through gmail, building contact forms, sending to mailing lists, and more. If you are re-using the instance (e.g. when sending to a mailing list), you may need to clear the recipient list to avoid sending duplicate messages. See [the mailing list example](https://github.com/PHPMailer/PHPMailer/blob/master/examples/mailing_list.phps) for further guidance. That's it. You should now be ready to use PHPMailer! ## Localization -PHPMailer defaults to English, but in the [language](https://github.com/PHPMailer/PHPMailer/tree/master/language/) folder, you'll find many translations for PHPMailer error messages that you may encounter. Their filenames contain [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) language code for the translations, for example `fr` for French. To specify a language, you need to tell PHPMailer which one to use, like this: +PHPMailer defaults to English, but in the [language](https://github.com/PHPMailer/PHPMailer/tree/master/language/) folder you'll find many translations for PHPMailer error messages that you may encounter. Their filenames contain [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the translations, for example `fr` for French. To specify a language, you need to tell PHPMailer which one to use, like this: ```php //To load the French version $mail->setLanguage('fr', '/optional/path/to/language/directory/'); ``` -We welcome corrections and new languages – if you're looking for corrections, run the [Language/TranslationCompletenessTest.php](https://github.com/PHPMailer/PHPMailer/blob/master/test/Language/TranslationCompletenessTest.php) script in the tests folder and it will show any missing translations. +We welcome corrections and new languages – if you're looking for corrections, run the [PHPMailerLangTest.php](https://github.com/PHPMailer/PHPMailer/tree/master/test/PHPMailerLangTest.php) script in the tests folder and it will show any missing translations. ## Documentation Start reading at the [GitHub wiki](https://github.com/PHPMailer/PHPMailer/wiki). If you're having trouble, head for [the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting) as it's frequently updated. @@ -163,9 +153,9 @@ To reduce PHPMailer's deployed code footprint, examples are not included if you Complete generated API documentation is [available online](https://phpmailer.github.io/PHPMailer/). -You can generate complete API-level documentation by running `phpdoc` in the top-level folder, and documentation will appear in the `docs` folder, though you'll need to have [PHPDocumentor](https://www.phpdoc.org) installed. You may find [the unit tests](https://github.com/PHPMailer/PHPMailer/blob/master/test/PHPMailer/PHPMailerTest.php) a good reference for how to do various operations such as encryption. +You can generate complete API-level documentation by running `phpdoc` in the top-level folder, and documentation will appear in the `docs` folder, though you'll need to have [PHPDocumentor](http://www.phpdoc.org) installed. You may find [the unit tests](https://github.com/PHPMailer/PHPMailer/blob/master/test/PHPMailerTest.php) a good reference for how to do various operations such as encryption. -If the documentation doesn't cover what you need, search the [many questions on Stack Overflow](https://stackoverflow.com/questions/tagged/phpmailer), and before you ask a question about "SMTP Error: Could not connect to SMTP host.", [read the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting). +If the documentation doesn't cover what you need, search the [many questions on Stack Overflow](http://stackoverflow.com/questions/tagged/phpmailer), and before you ask a question about "SMTP Error: Could not connect to SMTP host.", [read the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting). ## Tests [PHPMailer tests](https://github.com/PHPMailer/PHPMailer/tree/master/test/) use PHPUnit 9, with [a polyfill](https://github.com/Yoast/PHPUnit-Polyfills) to let 9-style tests run on older PHPUnit and PHP versions. @@ -180,9 +170,9 @@ Please disclose any vulnerabilities found responsibly – report security issues See [SECURITY](https://github.com/PHPMailer/PHPMailer/tree/master/SECURITY.md) and [PHPMailer's security advisories on GitHub](https://github.com/PHPMailer/PHPMailer/security). ## Contributing -Please submit bug reports, suggestions, and pull requests to the [GitHub issue tracker](https://github.com/PHPMailer/PHPMailer/issues). +Please submit bug reports, suggestions and pull requests to the [GitHub issue tracker](https://github.com/PHPMailer/PHPMailer/issues). -We're particularly interested in fixing edge cases, expanding test coverage, and updating translations. +We're particularly interested in fixing edge-cases, expanding test coverage and updating translations. If you found a mistake in the docs, or want to add something, go ahead and amend the wiki – anyone can edit it. @@ -206,7 +196,7 @@ Donations are very welcome, whether in beer 🍺, T-shirts 👕, or cold, hard c Available as part of the Tidelift Subscription. The maintainers of PHPMailer and thousands of other packages are working with Tidelift to deliver commercial -support and maintenance for the open-source packages you use to build your applications. Save time, reduce risk, and +support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-phpmailer-phpmailer?utm_source=packagist-phpmailer-phpmailer&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) @@ -214,7 +204,7 @@ use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-phpmailer-php See [changelog](changelog.md). ## History -- PHPMailer was originally written in 2001 by Brent R. Matzelle as a [SourceForge project](https://sourceforge.net/projects/phpmailer/). +- PHPMailer was originally written in 2001 by Brent R. Matzelle as a [SourceForge project](http://sourceforge.net/projects/phpmailer/). - [Marcus Bointon](https://github.com/Synchro) (`coolbru` on SF) and Andy Prevost (`codeworxtech`) took over the project in 2004. - Became an Apache incubator project on Google Code in 2010, managed by Jim Jagielski. - Marcus created [his fork on GitHub](https://github.com/Synchro/PHPMailer) in 2008. @@ -224,9 +214,9 @@ See [changelog](changelog.md). ### What's changed since moving from SourceForge? - Official successor to the SourceForge and Google Code projects. - Test suite. -- Continuous integration with GitHub Actions. +- Continuous integration with Github Actions. - Composer support. - Public development. - Additional languages and language strings. - CRAM-MD5 authentication support. -- Preserves full repo history of authors, commits, and branches from the original SourceForge project. +- Preserves full repo history of authors, commits and branches from the original SourceForge project. diff --git a/phpmailer/vendor/phpmailer/phpmailer/SECURITY.md b/phpmailer/vendor/phpmailer/phpmailer/SECURITY.md index 4f34026d..035a87f7 100644 --- a/phpmailer/vendor/phpmailer/phpmailer/SECURITY.md +++ b/phpmailer/vendor/phpmailer/phpmailer/SECURITY.md @@ -13,13 +13,13 @@ PHPMailer versions 6.1.5 and earlier contain an output escaping bug that occurs PHPMailer versions prior to 6.0.6 and 5.2.27 are vulnerable to an object injection attack by passing `phar://` paths into `addAttachment()` and other functions that may receive unfiltered local paths, possibly leading to RCE. Recorded as [CVE-2018-19296](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2018-19296). See [this article](https://knasmueller.net/5-answers-about-php-phar-exploitation) for more info on this type of vulnerability. Mitigated by blocking the use of paths containing URL-protocol style prefixes such as `phar://`. Reported by Sehun Oh of cyberone.kr. -PHPMailer versions prior to 5.2.24 (released July 26th 2017) have an XSS vulnerability in one of the code examples, [CVE-2017-11503](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-11503). The `code_generator.phps` example did not filter user input prior to output. This file is distributed with a `.phps` extension, so it is not normally executable unless it is explicitly renamed, and the file is not included when PHPMailer is loaded through composer, so it is safe by default. There was also an undisclosed potential XSS vulnerability in the default exception handler (unused by default). Patches for both issues kindly provided by Patrick Monnerat of the Fedora Project. +PHPMailer versions prior to 5.2.24 (released July 26th 2017) have an XSS vulnerability in one of the code examples, [CVE-2017-11503](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-11503). The `code_generator.phps` example did not filter user input prior to output. This file is distributed with a `.phps` extension, so it it not normally executable unless it is explicitly renamed, and the file is not included when PHPMailer is loaded through composer, so it is safe by default. There was also an undisclosed potential XSS vulnerability in the default exception handler (unused by default). Patches for both issues kindly provided by Patrick Monnerat of the Fedora Project. PHPMailer versions prior to 5.2.22 (released January 9th 2017) have a local file disclosure vulnerability, [CVE-2017-5223](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-5223). If content passed into `msgHTML()` is sourced from unfiltered user input, relative paths can map to absolute local file paths and added as attachments. Also note that `addAttachment` (just like `file_get_contents`, `passthru`, `unlink`, etc) should not be passed user-sourced params either! Reported by Yongxiang Li of Asiasecurity. PHPMailer versions prior to 5.2.20 (released December 28th 2016) are vulnerable to [CVE-2016-10045](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10045) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html), and patched by Paul Buonopane (@Zenexer). -PHPMailer versions prior to 5.2.18 (released December 2016) are vulnerable to [CVE-2016-10033](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10033) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html). +PHPMailer versions prior to 5.2.18 (released December 2016) are vulnerable to [CVE-2016-10033](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10033) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](http://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html). PHPMailer versions prior to 5.2.14 (released November 2015) are vulnerable to [CVE-2015-8476](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-8476) an SMTP CRLF injection bug permitting arbitrary message sending. diff --git a/phpmailer/vendor/phpmailer/phpmailer/SMTPUTF8.md b/phpmailer/vendor/phpmailer/phpmailer/SMTPUTF8.md deleted file mode 100644 index ca284ee2..00000000 --- a/phpmailer/vendor/phpmailer/phpmailer/SMTPUTF8.md +++ /dev/null @@ -1,48 +0,0 @@ -# A short history of UTF-8 in email - -## Background - -For most of its existence, SMTP has been a 7-bit channel, only supporting US-ASCII characters. This has been a problem for many languages, especially those that use non-Latin scripts, and has led to the development of various workarounds. - -The first major improvement, introduced in 1994 in [RFC 1652](https://www.rfc-editor.org/rfc/rfc1652) and extended in 2011 in [RFC 6152](https://www.rfc-editor.org/rfc/rfc6152), was the addition of the `8BITMIME` SMTP extension, which allowed raw 8-bit data to be included in message bodies sent over SMTP. -This allowed the message *contents* to contain 8-bit data, including things like UTF-8 text, even though the SMTP protocol itself was still firmly 7-bit. This worked by having the server switch to 8-bit after the headers, and then back to 7-bit after the completion of a `DATA` command. - -From 1996, messages could support [RFC 2047 encoding](https://www.rfc-editor.org/rfc/rfc2047), which permitted inserting characters from any character set into header *values* (but not names), but only by encoding them in somewhat unreadable ways to allow them to survive passage through a 7-bit channel. An example with a subject of "Schrödinger's cat" would be: - -``` -Subject: =?utf-8?Q=Schr=C3=B6dinger=92s_Cat?= -``` - -Here the accented `ö` is encoded as `=C3=B6`, which is the UTF-8 encoding of the 2-byte character, and the whole thing is wrapped in `=?utf-8?Q?` to indicate that it uses the UTF-8 charset and `quoted-printable` encoding. This is a bit of a hack, and not very human-friendly, but it works. - -Similarly, 8-bit message bodies could be encoded using the same `quoted-printable` and `base64` content transfer encoding (CTE) schemes, which preserved the 8-bit content while encoding it in a format that could survive transmission through a 7-bit channel. - -Domain names were originally also stuck in a 7-bit world, actually even more constrained to only a subset of the US-ASCII character set. But of course, many people want to have domains in their own language/script. Internationalized domain name (IDN) permitted this, using yet another complex encoding scheme called punycode, defined for domain names in 2003 in [RFC 3492](https://www.rfc-editor.org/rfc/rfc3492). This finally allowed the domain part (after the `@`) of email addresses to contain UTF-8, though it was actually an illusion preserved by email client applications. For example, an address of -`user@café.example.com` translates to -`user@xn--caf-dma.example.com` in punycode, rendering it mostly unreadable, but 7-bit friendly, and remaining compatible with email clients that don't know about IDN. - -The one remaining part of email that could not handle UTF-8 is the local part of email addresses (the part before the `@`). - -I've only mentioned UTF-8 here, but most of these approaches also allowed other character sets that were popular, such as [the ISO-8859 family](https://en.wikipedia.org/wiki/ISO/IEC_8859). However, UTF-8 solves so many problems that these other character sets are gradually falling out of favour, as UTF-8 can support all languages. - -This patchwork of overlapping approaches has served us well, but we have to admit that it's a mess. - -## SMTPUTF8 - -`SMTPUTF8` is another SMTP extension, defined in [RFC 6531](https://www.rfc-editor.org/rfc/rfc6531) in 2012. This essentially solves the whole problem, allowing the entire SMTP conversation — commands, headers, and message bodies — to be sent in raw, unencoded UTF-8. - -But there's a problem with this approach: adoption. If you send a UTF-8 message to a recipient whose mail server doesn't support this format, the sender has to somehow downgrade the message to make it survive a transition to 7-bit. This is a hard problem to solve, especially since there is no way to make a 7-bit system support UTF-8 in the local parts of addresses. This downgrade problem is what held up the adoption of `SMTPUTF8` in PHPMailer for many years, but in that time the *de facto* approach has become to simply fail in that situation, and tell the recipient it's time they upgraded their mail server 😅. - -The vast majority of large email providers (gmail, Yahoo, Microsoft, etc), mail servers (postfix, exim, IIS, etc), and mail clients (Apple Mail, Outlook, Thunderbird, etc) now all support SMTPUTF8, so the need for backward compatibility is no longer what it was. - -## SMTPUTF8 in PHPMailer - -Several other PHP email libraries have implemented a halfway solution to `SMTPUTF8`, adding only the ability to support UTF-8 in email addresses, not elsewhere in the protocol. I wanted PHPMailer to do it "the right way", and this has taken much longer. PHPMailer now supports UTF-8 everywhere, and does not need to use transfer or header encodings for UTF-8 text when connecting to an `SMTPUTF8`-capable mail server. - -This support is handled automatically: if you add an email address that requires UTF-8, PHPMailer will use UTF-8 for everything. If not, it will fall back to 7-bit and encode the message as necessary. - -The one place you will need to be careful is in the selection of the address validator. By default, PHPMailer uses PHP's built-in `filter_var` validator, which does not allow UTF-8 email addresses. When PHPMailer spots that you have submitted a UTF-8 address, but have not altered the default validator, it will automatically switch to using a UTF-8-compatible validator. As soon as you do this, any SMTP connection you make will *require* that the server you connect to supports `SMTPUTF8`. You can select this validator explicitly by setting `PHPMailer::$validator = 'eai'` (an acronym for Email Address Internationalization). - -### Postfix gotcha - -Postfix has supported `SMTPUTF8` for a long time, but it has a peculiarity that it does not always advertise that it does so. However, rather surprisingly, if you use UTF-8 in the conversation, it will work anyway. diff --git a/phpmailer/vendor/phpmailer/phpmailer/VERSION b/phpmailer/vendor/phpmailer/phpmailer/VERSION index cf79bf90..4be2c727 100644 --- a/phpmailer/vendor/phpmailer/phpmailer/VERSION +++ b/phpmailer/vendor/phpmailer/phpmailer/VERSION @@ -1 +1 @@ -6.10.0 +6.5.0 \ No newline at end of file diff --git a/phpmailer/vendor/phpmailer/phpmailer/composer.json b/phpmailer/vendor/phpmailer/phpmailer/composer.json index 7b008b7c..58393b2c 100644 --- a/phpmailer/vendor/phpmailer/phpmailer/composer.json +++ b/phpmailer/vendor/phpmailer/phpmailer/composer.json @@ -25,12 +25,6 @@ "type": "github" } ], - "config": { - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true - }, - "lock": false - }, "require": { "php": ">=5.5.0", "ext-ctype": "*", @@ -38,24 +32,19 @@ "ext-hash": "*" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^1.0", - "doctrine/annotations": "^1.2.6 || ^1.13.3", - "php-parallel-lint/php-console-highlighter": "^1.0.0", - "php-parallel-lint/php-parallel-lint": "^1.3.2", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "doctrine/annotations": "^1.2", "phpcompatibility/php-compatibility": "^9.3.5", "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.7.2", - "yoast/phpunit-polyfills": "^1.0.4" + "squizlabs/php_codesniffer": "^3.5.6", + "yoast/phpunit-polyfills": "^0.2.0" }, "suggest": { - "decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication", "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", - "ext-openssl": "Needed for secure SMTP sending and DKIM signing", - "greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication", "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", "league/oauth2-google": "Needed for Google XOAUTH2 authentication", "psr/log": "For optional PSR-3 debug logging", - "thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" }, "autoload": { @@ -71,10 +60,6 @@ "license": "LGPL-2.1-only", "scripts": { "check": "./vendor/bin/phpcs", - "test": "./vendor/bin/phpunit --no-coverage", - "coverage": "./vendor/bin/phpunit", - "lint": [ - "@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . --show-deprecated -e php,phps --exclude vendor --exclude .git --exclude build" - ] + "test": "./vendor/bin/phpunit" } } diff --git a/phpmailer/vendor/phpmailer/phpmailer/get_oauth_token.php b/phpmailer/vendor/phpmailer/phpmailer/get_oauth_token.php index 0e54a00b..befdc34a 100644 --- a/phpmailer/vendor/phpmailer/phpmailer/get_oauth_token.php +++ b/phpmailer/vendor/phpmailer/phpmailer/get_oauth_token.php @@ -12,7 +12,7 @@ * @copyright 2012 - 2020 Marcus Bointon * @copyright 2010 - 2012 Jim Jagielski * @copyright 2004 - 2009 Andy Prevost - * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License * @note This program is distributed in the hope that it will be useful - WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. @@ -36,7 +36,7 @@ namespace PHPMailer\PHPMailer; * Aliases for League Provider Classes * Make sure you have added these to your composer.json and run `composer install` * Plenty to choose from here: - * @see https://oauth2-client.thephpleague.com/providers/thirdparty/ + * @see http://oauth2-client.thephpleague.com/providers/thirdparty/ */ //@see https://github.com/thephpleague/oauth2-google use League\OAuth2\Client\Provider\Google; @@ -44,31 +44,14 @@ use League\OAuth2\Client\Provider\Google; use Hayageek\OAuth2\Client\Provider\Yahoo; //@see https://github.com/stevenmaguire/oauth2-microsoft use Stevenmaguire\OAuth2\Client\Provider\Microsoft; -//@see https://github.com/greew/oauth2-azure-provider -use Greew\OAuth2\Client\Provider\Azure; -if (!isset($_GET['code']) && !isset($_POST['provider'])) { +if (!isset($_GET['code']) && !isset($_GET['provider'])) { ?> - -
-

Select Provider

- -
- -
- -
- -
-

Enter id and secret

-

These details are obtained by setting up an app in your provider's developer console. -

-

ClientId:

-

ClientSecret:

-

TenantID (only relevant for Azure):

- - +Select Provider:
+
Google
+Yahoo
+Microsoft/Outlook/Hotmail/Live/Office365
[ - 'https://outlook.office.com/SMTP.Send', - 'offline_access' - ] - ]; - break; } if (null === $provider) { @@ -178,5 +142,5 @@ if (!isset($_GET['code'])) { ); //Use this to interact with an API on the users behalf //Use this to get a new access token if the old one expires - echo 'Refresh Token: ', htmlspecialchars($token->getRefreshToken()); + echo 'Refresh Token: ', $token->getRefreshToken(); } diff --git a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-as.php b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-as.php deleted file mode 100644 index 327dfbaf..00000000 --- a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-as.php +++ /dev/null @@ -1,35 +0,0 @@ - - */ - -$PHPMAILER_LANG['authenticate'] = 'SMTP ত্ৰুটি: প্ৰমাণীকৰণ কৰিব নোৱাৰি'; -$PHPMAILER_LANG['buggy_php'] = 'আপোনাৰ PHP সংস্কৰণ এটা বাগৰ দ্বাৰা প্ৰভাৱিত হয় যাৰ ফলত নষ্ট বাৰ্তা হব পাৰে । ইয়াক সমাধান কৰিবলে, প্ৰেৰণ কৰিবলে SMTP ব্যৱহাৰ কৰক, আপোনাৰ php.ini ত mail.add_x_header বিকল্প নিষ্ক্ৰিয় কৰক, MacOS বা Linux লৈ সলনি কৰক, বা আপোনাৰ PHP সংস্কৰণ 7.0.17+ বা 7.1.3+ লৈ সলনি কৰক ।'; -$PHPMAILER_LANG['connect_host'] = 'SMTP ত্ৰুটি: SMTP চাৰ্ভাৰৰ সৈতে সংযোগ কৰিবলে অক্ষম'; -$PHPMAILER_LANG['data_not_accepted'] = 'SMTP ত্ৰুটি: তথ্য গ্ৰহণ কৰা হোৱা নাই'; -$PHPMAILER_LANG['empty_message'] = 'বাৰ্তাৰ মূখ্য অংশ খালী।'; -$PHPMAILER_LANG['encoding'] = 'অজ্ঞাত এনকোডিং: '; -$PHPMAILER_LANG['execute'] = 'এক্সিকিউট কৰিব নোৱাৰি: '; -$PHPMAILER_LANG['extension_missing'] = 'সম্প্ৰসাৰণ নোহোৱা হৈছে: '; -$PHPMAILER_LANG['file_access'] = 'ফাইল অভিগম কৰিবলে অক্ষম: '; -$PHPMAILER_LANG['file_open'] = 'ফাইল ত্ৰুটি: ফাইল খোলিবলৈ অক্ষম: '; -$PHPMAILER_LANG['from_failed'] = 'নিম্নলিখিত প্ৰেৰকৰ ঠিকনা(সমূহ) ব্যৰ্থ: '; -$PHPMAILER_LANG['instantiate'] = 'মেইল ফাংচনৰ এটা উদাহৰণ সৃষ্টি কৰিবলে অক্ষম'; -$PHPMAILER_LANG['invalid_address'] = 'প্ৰেৰণ কৰিব নোৱাৰি: অবৈধ ইমেইল ঠিকনা: '; -$PHPMAILER_LANG['invalid_header'] = 'অবৈধ হেডাৰৰ নাম বা মান'; -$PHPMAILER_LANG['invalid_hostentry'] = 'অবৈধ হোষ্টেন্ট্ৰি: '; -$PHPMAILER_LANG['invalid_host'] = 'অবৈধ হস্ট:'; -$PHPMAILER_LANG['mailer_not_supported'] = 'মেইলাৰ সমৰ্থিত নহয়।'; -$PHPMAILER_LANG['provide_address'] = 'আপুনি অন্ততঃ এটা গন্তব্য ইমেইল ঠিকনা দিব লাগিব'; -$PHPMAILER_LANG['recipients_failed'] = 'SMTP ত্ৰুটি: নিম্নলিখিত গন্তব্যস্থানসমূহ ব্যৰ্থ: '; -$PHPMAILER_LANG['signing'] = 'স্বাক্ষৰ কৰাত ব্যৰ্থ: '; -$PHPMAILER_LANG['smtp_code'] = 'SMTP কড: '; -$PHPMAILER_LANG['smtp_code_ex'] = 'অতিৰিক্ত SMTP তথ্য: '; -$PHPMAILER_LANG['smtp_detail'] = 'বিৱৰণ:'; -$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP সংযোগ() ব্যৰ্থ'; -$PHPMAILER_LANG['smtp_error'] = 'SMTP চাৰ্ভাৰৰ ত্ৰুটি: '; -$PHPMAILER_LANG['variable_set'] = 'চলক নিৰ্ধাৰণ কৰিব পৰা নগল: '; -$PHPMAILER_LANG['extension_missing'] = 'অনুপস্থিত সম্প্ৰসাৰণ: '; diff --git a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-bn.php b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-bn.php deleted file mode 100644 index 47365108..00000000 --- a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-bn.php +++ /dev/null @@ -1,35 +0,0 @@ - - */ - -$PHPMAILER_LANG['authenticate'] = 'SMTP ত্রুটি: প্রমাণীকরণ করতে অক্ষম৷'; -$PHPMAILER_LANG['buggy_php'] = 'আপনার PHP সংস্করণ একটি বাগ দ্বারা প্রভাবিত হয় যার ফলে দূষিত বার্তা হতে পারে। এটি ঠিক করতে, পাঠাতে SMTP ব্যবহার করুন, আপনার php.ini এ mail.add_x_header বিকল্পটি নিষ্ক্রিয় করুন, MacOS বা Linux-এ স্যুইচ করুন, অথবা আপনার PHP সংস্করণকে 7.0.17+ বা 7.1.3+ এ পরিবর্তন করুন।'; -$PHPMAILER_LANG['connect_host'] = 'SMTP ত্রুটি: SMTP সার্ভারের সাথে সংযোগ করতে অক্ষম৷'; -$PHPMAILER_LANG['data_not_accepted'] = 'SMTP ত্রুটি: ডেটা গ্রহণ করা হয়নি৷'; -$PHPMAILER_LANG['empty_message'] = 'বার্তার অংশটি খালি।'; -$PHPMAILER_LANG['encoding'] = 'অজানা এনকোডিং: '; -$PHPMAILER_LANG['execute'] = 'নির্বাহ করতে অক্ষম: '; -$PHPMAILER_LANG['extension_missing'] = 'এক্সটেনশন অনুপস্থিত:'; -$PHPMAILER_LANG['file_access'] = 'ফাইল অ্যাক্সেস করতে অক্ষম: '; -$PHPMAILER_LANG['file_open'] = 'ফাইল ত্রুটি: ফাইল খুলতে অক্ষম: '; -$PHPMAILER_LANG['from_failed'] = 'নিম্নলিখিত প্রেরকের ঠিকানা(গুলি) ব্যর্থ হয়েছে: '; -$PHPMAILER_LANG['instantiate'] = 'মেল ফাংশনের একটি উদাহরণ তৈরি করতে অক্ষম৷'; -$PHPMAILER_LANG['invalid_address'] = 'পাঠাতে অক্ষম: অবৈধ ইমেল ঠিকানা: '; -$PHPMAILER_LANG['invalid_header'] = 'অবৈধ হেডার নাম বা মান'; -$PHPMAILER_LANG['invalid_hostentry'] = 'অবৈধ হোস্টেন্ট্রি: '; -$PHPMAILER_LANG['invalid_host'] = 'অবৈধ হোস্ট:'; -$PHPMAILER_LANG['mailer_not_supported'] = 'মেইলার সমর্থিত নয়।'; -$PHPMAILER_LANG['provide_address'] = 'আপনাকে অবশ্যই অন্তত একটি গন্তব্য ইমেল ঠিকানা প্রদান করতে হবে৷'; -$PHPMAILER_LANG['recipients_failed'] = 'SMTP ত্রুটি: নিম্নলিখিত গন্তব্যগুলি ব্যর্থ হয়েছে: '; -$PHPMAILER_LANG['signing'] = 'স্বাক্ষর করতে ব্যর্থ হয়েছে: '; -$PHPMAILER_LANG['smtp_code'] = 'SMTP কোড: '; -$PHPMAILER_LANG['smtp_code_ex'] = 'অতিরিক্ত SMTP তথ্য:'; -$PHPMAILER_LANG['smtp_detail'] = 'বর্ণনা: '; -$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP সংযোগ() ব্যর্থ হয়েছে৷'; -$PHPMAILER_LANG['smtp_error'] = 'SMTP সার্ভার ত্রুটি: '; -$PHPMAILER_LANG['variable_set'] = 'পরিবর্তনশীল সেট করা যায়নি: '; -$PHPMAILER_LANG['extension_missing'] = 'অনুপস্থিত এক্সটেনশন: '; diff --git a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php new file mode 100644 index 00000000..500c9526 --- /dev/null +++ b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。'; +$PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = '未知编码:'; +$PHPMAILER_LANG['execute'] = '不能执行: '; +$PHPMAILER_LANG['file_access'] = '不能访问文件:'; +$PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:'; +$PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: '; +$PHPMAILER_LANG['instantiate'] = '不能实现mail方法。'; +//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。'; +$PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: '; +//$PHPMAILER_LANG['signing'] = 'Signing Error: '; +//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; +//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-da.php b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-da.php index db9a1ef5..1edba1d7 100644 --- a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-da.php +++ b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-da.php @@ -9,28 +9,21 @@ */ $PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Login mislykkedes.'; -$PHPMAILER_LANG['buggy_php'] = 'Din version af PHP er berørt af en fejl, som gør at dine beskeder muligvis vises forkert. For at rette dette kan du skifte til SMTP, slå mail.add_x_header headeren i din php.ini fil fra, skifte til MacOS eller Linux eller opgradere din version af PHP til 7.0.17+ eller 7.1.3+.'; $PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Forbindelse til SMTP serveren kunne ikke oprettes.'; $PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data blev ikke accepteret.'; $PHPMAILER_LANG['empty_message'] = 'Meddelelsen er uden indhold'; $PHPMAILER_LANG['encoding'] = 'Ukendt encode-format: '; $PHPMAILER_LANG['execute'] = 'Kunne ikke afvikle: '; -$PHPMAILER_LANG['extension_missing'] = 'Udvidelse mangler: '; $PHPMAILER_LANG['file_access'] = 'Kunne ikke tilgå filen: '; $PHPMAILER_LANG['file_open'] = 'Fil fejl: Kunne ikke åbne filen: '; $PHPMAILER_LANG['from_failed'] = 'Følgende afsenderadresse er forkert: '; $PHPMAILER_LANG['instantiate'] = 'Email funktionen kunne ikke initialiseres.'; $PHPMAILER_LANG['invalid_address'] = 'Udgyldig adresse: '; -$PHPMAILER_LANG['invalid_header'] = 'Ugyldig header navn eller værdi'; -$PHPMAILER_LANG['invalid_hostentry'] = 'Ugyldig hostentry: '; -$PHPMAILER_LANG['invalid_host'] = 'Ugyldig vært: '; $PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.'; $PHPMAILER_LANG['provide_address'] = 'Indtast mindst en modtagers email adresse.'; -$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere fejlede: '; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere er forkerte: '; $PHPMAILER_LANG['signing'] = 'Signeringsfejl: '; -$PHPMAILER_LANG['smtp_code'] = 'SMTP kode: '; -$PHPMAILER_LANG['smtp_code_ex'] = 'Yderligere SMTP info: '; $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fejlede.'; -$PHPMAILER_LANG['smtp_detail'] = 'Detalje: '; $PHPMAILER_LANG['smtp_error'] = 'SMTP server fejl: '; $PHPMAILER_LANG['variable_set'] = 'Kunne ikke definere eller nulstille variablen: '; +$PHPMAILER_LANG['extension_missing'] = 'Udvidelse mangler: '; diff --git a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-el.php b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-el.php index 339ee575..b3d5ca94 100644 --- a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-el.php +++ b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-el.php @@ -5,29 +5,22 @@ * @package PHPMailer */ -$PHPMAILER_LANG['authenticate'] = 'Σφάλμα SMTP: Αδυναμία πιστοποίησης.'; -$PHPMAILER_LANG['buggy_php'] = 'Η έκδοση PHP που χρησιμοποιείτε παρουσιάζει σφάλμα που μπορεί να έχει ως αποτέλεσμα κατεστραμένα μηνύματα. Για να το διορθώσετε, αλλάξτε τον τρόπο αποστολής σε SMTP, απενεργοποιήστε την επιλογή mail.add_x_header στο αρχείο php.ini, αλλάξτε λειτουργικό σε MacOS ή Linux ή αναβαθμίστε την PHP σε έκδοση 7.0.17+ ή 7.1.3+.'; -$PHPMAILER_LANG['connect_host'] = 'Σφάλμα SMTP: Αδυναμία σύνδεσης με τον φιλοξενητή SMTP.'; -$PHPMAILER_LANG['data_not_accepted'] = 'Σφάλμα SMTP: Μη αποδεκτά δεδομένα.'; -$PHPMAILER_LANG['empty_message'] = 'Η ηλεκτρονική επιστολή δεν έχει περιεχόμενο.'; -$PHPMAILER_LANG['encoding'] = 'Άγνωστη μορφή κωδικοποίησης: '; -$PHPMAILER_LANG['execute'] = 'Αδυναμία εκτέλεσης: '; -$PHPMAILER_LANG['extension_missing'] = 'Απουσία επέκτασης: '; -$PHPMAILER_LANG['file_access'] = 'Αδυναμία πρόσβασης στο αρχείο: '; -$PHPMAILER_LANG['file_open'] = 'Σφάλμα Αρχείου: Αδυναμία ανοίγματος αρχείου: '; -$PHPMAILER_LANG['from_failed'] = 'Η ακόλουθη διεύθυνση αποστολέα δεν είναι σωστή: '; -$PHPMAILER_LANG['instantiate'] = 'Αδυναμία εκκίνησης συνάρτησης Mail.'; -$PHPMAILER_LANG['invalid_address'] = 'Μη έγκυρη διεύθυνση: '; -$PHPMAILER_LANG['invalid_header'] = 'Μη έγκυρο όνομα κεφαλίδας ή τιμή'; -$PHPMAILER_LANG['invalid_hostentry'] = 'Μη έγκυρη εισαγωγή φιλοξενητή: '; -$PHPMAILER_LANG['invalid_host'] = 'Μη έγκυρος φιλοξενητής: '; +$PHPMAILER_LANG['authenticate'] = 'SMTP Σφάλμα: Αδυναμία πιστοποίησης (authentication).'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Σφάλμα: Αδυναμία σύνδεσης στον SMTP-Host.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Σφάλμα: Τα δεδομένα δεν έγιναν αποδεκτά.'; +$PHPMAILER_LANG['empty_message'] = 'Το E-Mail δεν έχει περιεχόμενο .'; +$PHPMAILER_LANG['encoding'] = 'Αγνωστο Encoding-Format: '; +$PHPMAILER_LANG['execute'] = 'Αδυναμία εκτέλεσης ακόλουθης εντολής: '; +$PHPMAILER_LANG['file_access'] = 'Αδυναμία προσπέλασης του αρχείου: '; +$PHPMAILER_LANG['file_open'] = 'Σφάλμα Αρχείου: Δεν είναι δυνατό το άνοιγμα του ακόλουθου αρχείου: '; +$PHPMAILER_LANG['from_failed'] = 'Η παρακάτω διεύθυνση αποστολέα δεν είναι σωστή: '; +$PHPMAILER_LANG['instantiate'] = 'Αδυναμία εκκίνησης Mail function.'; +$PHPMAILER_LANG['invalid_address'] = 'Το μήνυμα δεν εστάλη, η διεύθυνση δεν είναι έγκυρη: '; $PHPMAILER_LANG['mailer_not_supported'] = ' mailer δεν υποστηρίζεται.'; -$PHPMAILER_LANG['provide_address'] = 'Δώστε τουλάχιστον μια ηλεκτρονική διεύθυνση παραλήπτη.'; -$PHPMAILER_LANG['recipients_failed'] = 'Σφάλμα SMTP: Οι παρακάτω διευθύνσεις παραλήπτη δεν είναι έγκυρες: '; +$PHPMAILER_LANG['provide_address'] = 'Παρακαλούμε δώστε τουλάχιστον μια e-mail διεύθυνση παραλήπτη.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Σφάλμα: Οι παρακάτω διευθύνσεις παραλήπτη δεν είναι έγκυρες: '; $PHPMAILER_LANG['signing'] = 'Σφάλμα υπογραφής: '; -$PHPMAILER_LANG['smtp_code'] = 'Κώδικάς SMTP: '; -$PHPMAILER_LANG['smtp_code_ex'] = 'Πρόσθετες πληροφορίες SMTP: '; -$PHPMAILER_LANG['smtp_connect_failed'] = 'Αποτυχία σύνδεσης SMTP.'; -$PHPMAILER_LANG['smtp_detail'] = 'Λεπτομέρεια: '; -$PHPMAILER_LANG['smtp_error'] = 'Σφάλμα με τον διακομιστή SMTP: '; -$PHPMAILER_LANG['variable_set'] = 'Αδυναμία ορισμού ή επαναφοράς μεταβλητής: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Αποτυχία σύνδεσης στον SMTP Server.'; +$PHPMAILER_LANG['smtp_error'] = 'Σφάλμα από τον SMTP Server: '; +$PHPMAILER_LANG['variable_set'] = 'Αδυναμία ορισμού ή αρχικοποίησης μεταβλητής: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-es.php b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-es.php index 4e74bfb7..6ba74627 100644 --- a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-es.php +++ b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-es.php @@ -4,33 +4,24 @@ * Spanish PHPMailer language file: refer to English translation for definitive list * @package PHPMailer * @author Matt Sturdy - * @author Crystopher Glodzienski Cardoso - * @author Daniel Cruz */ $PHPMAILER_LANG['authenticate'] = 'Error SMTP: Imposible autentificar.'; -$PHPMAILER_LANG['buggy_php'] = 'Tu versión de PHP está afectada por un bug que puede resultar en mensajes corruptos. Para arreglarlo, cambia a enviar usando SMTP, deshabilita la opción mail.add_x_header en tu php.ini, cambia a MacOS o Linux, o actualiza tu PHP a la versión 7.0.17+ o 7.1.3+.'; $PHPMAILER_LANG['connect_host'] = 'Error SMTP: Imposible conectar al servidor SMTP.'; $PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Datos no aceptados.'; $PHPMAILER_LANG['empty_message'] = 'El cuerpo del mensaje está vacío.'; $PHPMAILER_LANG['encoding'] = 'Codificación desconocida: '; $PHPMAILER_LANG['execute'] = 'Imposible ejecutar: '; -$PHPMAILER_LANG['extension_missing'] = 'Extensión faltante: '; $PHPMAILER_LANG['file_access'] = 'Imposible acceder al archivo: '; $PHPMAILER_LANG['file_open'] = 'Error de Archivo: Imposible abrir el archivo: '; $PHPMAILER_LANG['from_failed'] = 'La(s) siguiente(s) direcciones de remitente fallaron: '; $PHPMAILER_LANG['instantiate'] = 'Imposible crear una instancia de la función Mail.'; $PHPMAILER_LANG['invalid_address'] = 'Imposible enviar: dirección de email inválido: '; -$PHPMAILER_LANG['invalid_header'] = 'Nombre o valor de encabezado no válido'; -$PHPMAILER_LANG['invalid_hostentry'] = 'Hostentry inválido: '; -$PHPMAILER_LANG['invalid_host'] = 'Host inválido: '; $PHPMAILER_LANG['mailer_not_supported'] = ' mailer no está soportado.'; $PHPMAILER_LANG['provide_address'] = 'Debe proporcionar al menos una dirección de email de destino.'; $PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Los siguientes destinos fallaron: '; $PHPMAILER_LANG['signing'] = 'Error al firmar: '; -$PHPMAILER_LANG['smtp_code'] = 'Código del servidor SMTP: '; -$PHPMAILER_LANG['smtp_code_ex'] = 'Información adicional del servidor SMTP: '; $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falló.'; -$PHPMAILER_LANG['smtp_detail'] = 'Detalle: '; $PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: '; $PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensión faltante: '; diff --git a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php index 6d1e6373..243c0548 100644 --- a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php +++ b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php @@ -20,6 +20,7 @@ $PHPMAILER_LANG['instantiate'] = 'mail-funktion luonti epäonnistui.'; $PHPMAILER_LANG['mailer_not_supported'] = 'postivälitintyyppiä ei tueta.'; $PHPMAILER_LANG['provide_address'] = 'Aseta vähintään yksi vastaanottajan sähköpostiosoite.'; $PHPMAILER_LANG['recipients_failed'] = 'SMTP-virhe: seuraava vastaanottaja osoite on virheellinen.'; +$PHPMAILER_LANG['encoding'] = 'Tuntematon koodaustyyppi: '; //$PHPMAILER_LANG['signing'] = 'Signing Error: '; //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; diff --git a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php index a6d582d8..b57f0ec6 100644 --- a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php +++ b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php @@ -6,31 +6,27 @@ * Some French punctuation requires a thin non-breaking space (U+202F) character before it, * for example before a colon or exclamation mark. * There is one of these characters between these quotes: " " + * @see http://unicode.org/udhr/n/notes_fra.html */ -$PHPMAILER_LANG['authenticate'] = 'Erreur SMTP : échec de l’authentification.'; -$PHPMAILER_LANG['buggy_php'] = 'Votre version de PHP est affectée par un bug qui peut entraîner des messages corrompus. Pour résoudre ce problème, passez à l’envoi par SMTP, désactivez l’option mail.add_x_header dans le fichier php.ini, passez à MacOS ou Linux, ou passez PHP à la version 7.0.17+ ou 7.1.3+.'; +$PHPMAILER_LANG['authenticate'] = 'Erreur SMTP : échec de l\'authentification.'; $PHPMAILER_LANG['connect_host'] = 'Erreur SMTP : impossible de se connecter au serveur SMTP.'; $PHPMAILER_LANG['data_not_accepted'] = 'Erreur SMTP : données incorrectes.'; $PHPMAILER_LANG['empty_message'] = 'Corps du message vide.'; $PHPMAILER_LANG['encoding'] = 'Encodage inconnu : '; -$PHPMAILER_LANG['execute'] = 'Impossible de lancer l’exécution : '; -$PHPMAILER_LANG['extension_missing'] = 'Extension manquante : '; -$PHPMAILER_LANG['file_access'] = 'Impossible d’accéder au fichier : '; +$PHPMAILER_LANG['execute'] = 'Impossible de lancer l\'exécution : '; +$PHPMAILER_LANG['file_access'] = 'Impossible d\'accéder au fichier : '; $PHPMAILER_LANG['file_open'] = 'Ouverture du fichier impossible : '; -$PHPMAILER_LANG['from_failed'] = 'L’adresse d’expéditeur suivante a échoué : '; -$PHPMAILER_LANG['instantiate'] = 'Impossible d’instancier la fonction mail.'; -$PHPMAILER_LANG['invalid_address'] = 'Adresse courriel non valide : '; -$PHPMAILER_LANG['invalid_header'] = 'Nom ou valeur de l’en-tête non valide'; -$PHPMAILER_LANG['invalid_hostentry'] = 'Entrée d’hôte non valide : '; -$PHPMAILER_LANG['invalid_host'] = 'Hôte non valide : '; +$PHPMAILER_LANG['from_failed'] = 'L\'adresse d\'expéditeur suivante a échoué : '; +$PHPMAILER_LANG['instantiate'] = 'Impossible d\'instancier la fonction mail.'; +$PHPMAILER_LANG['invalid_address'] = 'L\'adresse courriel n\'est pas valide : '; +$PHPMAILER_LANG['invalid_hostentry'] = 'L\'entrée hôte n\'est pas valide : '; +$PHPMAILER_LANG['invalid_host'] = 'L\'hôte n\'est pas valide : '; $PHPMAILER_LANG['mailer_not_supported'] = ' client de messagerie non supporté.'; $PHPMAILER_LANG['provide_address'] = 'Vous devez fournir au moins une adresse de destinataire.'; -$PHPMAILER_LANG['recipients_failed'] = 'Erreur SMTP : les destinataires suivants ont échoué : '; +$PHPMAILER_LANG['recipients_failed'] = 'Erreur SMTP : les destinataires suivants sont en erreur : '; $PHPMAILER_LANG['signing'] = 'Erreur de signature : '; -$PHPMAILER_LANG['smtp_code'] = 'Code SMTP : '; -$PHPMAILER_LANG['smtp_code_ex'] = 'Informations supplémentaires SMTP : '; -$PHPMAILER_LANG['smtp_connect_failed'] = 'La fonction SMTP connect() a échoué.'; -$PHPMAILER_LANG['smtp_detail'] = 'Détails : '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Échec de la connexion SMTP.'; $PHPMAILER_LANG['smtp_error'] = 'Erreur du serveur SMTP : '; -$PHPMAILER_LANG['variable_set'] = 'Impossible d’initialiser ou de réinitialiser une variable : '; +$PHPMAILER_LANG['variable_set'] = 'Impossible d\'initialiser ou de réinitialiser une variable : '; +$PHPMAILER_LANG['extension_missing'] = 'Extension manquante : '; diff --git a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php index d2856e05..d973a359 100644 --- a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php +++ b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php @@ -4,32 +4,24 @@ * Hindi PHPMailer language file: refer to English translation for definitive list * @package PHPMailer * @author Yash Karanke - * Rewrite and extension of the work by Jayanti Suthar */ $PHPMAILER_LANG['authenticate'] = 'SMTP त्रुटि: प्रामाणिकता की जांच नहीं हो सका। '; -$PHPMAILER_LANG['buggy_php'] = 'PHP का आपका संस्करण एक बग से प्रभावित है जिसके परिणामस्वरूप संदेश दूषित हो सकते हैं. इसे ठीक करने हेतु, भेजने के लिए SMTP का उपयोग करे, अपने php.ini में mail.add_x_header विकल्प को अक्षम करें, MacOS या Linux पर जाए, या अपने PHP संस्करण को 7.0.17+ या 7.1.3+ बदले.'; $PHPMAILER_LANG['connect_host'] = 'SMTP त्रुटि: SMTP सर्वर से कनेक्ट नहीं हो सका। '; $PHPMAILER_LANG['data_not_accepted'] = 'SMTP त्रुटि: डेटा स्वीकार नहीं किया जाता है। '; $PHPMAILER_LANG['empty_message'] = 'संदेश खाली है। '; $PHPMAILER_LANG['encoding'] = 'अज्ञात एन्कोडिंग प्रकार। '; $PHPMAILER_LANG['execute'] = 'आदेश को निष्पादित करने में विफल। '; -$PHPMAILER_LANG['extension_missing'] = 'एक्सटेन्षन गायब है: '; $PHPMAILER_LANG['file_access'] = 'फ़ाइल उपलब्ध नहीं है। '; $PHPMAILER_LANG['file_open'] = 'फ़ाइल त्रुटि: फाइल को खोला नहीं जा सका। '; $PHPMAILER_LANG['from_failed'] = 'प्रेषक का पता गलत है। '; $PHPMAILER_LANG['instantiate'] = 'मेल फ़ंक्शन कॉल नहीं कर सकता है।'; $PHPMAILER_LANG['invalid_address'] = 'पता गलत है। '; -$PHPMAILER_LANG['invalid_header'] = 'अमान्य हेडर नाम या मान'; -$PHPMAILER_LANG['invalid_hostentry'] = 'अमान्य hostentry: '; -$PHPMAILER_LANG['invalid_host'] = 'अमान्य होस्ट: '; $PHPMAILER_LANG['mailer_not_supported'] = 'मेल सर्वर के साथ काम नहीं करता है। '; $PHPMAILER_LANG['provide_address'] = 'आपको कम से कम एक प्राप्तकर्ता का ई-मेल पता प्रदान करना होगा।'; $PHPMAILER_LANG['recipients_failed'] = 'SMTP त्रुटि: निम्न प्राप्तकर्ताओं को पते भेजने में विफल। '; -$PHPMAILER_LANG['signing'] = 'साइनअप त्रुटि: '; -$PHPMAILER_LANG['smtp_code'] = 'SMTP कोड: '; -$PHPMAILER_LANG['smtp_code_ex'] = 'अतिरिक्त SMTP जानकारी: '; +$PHPMAILER_LANG['signing'] = 'साइनअप त्रुटि:। '; $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP का connect () फ़ंक्शन विफल हुआ। '; -$PHPMAILER_LANG['smtp_detail'] = 'विवरण: '; $PHPMAILER_LANG['smtp_error'] = 'SMTP सर्वर त्रुटि। '; $PHPMAILER_LANG['variable_set'] = 'चर को बना या संशोधित नहीं किया जा सकता। '; +$PHPMAILER_LANG['extension_missing'] = 'एक्सटेन्षन गायब है: '; diff --git a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php index d01869ce..eee79898 100644 --- a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php +++ b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php @@ -3,35 +3,26 @@ /** * Japanese PHPMailer language file: refer to English translation for definitive list * @package PHPMailer - * @author Mitsuhiro Yoshida + * @author Mitsuhiro Yoshida * @author Yoshi Sakai - * @author Arisophy - * @author ARAKI Musashi */ $PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。'; -$PHPMAILER_LANG['buggy_php'] = 'ご利用のバージョンのPHPには不具合があり、メッセージが破損するおそれがあります。問題の解決は以下のいずれかを行ってください。SMTPでの送信に切り替える。php.iniのmail.add_x_headerをoffにする。MacOSまたはLinuxに切り替える。PHPバージョン7.0.17以降または7.1.3以降にアップグレードする。'; $PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。'; $PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。'; -$PHPMAILER_LANG['empty_message'] = 'メール本文が空です。'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; $PHPMAILER_LANG['encoding'] = '不明なエンコーディング: '; $PHPMAILER_LANG['execute'] = '実行できませんでした: '; -$PHPMAILER_LANG['extension_missing'] = '拡張機能が見つかりません: '; $PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: '; $PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: '; $PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: '; $PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。'; -$PHPMAILER_LANG['invalid_address'] = '不正なメールアドレス: '; -$PHPMAILER_LANG['invalid_header'] = '不正なヘッダー名またはその内容'; -$PHPMAILER_LANG['invalid_hostentry'] = '不正なホストエントリー: '; -$PHPMAILER_LANG['invalid_host'] = '不正なホスト: '; -$PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。'; +//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; $PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。'; +$PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。'; $PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: '; -$PHPMAILER_LANG['signing'] = '署名エラー: '; -$PHPMAILER_LANG['smtp_code'] = 'SMTPコード: '; -$PHPMAILER_LANG['smtp_code_ex'] = 'SMTP追加情報: '; -$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP接続に失敗しました。'; -$PHPMAILER_LANG['smtp_detail'] = '詳細: '; -$PHPMAILER_LANG['smtp_error'] = 'SMTPサーバーエラー: '; -$PHPMAILER_LANG['variable_set'] = '変数が存在しません: '; +//$PHPMAILER_LANG['signing'] = 'Signing Error: '; +//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; +//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ku.php b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ku.php deleted file mode 100644 index cf3bda69..00000000 --- a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ku.php +++ /dev/null @@ -1,27 +0,0 @@ - - */ - -$PHPMAILER_LANG['authenticate'] = 'هەڵەی SMTP : نەتوانرا کۆدەکە پشتڕاست بکرێتەوە '; -$PHPMAILER_LANG['connect_host'] = 'هەڵەی SMTP: نەتوانرا پەیوەندی بە سێرڤەرەوە بکات SMTP.'; -$PHPMAILER_LANG['data_not_accepted'] = 'هەڵەی SMTP: ئەو زانیاریانە قبوڵ نەکرا.'; -$PHPMAILER_LANG['empty_message'] = 'پەیامەکە بەتاڵە'; -$PHPMAILER_LANG['encoding'] = 'کۆدکردنی نەزانراو : '; -$PHPMAILER_LANG['execute'] = 'ناتوانرێت جێبەجێ بکرێت: '; -$PHPMAILER_LANG['file_access'] = 'ناتوانرێت دەستت بگات بە فایلەکە: '; -$PHPMAILER_LANG['file_open'] = 'هەڵەی پەڕگە(فایل): ناتوانرێت بکرێتەوە: '; -$PHPMAILER_LANG['from_failed'] = 'هەڵە لە ئاستی ناونیشانی نێرەر: '; -$PHPMAILER_LANG['instantiate'] = 'ناتوانرێت خزمەتگوزاری پۆستە پێشکەش بکرێت.'; -$PHPMAILER_LANG['invalid_address'] = 'نەتوانرا بنێردرێت ، چونکە ناونیشانی ئیمەیڵەکە نادروستە: '; -$PHPMAILER_LANG['mailer_not_supported'] = ' مەیلەر پشتگیری ناکات'; -$PHPMAILER_LANG['provide_address'] = 'دەبێت ناونیشانی ئیمەیڵی لانیکەم یەک وەرگر دابین بکرێت.'; -$PHPMAILER_LANG['recipients_failed'] = ' هەڵەی SMTP: ئەم هەڵانەی خوارەوەشکستی هێنا لە ناردن بۆ هەردووکیان: '; -$PHPMAILER_LANG['signing'] = 'هەڵەی واژۆ: '; -$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect()پەیوەندی شکستی هێنا .'; -$PHPMAILER_LANG['smtp_error'] = 'هەڵەی ئاستی سێرڤەری SMTP: '; -$PHPMAILER_LANG['variable_set'] = 'ناتوانرێت بیگۆڕیت یان دوبارە بینێریتەوە: '; -$PHPMAILER_LANG['extension_missing'] = 'درێژکراوە نەماوە: '; diff --git a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-mn.php b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-mn.php deleted file mode 100644 index 04d262c7..00000000 --- a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-mn.php +++ /dev/null @@ -1,27 +0,0 @@ - + * @author Jonadabe */ -$PHPMAILER_LANG['authenticate'] = 'Erro SMTP: Falha na autenticação.'; -$PHPMAILER_LANG['buggy_php'] = 'A sua versão do PHP tem um bug que pode causar mensagens corrompidas. Para resolver, utilize o envio por SMTP, desative a opção mail.add_x_header no ficheiro php.ini, mude para MacOS ou Linux, ou atualize o PHP para a versão 7.0.17+ ou 7.1.3+.'; -$PHPMAILER_LANG['connect_host'] = 'Erro SMTP: Não foi possível ligar ao servidor SMTP.'; -$PHPMAILER_LANG['data_not_accepted'] = 'Erro SMTP: Dados não aceites.'; -$PHPMAILER_LANG['empty_message'] = 'A mensagem de e-mail está vazia.'; +$PHPMAILER_LANG['authenticate'] = 'Erro do SMTP: Não foi possível realizar a autenticação.'; +$PHPMAILER_LANG['connect_host'] = 'Erro do SMTP: Não foi possível realizar ligação com o servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Erro do SMTP: Os dados foram rejeitados.'; +$PHPMAILER_LANG['empty_message'] = 'A mensagem no e-mail está vazia.'; $PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: '; $PHPMAILER_LANG['execute'] = 'Não foi possível executar: '; -$PHPMAILER_LANG['extension_missing'] = 'Extensão em falta: '; -$PHPMAILER_LANG['file_access'] = 'Não foi possível aceder ao ficheiro: '; -$PHPMAILER_LANG['file_open'] = 'Erro ao abrir o ficheiro: '; -$PHPMAILER_LANG['from_failed'] = 'O envio falhou para o seguinte endereço do remetente: '; -$PHPMAILER_LANG['instantiate'] = 'Não foi possível instanciar a função mail.'; -$PHPMAILER_LANG['invalid_address'] = 'Endereço de e-mail inválido: '; -$PHPMAILER_LANG['invalid_header'] = 'Nome ou valor do cabeçalho inválido.'; -$PHPMAILER_LANG['invalid_hostentry'] = 'Entrada de host inválida: '; -$PHPMAILER_LANG['invalid_host'] = 'Host inválido: '; -$PHPMAILER_LANG['mailer_not_supported'] = 'O cliente de e-mail não é suportado.'; -$PHPMAILER_LANG['provide_address'] = 'Deve fornecer pelo menos um endereço de destinatário.'; -$PHPMAILER_LANG['recipients_failed'] = 'Erro SMTP: Falha no envio para os seguintes destinatários: '; +$PHPMAILER_LANG['file_access'] = 'Não foi possível aceder o ficheiro: '; +$PHPMAILER_LANG['file_open'] = 'Abertura do ficheiro: Não foi possível abrir o ficheiro: '; +$PHPMAILER_LANG['from_failed'] = 'Ocorreram falhas nos endereços dos seguintes remententes: '; +$PHPMAILER_LANG['instantiate'] = 'Não foi possível iniciar uma instância da função mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Não foi enviado nenhum e-mail para o endereço de e-mail inválido: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.'; +$PHPMAILER_LANG['provide_address'] = 'Tem de fornecer pelo menos um endereço como destinatário do e-mail.'; +$PHPMAILER_LANG['recipients_failed'] = 'Erro do SMTP: O endereço do seguinte destinatário falhou: '; $PHPMAILER_LANG['signing'] = 'Erro ao assinar: '; -$PHPMAILER_LANG['smtp_code'] = 'Código SMTP: '; -$PHPMAILER_LANG['smtp_code_ex'] = 'Informações adicionais SMTP: '; -$PHPMAILER_LANG['smtp_connect_failed'] = 'Falha na função SMTP connect().'; -$PHPMAILER_LANG['smtp_detail'] = 'Detalhes: '; -$PHPMAILER_LANG['smtp_error'] = 'Erro do servidor SMTP: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.'; +$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: '; $PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensão em falta: '; diff --git a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php index 5239865a..d8638098 100644 --- a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php +++ b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php @@ -7,32 +7,24 @@ * @author Lucas Guimarães * @author Phelipe Alves * @author Fabio Beneditto - * @author Geidson Benício Coelho */ $PHPMAILER_LANG['authenticate'] = 'Erro de SMTP: Não foi possível autenticar.'; -$PHPMAILER_LANG['buggy_php'] = 'Sua versão do PHP é afetada por um bug que por resultar em messagens corrompidas. Para corrigir, mude para enviar usando SMTP, desative a opção mail.add_x_header em seu php.ini, mude para MacOS ou Linux, ou atualize seu PHP para versão 7.0.17+ ou 7.1.3+ '; $PHPMAILER_LANG['connect_host'] = 'Erro de SMTP: Não foi possível conectar ao servidor SMTP.'; $PHPMAILER_LANG['data_not_accepted'] = 'Erro de SMTP: Dados rejeitados.'; $PHPMAILER_LANG['empty_message'] = 'Mensagem vazia'; $PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: '; $PHPMAILER_LANG['execute'] = 'Não foi possível executar: '; -$PHPMAILER_LANG['extension_missing'] = 'Extensão não existe: '; $PHPMAILER_LANG['file_access'] = 'Não foi possível acessar o arquivo: '; $PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: Não foi possível abrir o arquivo: '; $PHPMAILER_LANG['from_failed'] = 'Os seguintes remetentes falharam: '; $PHPMAILER_LANG['instantiate'] = 'Não foi possível instanciar a função mail.'; $PHPMAILER_LANG['invalid_address'] = 'Endereço de e-mail inválido: '; -$PHPMAILER_LANG['invalid_header'] = 'Nome ou valor de cabeçalho inválido'; -$PHPMAILER_LANG['invalid_hostentry'] = 'hostentry inválido: '; -$PHPMAILER_LANG['invalid_host'] = 'host inválido: '; $PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.'; $PHPMAILER_LANG['provide_address'] = 'Você deve informar pelo menos um destinatário.'; $PHPMAILER_LANG['recipients_failed'] = 'Erro de SMTP: Os seguintes destinatários falharam: '; $PHPMAILER_LANG['signing'] = 'Erro de Assinatura: '; $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.'; -$PHPMAILER_LANG['smtp_code'] = 'Código do servidor SMTP: '; $PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: '; -$PHPMAILER_LANG['smtp_code_ex'] = 'Informações adicionais do servidor SMTP: '; -$PHPMAILER_LANG['smtp_detail'] = 'Detalhes do servidor SMTP: '; $PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensão não existe: '; diff --git a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php index 45bef915..292ec1e4 100644 --- a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php +++ b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php @@ -3,31 +3,25 @@ /** * Romanian PHPMailer language file: refer to English translation for definitive list * @package PHPMailer + * @author Alex Florea */ $PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Autentificarea a eșuat.'; -$PHPMAILER_LANG['buggy_php'] = 'Versiunea instalată de PHP este afectată de o problemă care poate duce la coruperea mesajelor Pentru a preveni această problemă, folosiți SMTP, dezactivați opțiunea mail.add_x_header din php.ini, folosiți MacOS/Linux sau actualizați versiunea de PHP la 7.0.17+ sau 7.1.3+.'; $PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Conectarea la serverul SMTP a eșuat.'; $PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Datele nu au fost acceptate.'; $PHPMAILER_LANG['empty_message'] = 'Mesajul este gol.'; $PHPMAILER_LANG['encoding'] = 'Encodare necunoscută: '; $PHPMAILER_LANG['execute'] = 'Nu se poate executa următoarea comandă: '; -$PHPMAILER_LANG['extension_missing'] = 'Lipsește extensia: '; $PHPMAILER_LANG['file_access'] = 'Nu se poate accesa următorul fișier: '; $PHPMAILER_LANG['file_open'] = 'Eroare fișier: Nu se poate deschide următorul fișier: '; $PHPMAILER_LANG['from_failed'] = 'Următoarele adrese From au dat eroare: '; $PHPMAILER_LANG['instantiate'] = 'Funcția mail nu a putut fi inițializată.'; $PHPMAILER_LANG['invalid_address'] = 'Adresa de email nu este validă: '; -$PHPMAILER_LANG['invalid_header'] = 'Numele sau valoarea header-ului nu este validă: '; -$PHPMAILER_LANG['invalid_hostentry'] = 'Hostentry invalid: '; -$PHPMAILER_LANG['invalid_host'] = 'Host invalid: '; $PHPMAILER_LANG['mailer_not_supported'] = ' mailer nu este suportat.'; $PHPMAILER_LANG['provide_address'] = 'Trebuie să adăugați cel puțin o adresă de email.'; $PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Următoarele adrese de email au eșuat: '; $PHPMAILER_LANG['signing'] = 'A aparut o problemă la semnarea emailului. '; -$PHPMAILER_LANG['smtp_code'] = 'Cod SMTP: '; -$PHPMAILER_LANG['smtp_code_ex'] = 'Informații SMTP adiționale: '; $PHPMAILER_LANG['smtp_connect_failed'] = 'Conectarea la serverul SMTP a eșuat.'; -$PHPMAILER_LANG['smtp_detail'] = 'Detalii SMTP: '; $PHPMAILER_LANG['smtp_error'] = 'Eroare server SMTP: '; $PHPMAILER_LANG['variable_set'] = 'Nu se poate seta/reseta variabila. '; +$PHPMAILER_LANG['extension_missing'] = 'Lipsește extensia: '; diff --git a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php index 8013f37c..8c8c5e81 100644 --- a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php +++ b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php @@ -5,32 +5,24 @@ * @package PHPMailer * @author Alexey Chumakov * @author Foster Snowhill - * @author ProjectSoft */ -$PHPMAILER_LANG['authenticate'] = 'Ошибка SMTP: не удалось пройти аутентификацию.'; -$PHPMAILER_LANG['buggy_php'] = 'В вашей версии PHP есть ошибка, которая может привести к повреждению сообщений. Чтобы исправить, переключитесь на отправку по SMTP, отключите опцию mail.add_x_header в ваш php.ini, переключитесь на MacOS или Linux или обновите PHP до версии 7.0.17+ или 7.1.3+.'; +$PHPMAILER_LANG['authenticate'] = 'Ошибка SMTP: ошибка авторизации.'; $PHPMAILER_LANG['connect_host'] = 'Ошибка SMTP: не удается подключиться к SMTP-серверу.'; $PHPMAILER_LANG['data_not_accepted'] = 'Ошибка SMTP: данные не приняты.'; -$PHPMAILER_LANG['empty_message'] = 'Пустое сообщение'; $PHPMAILER_LANG['encoding'] = 'Неизвестная кодировка: '; $PHPMAILER_LANG['execute'] = 'Невозможно выполнить команду: '; -$PHPMAILER_LANG['extension_missing'] = 'Расширение отсутствует: '; $PHPMAILER_LANG['file_access'] = 'Нет доступа к файлу: '; $PHPMAILER_LANG['file_open'] = 'Файловая ошибка: не удаётся открыть файл: '; $PHPMAILER_LANG['from_failed'] = 'Неверный адрес отправителя: '; $PHPMAILER_LANG['instantiate'] = 'Невозможно запустить функцию mail().'; -$PHPMAILER_LANG['invalid_address'] = 'Не отправлено из-за неправильного формата email-адреса: '; -$PHPMAILER_LANG['invalid_header'] = 'Неверное имя или значение заголовка'; -$PHPMAILER_LANG['invalid_hostentry'] = 'Неверная запись хоста: '; -$PHPMAILER_LANG['invalid_host'] = 'Неверный хост: '; +$PHPMAILER_LANG['provide_address'] = 'Пожалуйста, введите хотя бы один email-адрес получателя.'; $PHPMAILER_LANG['mailer_not_supported'] = ' — почтовый сервер не поддерживается.'; -$PHPMAILER_LANG['provide_address'] = 'Вы должны указать хотя бы один адрес электронной почты получателя.'; -$PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: Ошибка следующих получателей: '; +$PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: не удалась отправка таким адресатам: '; +$PHPMAILER_LANG['empty_message'] = 'Пустое сообщение'; +$PHPMAILER_LANG['invalid_address'] = 'Не отправлено из-за неправильного формата email-адреса: '; $PHPMAILER_LANG['signing'] = 'Ошибка подписи: '; -$PHPMAILER_LANG['smtp_code'] = 'Код SMTP: '; -$PHPMAILER_LANG['smtp_code_ex'] = 'Дополнительная информация SMTP: '; -$PHPMAILER_LANG['smtp_connect_failed'] = 'Ошибка соединения с SMTP-сервером.'; -$PHPMAILER_LANG['smtp_detail'] = 'Детали: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Ошибка соединения с SMTP-сервером'; $PHPMAILER_LANG['smtp_error'] = 'Ошибка SMTP-сервера: '; $PHPMAILER_LANG['variable_set'] = 'Невозможно установить или сбросить переменную: '; +$PHPMAILER_LANG['extension_missing'] = 'Расширение отсутствует: '; diff --git a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-si.php b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-si.php deleted file mode 100644 index dce502aa..00000000 --- a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-si.php +++ /dev/null @@ -1,34 +0,0 @@ - - */ - -$PHPMAILER_LANG['authenticate'] = 'SMTP දෝෂය: සත්‍යාපනය අසාර්ථක විය.'; -$PHPMAILER_LANG['buggy_php'] = 'ඔබගේ PHP version එකෙහි පවතින දෝෂයක් නිසා email පණිවිඩ දෝෂ සහගත වීමේ හැකියාවක් ඇත. මෙය විසදීම සදහා SMTP භාවිතා කිරීම, mail.add_x_header INI setting එක අක්‍රීය කිරීම, MacOS හෝ Linux වලට මාරු වීම, හෝ ඔබගේ PHP version එක 7.0.17+ හෝ 7.1.3+ වලට අලුත් කිරීම කරගන්න.'; -$PHPMAILER_LANG['connect_host'] = 'SMTP දෝෂය: සම්බන්ධ වීමට නොහැකි විය.'; -$PHPMAILER_LANG['data_not_accepted'] = 'SMTP දෝෂය: දත්ත පිළිගනු නොලැබේ.'; -$PHPMAILER_LANG['empty_message'] = 'පණිවිඩ අන්තර්ගතය හිස්'; -$PHPMAILER_LANG['encoding'] = 'නොදන්නා කේතනය: '; -$PHPMAILER_LANG['execute'] = 'ක්‍රියාත්මක කළ නොහැකි විය: '; -$PHPMAILER_LANG['extension_missing'] = 'Extension එක නොමැත: '; -$PHPMAILER_LANG['file_access'] = 'File එකට ප්‍රවේශ විය නොහැකි විය: '; -$PHPMAILER_LANG['file_open'] = 'File දෝෂය: File එක විවෘත කළ නොහැක: '; -$PHPMAILER_LANG['from_failed'] = 'පහත From ලිපිනයන් අසාර්ථක විය: '; -$PHPMAILER_LANG['instantiate'] = 'mail function එක ක්‍රියාත්මක කළ නොහැක.'; -$PHPMAILER_LANG['invalid_address'] = 'වලංගු නොවන ලිපිනය: '; -$PHPMAILER_LANG['invalid_header'] = 'වලංගු නොවන header නාමයක් හෝ අගයක්'; -$PHPMAILER_LANG['invalid_hostentry'] = 'වලංගු නොවන hostentry එකක්: '; -$PHPMAILER_LANG['invalid_host'] = 'වලංගු නොවන host එකක්: '; -$PHPMAILER_LANG['mailer_not_supported'] = ' mailer සහාය නොදක්වයි.'; -$PHPMAILER_LANG['provide_address'] = 'ඔබ අවම වශයෙන් එක් ලබන්නෙකුගේ ඊමේල් ලිපිනයක් සැපයිය යුතුය.'; -$PHPMAILER_LANG['recipients_failed'] = 'SMTP දෝෂය: පහත ලබන්නන් අසමත් විය: '; -$PHPMAILER_LANG['signing'] = 'Sign කිරීමේ දෝෂය: '; -$PHPMAILER_LANG['smtp_code'] = 'SMTP කේතය: '; -$PHPMAILER_LANG['smtp_code_ex'] = 'අමතර SMTP තොරතුරු: '; -$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP සම්බන්ධය අසාර්ථක විය.'; -$PHPMAILER_LANG['smtp_detail'] = 'තොරතුරු: '; -$PHPMAILER_LANG['smtp_error'] = 'SMTP දෝෂය: '; -$PHPMAILER_LANG['variable_set'] = 'Variable එක සැකසීමට හෝ නැවත සැකසීමට නොහැක: '; diff --git a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php index 3e00c259..c437a886 100644 --- a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php +++ b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php @@ -9,28 +9,23 @@ */ $PHPMAILER_LANG['authenticate'] = 'SMTP napaka: Avtentikacija ni uspela.'; -$PHPMAILER_LANG['buggy_php'] = 'Na vašo PHP različico vpliva napaka, ki lahko povzroči poškodovana sporočila. Če želite težavo odpraviti, preklopite na pošiljanje prek SMTP, onemogočite možnost mail.add_x_header v vaši php.ini datoteki, preklopite na MacOS ali Linux, ali nadgradite vašo PHP zaličico na 7.0.17+ ali 7.1.3+.'; $PHPMAILER_LANG['connect_host'] = 'SMTP napaka: Vzpostavljanje povezave s SMTP gostiteljem ni uspelo.'; $PHPMAILER_LANG['data_not_accepted'] = 'SMTP napaka: Strežnik zavrača podatke.'; $PHPMAILER_LANG['empty_message'] = 'E-poštno sporočilo nima vsebine.'; $PHPMAILER_LANG['encoding'] = 'Nepoznan tip kodiranja: '; $PHPMAILER_LANG['execute'] = 'Operacija ni uspela: '; -$PHPMAILER_LANG['extension_missing'] = 'Manjkajoča razširitev: '; $PHPMAILER_LANG['file_access'] = 'Nimam dostopa do datoteke: '; $PHPMAILER_LANG['file_open'] = 'Ne morem odpreti datoteke: '; $PHPMAILER_LANG['from_failed'] = 'Neveljaven e-naslov pošiljatelja: '; $PHPMAILER_LANG['instantiate'] = 'Ne morem inicializirati mail funkcije.'; $PHPMAILER_LANG['invalid_address'] = 'E-poštno sporočilo ni bilo poslano. E-naslov je neveljaven: '; -$PHPMAILER_LANG['invalid_header'] = 'Neveljavno ime ali vrednost glave'; $PHPMAILER_LANG['invalid_hostentry'] = 'Neveljaven vnos gostitelja: '; $PHPMAILER_LANG['invalid_host'] = 'Neveljaven gostitelj: '; $PHPMAILER_LANG['mailer_not_supported'] = ' mailer ni podprt.'; $PHPMAILER_LANG['provide_address'] = 'Prosimo, vnesite vsaj enega naslovnika.'; $PHPMAILER_LANG['recipients_failed'] = 'SMTP napaka: Sledeči naslovniki so neveljavni: '; $PHPMAILER_LANG['signing'] = 'Napaka pri podpisovanju: '; -$PHPMAILER_LANG['smtp_code'] = 'SMTP koda: '; -$PHPMAILER_LANG['smtp_code_ex'] = 'Dodatne informacije o SMTP: '; $PHPMAILER_LANG['smtp_connect_failed'] = 'Ne morem vzpostaviti povezave s SMTP strežnikom.'; -$PHPMAILER_LANG['smtp_detail'] = 'Podrobnosti: '; $PHPMAILER_LANG['smtp_error'] = 'Napaka SMTP strežnika: '; $PHPMAILER_LANG['variable_set'] = 'Ne morem nastaviti oz. ponastaviti spremenljivke: '; +$PHPMAILER_LANG['extension_missing'] = 'Manjkajoča razširitev: '; diff --git a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php index 3c45bc1c..f938f802 100644 --- a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php +++ b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php @@ -11,28 +11,21 @@ */ $PHPMAILER_LANG['authenticate'] = 'SMTP Hatası: Oturum açılamadı.'; -$PHPMAILER_LANG['buggy_php'] = 'PHP sürümünüz iletilerin bozulmasına neden olabilecek bir hatadan etkileniyor. Bunu düzeltmek için, SMTP kullanarak göndermeye geçin, mail.add_x_header seçeneğini devre dışı bırakın php.ini dosyanızdaki mail.add_x_header seçeneğini devre dışı bırakın, MacOS veya Linux geçin veya PHP sürümünü 7.0.17+ veya 7.1.3+ sürümüne yükseltin,'; $PHPMAILER_LANG['connect_host'] = 'SMTP Hatası: SMTP sunucusuna bağlanılamadı.'; $PHPMAILER_LANG['data_not_accepted'] = 'SMTP Hatası: Veri kabul edilmedi.'; $PHPMAILER_LANG['empty_message'] = 'Mesajın içeriği boş'; $PHPMAILER_LANG['encoding'] = 'Bilinmeyen karakter kodlama: '; $PHPMAILER_LANG['execute'] = 'Çalıştırılamadı: '; -$PHPMAILER_LANG['extension_missing'] = 'Eklenti bulunamadı: '; $PHPMAILER_LANG['file_access'] = 'Dosyaya erişilemedi: '; $PHPMAILER_LANG['file_open'] = 'Dosya Hatası: Dosya açılamadı: '; $PHPMAILER_LANG['from_failed'] = 'Belirtilen adreslere gönderme başarısız: '; $PHPMAILER_LANG['instantiate'] = 'Örnek e-posta fonksiyonu oluşturulamadı.'; $PHPMAILER_LANG['invalid_address'] = 'Geçersiz e-posta adresi: '; -$PHPMAILER_LANG['invalid_header'] = 'Geçersiz başlık adı veya değeri: '; -$PHPMAILER_LANG['invalid_hostentry'] = 'Geçersiz ana bilgisayar girişi: '; -$PHPMAILER_LANG['invalid_host'] = 'Geçersiz ana bilgisayar: '; $PHPMAILER_LANG['mailer_not_supported'] = ' e-posta kütüphanesi desteklenmiyor.'; $PHPMAILER_LANG['provide_address'] = 'En az bir alıcı e-posta adresi belirtmelisiniz.'; $PHPMAILER_LANG['recipients_failed'] = 'SMTP Hatası: Belirtilen alıcılara ulaşılamadı: '; $PHPMAILER_LANG['signing'] = 'İmzalama hatası: '; -$PHPMAILER_LANG['smtp_code'] = 'SMTP kodu: '; -$PHPMAILER_LANG['smtp_code_ex'] = 'ek SMTP bilgileri: '; $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP connect() fonksiyonu başarısız.'; -$PHPMAILER_LANG['smtp_detail'] = 'SMTP SMTP Detayı: '; $PHPMAILER_LANG['smtp_error'] = 'SMTP sunucu hatası: '; $PHPMAILER_LANG['variable_set'] = 'Değişken ayarlanamadı ya da sıfırlanamadı: '; +$PHPMAILER_LANG['extension_missing'] = 'Eklenti bulunamadı: '; diff --git a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ur.php b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ur.php deleted file mode 100644 index 0b9de0f1..00000000 --- a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ur.php +++ /dev/null @@ -1,30 +0,0 @@ - - */ - -$PHPMAILER_LANG['authenticate'] = 'SMTP خرابی: تصدیق کرنے سے قاصر۔'; -$PHPMAILER_LANG['connect_host'] = 'SMTP خرابی: سرور سے منسلک ہونے سے قاصر۔'; -$PHPMAILER_LANG['data_not_accepted'] = 'SMTP خرابی: ڈیٹا قبول نہیں کیا گیا۔'; -$PHPMAILER_LANG['empty_message'] = 'پیغام کی باڈی خالی ہے۔'; -$PHPMAILER_LANG['encoding'] = 'نامعلوم انکوڈنگ: '; -$PHPMAILER_LANG['execute'] = 'عمل کرنے کے قابل نہیں '; -$PHPMAILER_LANG['file_access'] = 'فائل تک رسائی سے قاصر:'; -$PHPMAILER_LANG['file_open'] = 'فائل کی خرابی: فائل کو کھولنے سے قاصر:'; -$PHPMAILER_LANG['from_failed'] = 'درج ذیل بھیجنے والے کا پتہ ناکام ہو گیا:'; -$PHPMAILER_LANG['instantiate'] = 'میل فنکشن کی مثال بنانے سے قاصر۔'; -$PHPMAILER_LANG['invalid_address'] = 'بھیجنے سے قاصر: غلط ای میل پتہ:'; -$PHPMAILER_LANG['mailer_not_supported'] = ' میلر تعاون یافتہ نہیں ہے۔'; -$PHPMAILER_LANG['provide_address'] = 'آپ کو کم از کم ایک منزل کا ای میل پتہ فراہم کرنا چاہیے۔'; -$PHPMAILER_LANG['recipients_failed'] = 'SMTP خرابی: درج ذیل پتہ پر نہیں بھیجا جاسکا: '; -$PHPMAILER_LANG['signing'] = 'دستخط کی خرابی: '; -$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP ملنا ناکام ہوا'; -$PHPMAILER_LANG['smtp_error'] = 'SMTP سرور کی خرابی: '; -$PHPMAILER_LANG['variable_set'] = 'متغیر سیٹ نہیں کیا جا سکا: '; -$PHPMAILER_LANG['extension_missing'] = 'ایکٹینشن موجود نہیں ہے۔ '; -$PHPMAILER_LANG['smtp_code'] = 'SMTP سرور کوڈ: '; -$PHPMAILER_LANG['smtp_code_ex'] = 'اضافی SMTP سرور کی معلومات:'; -$PHPMAILER_LANG['invalid_header'] = 'غلط ہیڈر کا نام یا قدر'; diff --git a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php index 03d49116..728a4994 100644 --- a/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php +++ b/phpmailer/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php @@ -9,13 +9,11 @@ */ $PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。'; -$PHPMAILER_LANG['buggy_php'] = '您的 PHP 版本存在漏洞,可能会导致消息损坏。为修复此问题,请切换到使用 SMTP 发送,在您的 php.ini 中禁用 mail.add_x_header 选项。切换到 MacOS 或 Linux,或将您的 PHP 升级到 7.0.17+ 或 7.1.3+ 版本。'; $PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。'; $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。'; $PHPMAILER_LANG['empty_message'] = '邮件正文为空。'; $PHPMAILER_LANG['encoding'] = '未知编码:'; $PHPMAILER_LANG['execute'] = '无法执行:'; -$PHPMAILER_LANG['extension_missing'] = '缺少扩展名:'; $PHPMAILER_LANG['file_access'] = '无法访问文件:'; $PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:'; $PHPMAILER_LANG['from_failed'] = '发送地址错误:'; @@ -24,13 +22,8 @@ $PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是 $PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。'; $PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。'; $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:'; +$PHPMAILER_LANG['signing'] = '登录失败:'; $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。'; $PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错:'; $PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:'; -$PHPMAILER_LANG['invalid_header'] = '无效的标题名称或值'; -$PHPMAILER_LANG['invalid_hostentry'] = '无效的hostentry: '; -$PHPMAILER_LANG['invalid_host'] = '无效的主机:'; -$PHPMAILER_LANG['signing'] = '签名错误:'; -$PHPMAILER_LANG['smtp_code'] = 'SMTP代码: '; -$PHPMAILER_LANG['smtp_code_ex'] = '附加SMTP信息: '; -$PHPMAILER_LANG['smtp_detail'] = '详情:'; +$PHPMAILER_LANG['extension_missing'] = '丢失模块 Extension:'; diff --git a/phpmailer/vendor/phpmailer/phpmailer/phpunit.xml.dist b/phpmailer/vendor/phpmailer/phpmailer/phpunit.xml.dist new file mode 100644 index 00000000..c68df965 --- /dev/null +++ b/phpmailer/vendor/phpmailer/phpmailer/phpunit.xml.dist @@ -0,0 +1,35 @@ + + + + + ./test/ + + + + + + + + languages + pop3 + + + + + ./src + + + + + + + + diff --git a/phpmailer/vendor/phpmailer/phpmailer/src/DSNConfigurator.php b/phpmailer/vendor/phpmailer/phpmailer/src/DSNConfigurator.php deleted file mode 100644 index 7058c1f0..00000000 --- a/phpmailer/vendor/phpmailer/phpmailer/src/DSNConfigurator.php +++ /dev/null @@ -1,245 +0,0 @@ - - * @author Jim Jagielski (jimjag) - * @author Andy Prevost (codeworxtech) - * @author Brent R. Matzelle (original founder) - * @copyright 2012 - 2023 Marcus Bointon - * @copyright 2010 - 2012 Jim Jagielski - * @copyright 2004 - 2009 Andy Prevost - * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License - * @note This program is distributed in the hope that it will be useful - WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. - */ - -namespace PHPMailer\PHPMailer; - -/** - * Configure PHPMailer with DSN string. - * - * @see https://en.wikipedia.org/wiki/Data_source_name - * - * @author Oleg Voronkovich - */ -class DSNConfigurator -{ - /** - * Create new PHPMailer instance configured by DSN. - * - * @param string $dsn DSN - * @param bool $exceptions Should we throw external exceptions? - * - * @return PHPMailer - */ - public static function mailer($dsn, $exceptions = null) - { - static $configurator = null; - - if (null === $configurator) { - $configurator = new DSNConfigurator(); - } - - return $configurator->configure(new PHPMailer($exceptions), $dsn); - } - - /** - * Configure PHPMailer instance with DSN string. - * - * @param PHPMailer $mailer PHPMailer instance - * @param string $dsn DSN - * - * @return PHPMailer - */ - public function configure(PHPMailer $mailer, $dsn) - { - $config = $this->parseDSN($dsn); - - $this->applyConfig($mailer, $config); - - return $mailer; - } - - /** - * Parse DSN string. - * - * @param string $dsn DSN - * - * @throws Exception If DSN is malformed - * - * @return array Configuration - */ - private function parseDSN($dsn) - { - $config = $this->parseUrl($dsn); - - if (false === $config || !isset($config['scheme']) || !isset($config['host'])) { - throw new Exception('Malformed DSN'); - } - - if (isset($config['query'])) { - parse_str($config['query'], $config['query']); - } - - return $config; - } - - /** - * Apply configuration to mailer. - * - * @param PHPMailer $mailer PHPMailer instance - * @param array $config Configuration - * - * @throws Exception If scheme is invalid - */ - private function applyConfig(PHPMailer $mailer, $config) - { - switch ($config['scheme']) { - case 'mail': - $mailer->isMail(); - break; - case 'sendmail': - $mailer->isSendmail(); - break; - case 'qmail': - $mailer->isQmail(); - break; - case 'smtp': - case 'smtps': - $mailer->isSMTP(); - $this->configureSMTP($mailer, $config); - break; - default: - throw new Exception( - sprintf( - 'Invalid scheme: "%s". Allowed values: "mail", "sendmail", "qmail", "smtp", "smtps".', - $config['scheme'] - ) - ); - } - - if (isset($config['query'])) { - $this->configureOptions($mailer, $config['query']); - } - } - - /** - * Configure SMTP. - * - * @param PHPMailer $mailer PHPMailer instance - * @param array $config Configuration - */ - private function configureSMTP($mailer, $config) - { - $isSMTPS = 'smtps' === $config['scheme']; - - if ($isSMTPS) { - $mailer->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; - } - - $mailer->Host = $config['host']; - - if (isset($config['port'])) { - $mailer->Port = $config['port']; - } elseif ($isSMTPS) { - $mailer->Port = SMTP::DEFAULT_SECURE_PORT; - } - - $mailer->SMTPAuth = isset($config['user']) || isset($config['pass']); - - if (isset($config['user'])) { - $mailer->Username = $config['user']; - } - - if (isset($config['pass'])) { - $mailer->Password = $config['pass']; - } - } - - /** - * Configure options. - * - * @param PHPMailer $mailer PHPMailer instance - * @param array $options Options - * - * @throws Exception If option is unknown - */ - private function configureOptions(PHPMailer $mailer, $options) - { - $allowedOptions = get_object_vars($mailer); - - unset($allowedOptions['Mailer']); - unset($allowedOptions['SMTPAuth']); - unset($allowedOptions['Username']); - unset($allowedOptions['Password']); - unset($allowedOptions['Hostname']); - unset($allowedOptions['Port']); - unset($allowedOptions['ErrorInfo']); - - $allowedOptions = \array_keys($allowedOptions); - - foreach ($options as $key => $value) { - if (!in_array($key, $allowedOptions)) { - throw new Exception( - sprintf( - 'Unknown option: "%s". Allowed values: "%s"', - $key, - implode('", "', $allowedOptions) - ) - ); - } - - switch ($key) { - case 'AllowEmpty': - case 'SMTPAutoTLS': - case 'SMTPKeepAlive': - case 'SingleTo': - case 'UseSendmailOptions': - case 'do_verp': - case 'DKIM_copyHeaderFields': - $mailer->$key = (bool) $value; - break; - case 'Priority': - case 'SMTPDebug': - case 'WordWrap': - $mailer->$key = (int) $value; - break; - default: - $mailer->$key = $value; - break; - } - } - } - - /** - * Parse a URL. - * Wrapper for the built-in parse_url function to work around a bug in PHP 5.5. - * - * @param string $url URL - * - * @return array|false - */ - protected function parseUrl($url) - { - if (\PHP_VERSION_ID >= 50600 || false === strpos($url, '?')) { - return parse_url($url); - } - - $chunks = explode('?', $url); - if (is_array($chunks)) { - $result = parse_url($chunks[0]); - if (is_array($result)) { - $result['query'] = $chunks[1]; - } - return $result; - } - - return false; - } -} diff --git a/phpmailer/vendor/phpmailer/phpmailer/src/Exception.php b/phpmailer/vendor/phpmailer/phpmailer/src/Exception.php index 09c1a2cf..a50a8991 100644 --- a/phpmailer/vendor/phpmailer/phpmailer/src/Exception.php +++ b/phpmailer/vendor/phpmailer/phpmailer/src/Exception.php @@ -13,7 +13,7 @@ * @copyright 2012 - 2020 Marcus Bointon * @copyright 2010 - 2012 Jim Jagielski * @copyright 2004 - 2009 Andy Prevost - * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License * @note This program is distributed in the hope that it will be useful - WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. @@ -35,6 +35,6 @@ class Exception extends \Exception */ public function errorMessage() { - return '' . htmlspecialchars($this->getMessage(), ENT_COMPAT | ENT_HTML401) . "
\n"; + return '' . htmlspecialchars($this->getMessage()) . "
\n"; } } diff --git a/phpmailer/vendor/phpmailer/phpmailer/src/OAuth.php b/phpmailer/vendor/phpmailer/phpmailer/src/OAuth.php index a7e95886..c93d0be1 100644 --- a/phpmailer/vendor/phpmailer/phpmailer/src/OAuth.php +++ b/phpmailer/vendor/phpmailer/phpmailer/src/OAuth.php @@ -13,7 +13,7 @@ * @copyright 2012 - 2020 Marcus Bointon * @copyright 2010 - 2012 Jim Jagielski * @copyright 2004 - 2009 Andy Prevost - * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License * @note This program is distributed in the hope that it will be useful - WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. @@ -29,11 +29,11 @@ use League\OAuth2\Client\Token\AccessToken; * OAuth - OAuth2 authentication wrapper class. * Uses the oauth2-client package from the League of Extraordinary Packages. * - * @see https://oauth2-client.thephpleague.com + * @see http://oauth2-client.thephpleague.com * * @author Marcus Bointon (Synchro/coolbru) */ -class OAuth implements OAuthTokenProvider +class OAuth { /** * An instance of the League OAuth Client Provider. diff --git a/phpmailer/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php b/phpmailer/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php deleted file mode 100644 index cbda1a12..00000000 --- a/phpmailer/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php +++ /dev/null @@ -1,44 +0,0 @@ - - * @author Jim Jagielski (jimjag) - * @author Andy Prevost (codeworxtech) - * @author Brent R. Matzelle (original founder) - * @copyright 2012 - 2020 Marcus Bointon - * @copyright 2010 - 2012 Jim Jagielski - * @copyright 2004 - 2009 Andy Prevost - * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License - * @note This program is distributed in the hope that it will be useful - WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. - */ - -namespace PHPMailer\PHPMailer; - -/** - * OAuthTokenProvider - OAuth2 token provider interface. - * Provides base64 encoded OAuth2 auth strings for SMTP authentication. - * - * @see OAuth - * @see SMTP::authenticate() - * - * @author Peter Scopes (pdscopes) - * @author Marcus Bointon (Synchro/coolbru) - */ -interface OAuthTokenProvider -{ - /** - * Generate a base64-encoded OAuth token ensuring that the access token has not expired. - * The string to be base 64 encoded should be in the form: - * "user=\001auth=Bearer \001\001" - * - * @return string - */ - public function getOauth64(); -} diff --git a/phpmailer/vendor/phpmailer/phpmailer/src/PHPMailer.php b/phpmailer/vendor/phpmailer/phpmailer/src/PHPMailer.php index 2444bcf3..eb4b742b 100644 --- a/phpmailer/vendor/phpmailer/phpmailer/src/PHPMailer.php +++ b/phpmailer/vendor/phpmailer/phpmailer/src/PHPMailer.php @@ -13,7 +13,7 @@ * @copyright 2012 - 2020 Marcus Bointon * @copyright 2010 - 2012 Jim Jagielski * @copyright 2004 - 2009 Andy Prevost - * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License * @note This program is distributed in the hope that it will be useful - WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. @@ -103,14 +103,14 @@ class PHPMailer * * @var string */ - public $From = ''; + public $From = 'root@localhost'; /** * The From name of the message. * * @var string */ - public $FromName = ''; + public $FromName = 'Root User'; /** * The envelope sender of the message. @@ -152,7 +152,8 @@ class PHPMailer * Only supported in simple alt or alt_inline message types * To generate iCal event structures, use classes like EasyPeasyICS or iCalcreator. * - * @see https://kigkonsult.se/iCalcreator/ + * @see http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/ + * @see http://kigkonsult.se/iCalcreator/ * * @var string */ @@ -253,7 +254,7 @@ class PHPMailer * You can set your own, but it must be in the format "", * as defined in RFC5322 section 3.6.4 or it will be ignored. * - * @see https://www.rfc-editor.org/rfc/rfc5322#section-3.6.4 + * @see https://tools.ietf.org/html/rfc5322#section-3.6.4 * * @var string */ @@ -349,24 +350,17 @@ class PHPMailer public $Password = ''; /** - * SMTP authentication type. Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2. - * If not specified, the first one from that list that the server supports will be selected. + * SMTP auth type. + * Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2, attempted in that order if not specified. * * @var string */ public $AuthType = ''; /** - * SMTP SMTPXClient command attributes + * An instance of the PHPMailer OAuth class. * - * @var array - */ - protected $SMTPXClient = []; - - /** - * An implementation of the PHPMailer OAuthTokenProvider interface. - * - * @var OAuthTokenProvider + * @var OAuth */ protected $oauth; @@ -387,7 +381,7 @@ class PHPMailer * 'DELAY' will notify you if there is an unusual delay in delivery, but the actual * delivery's outcome (success or failure) is not yet decided. * - * @see https://www.rfc-editor.org/rfc/rfc3461.html#section-4.1 for more information about NOTIFY + * @see https://tools.ietf.org/html/rfc3461 See section 4.1 for more information about NOTIFY */ public $dsn = ''; @@ -467,7 +461,7 @@ class PHPMailer * Only applicable when sending via SMTP. * * @see https://en.wikipedia.org/wiki/Variable_envelope_return_path - * @see https://www.postfix.org/VERP_README.html Postfix VERP info + * @see http://www.postfix.org/VERP_README.html Postfix VERP info * * @var bool */ @@ -550,10 +544,10 @@ class PHPMailer * The function that handles the result of the send email action. * It is called out by send() for each email sent. * - * Value can be any php callable: https://www.php.net/is_callable + * Value can be any php callable: http://www.php.net/is_callable * * Parameters: - * bool $result result of the send action + * bool $result result of the send action * array $to email addresses of the recipients * array $cc cc email addresses * array $bcc bcc email addresses @@ -580,10 +574,6 @@ class PHPMailer * May be a callable to inject your own validator, but there are several built-in validators. * The default validator uses PHP's FILTER_VALIDATE_EMAIL filter_var option. * - * If CharSet is UTF8, the validator is left at the default value, - * and you send to addresses that use non-ASCII local parts, then - * PHPMailer automatically changes to the 'eai' validator. - * * @see PHPMailer::validateAddress() * * @var string|callable @@ -663,14 +653,6 @@ class PHPMailer */ protected $ReplyToQueue = []; - /** - * Whether the need for SMTPUTF8 has been detected. Set by - * preSend() if necessary. - * - * @var bool - */ - public $UseSMTPUTF8 = false; - /** * The array of attachments. * @@ -707,7 +689,7 @@ class PHPMailer protected $boundary = []; /** - * The array of available text strings for the current language. + * The array of available languages. * * @var array */ @@ -768,7 +750,7 @@ class PHPMailer * * @var string */ - const VERSION = '6.10.0'; + const VERSION = '6.5.0'; /** * Error severity: message only, continue processing. @@ -813,7 +795,7 @@ class PHPMailer * The maximum line length supported by mail(). * * Background: mail() will sometimes corrupt messages - * with headers longer than 65 chars, see #818. + * with headers headers longer than 65 chars, see #818. * * @var int */ @@ -876,7 +858,7 @@ class PHPMailer private function mailPassthru($to, $subject, $body, $header, $params) { //Check overloading of mail function to avoid double-encoding - if ((int)ini_get('mbstring.func_overload') & 1) { + if (ini_get('mbstring.func_overload') & 1) { $subject = $this->secureHeader($subject); } else { $subject = $this->encodeHeader($this->secureHeader($subject)); @@ -914,7 +896,7 @@ class PHPMailer } //Is this a PSR-3 logger? if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) { - $this->Debugoutput->debug(rtrim($str, "\r\n")); + $this->Debugoutput->debug($str); return; } @@ -1083,9 +1065,9 @@ class PHPMailer * be modified after calling this function), addition of such addresses is delayed until send(). * Addresses that have been added already return false, but do not throw exceptions. * - * @param string $kind One of 'to', 'cc', 'bcc', or 'Reply-To' - * @param string $address The email address - * @param string $name An optional username associated with the address + * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' + * @param string $address The email address to send, resp. to reply to + * @param string $name * * @throws Exception * @@ -1093,11 +1075,9 @@ class PHPMailer */ protected function addOrEnqueueAnAddress($kind, $address, $name) { - $pos = false; - if ($address !== null) { - $address = trim($address); - $pos = strrpos($address, '@'); - } + $address = trim($address); + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + $pos = strrpos($address, '@'); if (false === $pos) { //At-sign is missing. $error_message = sprintf( @@ -1114,30 +1094,21 @@ class PHPMailer return false; } - if ($name !== null && is_string($name)) { - $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim - } else { - $name = ''; - } $params = [$kind, $address, $name]; //Enqueue addresses with IDN until we know the PHPMailer::$CharSet. - //Domain is assumed to be whatever is after the last @ symbol in the address - if ($this->has8bitChars(substr($address, ++$pos))) { - if (static::idnSupported()) { - if ('Reply-To' !== $kind) { - if (!array_key_exists($address, $this->RecipientsQueue)) { - $this->RecipientsQueue[$address] = $params; - - return true; - } - } elseif (!array_key_exists($address, $this->ReplyToQueue)) { - $this->ReplyToQueue[$address] = $params; + if (static::idnSupported() && $this->has8bitChars(substr($address, ++$pos))) { + if ('Reply-To' !== $kind) { + if (!array_key_exists($address, $this->RecipientsQueue)) { + $this->RecipientsQueue[$address] = $params; return true; } + } elseif (!array_key_exists($address, $this->ReplyToQueue)) { + $this->ReplyToQueue[$address] = $params; + + return true; } - //We have an 8-bit domain, but we are missing the necessary extensions to support it - //Or we are already sending to this address + return false; } @@ -1145,22 +1116,6 @@ class PHPMailer return call_user_func_array([$this, 'addAnAddress'], $params); } - /** - * Set the boundaries to use for delimiting MIME parts. - * If you override this, ensure you set all 3 boundaries to unique values. - * The default boundaries include a "=_" sequence which cannot occur in quoted-printable bodies, - * as suggested by https://www.rfc-editor.org/rfc/rfc2045#section-6.7 - * - * @return void - */ - public function setBoundaries() - { - $this->uniqueid = $this->generateId(); - $this->boundary[1] = 'b1=_' . $this->uniqueid; - $this->boundary[2] = 'b2=_' . $this->uniqueid; - $this->boundary[3] = 'b3=_' . $this->uniqueid; - } - /** * Add an address to one of the recipient arrays or to the ReplyTo array. * Addresses that have been added already return false, but do not throw exceptions. @@ -1175,15 +1130,6 @@ class PHPMailer */ protected function addAnAddress($kind, $address, $name = '') { - if ( - self::$validator === 'php' && - ((bool) preg_match('/[\x80-\xFF]/', $address)) - ) { - //The caller has not altered the validator and is sending to an address - //with UTF-8, so assume that they want UTF-8 support instead of failing - $this->CharSet = self::CHARSET_UTF8; - self::$validator = 'eai'; - } if (!in_array($kind, ['to', 'cc', 'bcc', 'Reply-To'])) { $error_message = sprintf( '%s: %s', @@ -1235,41 +1181,32 @@ class PHPMailer * Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available. * Note that quotes in the name part are removed. * - * @see https://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation + * @see http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation * * @param string $addrstr The address list string * @param bool $useimap Whether to use the IMAP extension to parse the list - * @param string $charset The charset to use when decoding the address list string. * * @return array */ - public static function parseAddresses($addrstr, $useimap = true, $charset = self::CHARSET_ISO88591) + public static function parseAddresses($addrstr, $useimap = true) { $addresses = []; if ($useimap && function_exists('imap_rfc822_parse_adrlist')) { //Use this built-in parser if it's available $list = imap_rfc822_parse_adrlist($addrstr, ''); - // Clear any potential IMAP errors to get rid of notices being thrown at end of script. - imap_errors(); foreach ($list as $address) { if ( - '.SYNTAX-ERROR.' !== $address->host && - static::validateAddress($address->mailbox . '@' . $address->host) + ('.SYNTAX-ERROR.' !== $address->host) && static::validateAddress( + $address->mailbox . '@' . $address->host + ) ) { //Decode the name part if it's present and encoded if ( property_exists($address, 'personal') && - //Check for a Mbstring constant rather than using extension_loaded, which is sometimes disabled - defined('MB_CASE_UPPER') && - preg_match('/^=\?.*\?=$/s', $address->personal) + extension_loaded('mbstring') && + preg_match('/^=\?.*\?=$/', $address->personal) ) { - $origCharset = mb_internal_encoding(); - mb_internal_encoding($charset); - //Undo any RFC2047-encoded spaces-as-underscores - $address->personal = str_replace('_', '=20', $address->personal); - //Decode the name $address->personal = mb_decode_mimeheader($address->personal); - mb_internal_encoding($origCharset); } $addresses[] = [ @@ -1297,16 +1234,9 @@ class PHPMailer $email = trim(str_replace('>', '', $email)); $name = trim($name); if (static::validateAddress($email)) { - //Check for a Mbstring constant rather than using extension_loaded, which is sometimes disabled //If this name is encoded, decode it - if (defined('MB_CASE_UPPER') && preg_match('/^=\?.*\?=$/s', $name)) { - $origCharset = mb_internal_encoding(); - mb_internal_encoding($charset); - //Undo any RFC2047-encoded spaces-as-underscores - $name = str_replace('_', '=20', $name); - //Decode the name + if (preg_match('/^=\?.*\?=$/', $name)) { $name = mb_decode_mimeheader($name); - mb_internal_encoding($origCharset); } $addresses[] = [ //Remove any surrounding quotes and spaces from the name @@ -1334,7 +1264,7 @@ class PHPMailer */ public function setFrom($address, $name = '', $auto = true) { - $address = trim((string)$address); + $address = trim($address); $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim //Don't validate now addresses with IDN. Will be done in send(). $pos = strrpos($address, '@'); @@ -1386,7 +1316,6 @@ class PHPMailer * * `pcre` Use old PCRE implementation; * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL; * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. - * * `eai` Use a pattern similar to the HTML5 spec for 'email' and to firefox, extended to support EAI (RFC6530). * * `noregex` Don't use a regex: super fast, really dumb. * Alternatively you may pass in a callable to inject your own validator, for example: * @@ -1431,6 +1360,7 @@ class PHPMailer * * IPv6 literals: 'first.last@[IPv6:a1::]' * Not all of these will necessarily work for sending! * + * @see http://squiloople.com/2009/12/20/email-address-validation/ * @copyright 2009-2010 Michael Rushton * Feel free to use and redistribute this code. But please keep this copyright notice. */ @@ -1457,24 +1387,6 @@ class PHPMailer '[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD', $address ); - case 'eai': - /* - * This is the pattern used in the HTML5 spec for validation of 'email' type - * form input elements (as above), modified to accept Unicode email addresses. - * This is also more lenient than Firefox' html5 spec, in order to make the regex faster. - * 'eai' is an acronym for Email Address Internationalization. - * This validator is selected automatically if you attempt to use recipient addresses - * that contain Unicode characters in the local part. - * - * @see https://html.spec.whatwg.org/#e-mail-state-(type=email) - * @see https://en.wikipedia.org/wiki/International_email - */ - return (bool) preg_match( - '/^[-\p{L}\p{N}\p{M}.!#$%&\'*+\/=?^_`{|}~]+@[\p{L}\p{N}\p{M}](?:[\p{L}\p{N}\p{M}-]{0,61}' . - '[\p{L}\p{N}\p{M}])?(?:\.[\p{L}\p{N}\p{M}]' . - '(?:[-\p{L}\p{N}\p{M}]{0,61}[\p{L}\p{N}\p{M}])?)*$/usD', - $address - ); case 'php': default: return filter_var($address, FILTER_VALIDATE_EMAIL) !== false; @@ -1524,12 +1436,7 @@ class PHPMailer $errorcode = 0; if (defined('INTL_IDNA_VARIANT_UTS46')) { //Use the current punycode standard (appeared in PHP 7.2) - $punycode = idn_to_ascii( - $domain, - \IDNA_DEFAULT | \IDNA_USE_STD3_RULES | \IDNA_CHECK_BIDI | - \IDNA_CHECK_CONTEXTJ | \IDNA_NONTRANSITIONAL_TO_ASCII, - \INTL_IDNA_VARIANT_UTS46 - ); + $punycode = idn_to_ascii($domain, $errorcode, \INTL_IDNA_VARIANT_UTS46); } elseif (defined('INTL_IDNA_VARIANT_2003')) { //Fall back to this old, deprecated/removed encoding $punycode = idn_to_ascii($domain, $errorcode, \INTL_IDNA_VARIANT_2003); @@ -1601,33 +1508,21 @@ class PHPMailer && ini_get('mail.add_x_header') === '1' && stripos(PHP_OS, 'WIN') === 0 ) { - trigger_error($this->lang('buggy_php'), E_USER_WARNING); + trigger_error( + 'Your version of PHP is affected by a bug that may result in corrupted messages.' . + ' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in' . + ' your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.', + E_USER_WARNING + ); } try { $this->error_count = 0; //Reset errors $this->mailHeader = ''; - //The code below tries to support full use of Unicode, - //while remaining compatible with legacy SMTP servers to - //the greatest degree possible: If the message uses - //Unicode in the local parts of any addresses, it is sent - //using SMTPUTF8. If not, it it sent using - //punycode-encoded domains and plain SMTP. - if ( - static::CHARSET_UTF8 === strtolower($this->CharSet) && - ($this->anyAddressHasUnicodeLocalPart($this->RecipientsQueue) || - $this->anyAddressHasUnicodeLocalPart(array_keys($this->all_recipients)) || - $this->anyAddressHasUnicodeLocalPart($this->ReplyToQueue) || - $this->addressHasUnicodeLocalPart($this->From)) - ) { - $this->UseSMTPUTF8 = true; - } //Dequeue recipient and Reply-To addresses with IDN foreach (array_merge($this->RecipientsQueue, $this->ReplyToQueue) as $params) { - if (!$this->UseSMTPUTF8) { - $params[1] = $this->punyencodeAddress($params[1]); - } + $params[1] = $this->punyencodeAddress($params[1]); call_user_func_array([$this, 'addAnAddress'], $params); } if (count($this->to) + count($this->cc) + count($this->bcc) < 1) { @@ -1636,21 +1531,17 @@ class PHPMailer //Validate From, Sender, and ConfirmReadingTo addresses foreach (['From', 'Sender', 'ConfirmReadingTo'] as $address_kind) { - if ($this->{$address_kind} === null) { - $this->{$address_kind} = ''; + $this->$address_kind = trim($this->$address_kind); + if (empty($this->$address_kind)) { continue; } - $this->{$address_kind} = trim($this->{$address_kind}); - if (empty($this->{$address_kind})) { - continue; - } - $this->{$address_kind} = $this->punyencodeAddress($this->{$address_kind}); - if (!static::validateAddress($this->{$address_kind})) { + $this->$address_kind = $this->punyencodeAddress($this->$address_kind); + if (!static::validateAddress($this->$address_kind)) { $error_message = sprintf( '%s (%s): %s', $this->lang('invalid_address'), $address_kind, - $this->{$address_kind} + $this->$address_kind ); $this->setError($error_message); $this->edebug($error_message); @@ -1750,17 +1641,17 @@ class PHPMailer default: $sendMethod = $this->Mailer . 'Send'; if (method_exists($this, $sendMethod)) { - return $this->{$sendMethod}($this->MIMEHeader, $this->MIMEBody); + return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody); } return $this->mailSend($this->MIMEHeader, $this->MIMEBody); } } catch (Exception $exc) { - $this->setError($exc->getMessage()); - $this->edebug($exc->getMessage()); - if ($this->Mailer === 'smtp' && $this->SMTPKeepAlive == true && $this->smtp->connected()) { + if ($this->Mailer === 'smtp' && $this->SMTPKeepAlive == true) { $this->smtp->reset(); } + $this->setError($exc->getMessage()); + $this->edebug($exc->getMessage()); if ($this->exceptions) { throw $exc; } @@ -1792,13 +1683,11 @@ class PHPMailer //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver //A space after `-f` is optional, but there is a long history of its presence //causing problems, so we don't use one - //Exim docs: https://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html - //Sendmail docs: https://www.sendmail.org/~ca/email/man/sendmail.html + //Exim docs: http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html + //Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html + //Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html //Example problem: https://www.drupal.org/node/1057954 - - //PHP 5.6 workaround - $sendmail_from_value = ini_get('sendmail_from'); - if (empty($this->Sender) && !empty($sendmail_from_value)) { + if (empty($this->Sender) && !empty(ini_get('sendmail_from'))) { //PHP config has a sender address we can use $this->Sender = ini_get('sendmail_from'); } @@ -1835,7 +1724,7 @@ class PHPMailer fwrite($mail, $header); fwrite($mail, $body); $result = pclose($mail); - $addrinfo = static::parseAddresses($toAddr, true, $this->CharSet); + $addrinfo = static::parseAddresses($toAddr); $this->doCallback( ($result === 0), [[$addrinfo['address'], $addrinfo['name']]], @@ -1890,13 +1779,7 @@ class PHPMailer */ protected static function isShellSafe($string) { - //It's not possible to use shell commands safely (which includes the mail() function) without escapeshellarg, - //but some hosting providers disable it, creating a security problem that we don't want to have to deal with, - //so we don't. - if (!function_exists('escapeshellarg') || !function_exists('escapeshellcmd')) { - return false; - } - + //Future-proof if ( escapeshellcmd($string) !== $string || !in_array(escapeshellarg($string), ["'$string'", "\"$string\""]) @@ -1931,7 +1814,7 @@ class PHPMailer */ protected static function isPermittedPath($path) { - //Matches scheme definition from https://www.rfc-editor.org/rfc/rfc3986#section-3.1 + //Matches scheme definition from https://tools.ietf.org/html/rfc3986#section-3.1 return !preg_match('#^[a-z][a-z\d+.-]*://#i', $path); } @@ -1947,7 +1830,7 @@ class PHPMailer if (!static::isPermittedPath($path)) { return false; } - $readable = is_file($path); + $readable = file_exists($path); //If not a UNC path (expected to start with \\), check read permission, see #2069 if (strpos($path, '\\\\') !== 0) { $readable = $readable && is_readable($path); @@ -1958,7 +1841,7 @@ class PHPMailer /** * Send mail using the PHP mail() function. * - * @see https://www.php.net/manual/en/book.mail.php + * @see http://www.php.net/manual/en/book.mail.php * * @param string $header The message headers * @param string $body The message body @@ -1975,27 +1858,18 @@ class PHPMailer foreach ($this->to as $toaddr) { $toArr[] = $this->addrFormat($toaddr); } - $to = trim(implode(', ', $toArr)); - - //If there are no To-addresses (e.g. when sending only to BCC-addresses) - //the following should be added to get a correct DKIM-signature. - //Compare with $this->preSend() - if ($to === '') { - $to = 'undisclosed-recipients:;'; - } + $to = implode(', ', $toArr); $params = null; //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver //A space after `-f` is optional, but there is a long history of its presence //causing problems, so we don't use one - //Exim docs: https://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html - //Sendmail docs: https://www.sendmail.org/~ca/email/man/sendmail.html + //Exim docs: http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html + //Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html + //Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html //Example problem: https://www.drupal.org/node/1057954 //CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. - - //PHP 5.6 workaround - $sendmail_from_value = ini_get('sendmail_from'); - if (empty($this->Sender) && !empty($sendmail_from_value)) { + if (empty($this->Sender) && !empty(ini_get('sendmail_from'))) { //PHP config has a sender address we can use $this->Sender = ini_get('sendmail_from'); } @@ -2010,7 +1884,7 @@ class PHPMailer if ($this->SingleTo && count($toArr) > 1) { foreach ($toArr as $toAddr) { $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params); - $addrinfo = static::parseAddresses($toAddr, true, $this->CharSet); + $addrinfo = static::parseAddresses($toAddr); $this->doCallback( $result, [[$addrinfo['address'], $addrinfo['name']]], @@ -2064,38 +1938,6 @@ class PHPMailer return $this->smtp; } - /** - * Provide SMTP XCLIENT attributes - * - * @param string $name Attribute name - * @param ?string $value Attribute value - * - * @return bool - */ - public function setSMTPXclientAttribute($name, $value) - { - if (!in_array($name, SMTP::$xclient_allowed_attributes)) { - return false; - } - if (isset($this->SMTPXClient[$name]) && $value === null) { - unset($this->SMTPXClient[$name]); - } elseif ($value !== null) { - $this->SMTPXClient[$name] = $value; - } - - return true; - } - - /** - * Get SMTP XCLIENT attributes - * - * @return array - */ - public function getSMTPXclientAttributes() - { - return $this->SMTPXClient; - } - /** * Send mail via SMTP. * Returns false if there is a bad MAIL FROM, RCPT, or DATA input. @@ -2118,20 +1960,12 @@ class PHPMailer if (!$this->smtpConnect($this->SMTPOptions)) { throw new Exception($this->lang('smtp_connect_failed'), self::STOP_CRITICAL); } - //If we have recipient addresses that need Unicode support, - //but the server doesn't support it, stop here - if ($this->UseSMTPUTF8 && !$this->smtp->getServerExt('SMTPUTF8')) { - throw new Exception($this->lang('no_smtputf8'), self::STOP_CRITICAL); - } //Sender already validated in preSend() if ('' === $this->Sender) { $smtp_from = $this->From; } else { $smtp_from = $this->Sender; } - if (count($this->SMTPXClient)) { - $this->smtp->xclient($this->SMTPXClient); - } if (!$this->smtp->mail($smtp_from)) { $this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError())); throw new Exception($this->ErrorInfo, self::STOP_CRITICAL); @@ -2224,10 +2058,6 @@ class PHPMailer $this->smtp->setDebugLevel($this->SMTPDebug); $this->smtp->setDebugOutput($this->Debugoutput); $this->smtp->setVerp($this->do_verp); - $this->smtp->setSMTPUTF8($this->UseSMTPUTF8); - if ($this->Host === null) { - $this->Host = 'localhost'; - } $hosts = explode(';', $this->Host); $lastexception = null; @@ -2295,23 +2125,15 @@ class PHPMailer $this->smtp->hello($hello); //Automatically enable TLS encryption if: //* it's not disabled - //* we are not connecting to localhost //* we have openssl extension //* we are not already using SSL //* the server offers STARTTLS - if ( - $this->SMTPAutoTLS && - $this->Host !== 'localhost' && - $sslext && - $secure !== 'ssl' && - $this->smtp->getServerExt('STARTTLS') - ) { + if ($this->SMTPAutoTLS && $sslext && 'ssl' !== $secure && $this->smtp->getServerExt('STARTTLS')) { $tls = true; } if ($tls) { if (!$this->smtp->startTLS()) { - $message = $this->getSmtpErrorMessage('connect_host'); - throw new Exception($message); + throw new Exception($this->lang('connect_host')); } //We must resend EHLO after TLS negotiation $this->smtp->hello($hello); @@ -2342,11 +2164,6 @@ class PHPMailer if ($this->exceptions && null !== $lastexception) { throw $lastexception; } - if ($this->exceptions) { - // no exception was thrown, likely $this->smtp->connect() failed - $message = $this->getSmtpErrorMessage('connect_host'); - throw new Exception($message); - } return false; } @@ -2364,15 +2181,14 @@ class PHPMailer /** * Set the language for error messages. + * Returns false if it cannot load the language file. * The default language is English. * * @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr") - * Optionally, the language code can be enhanced with a 4-character - * script annotation and/or a 2-character country annotation. - * @param string $lang_path Path to the language file directory, with trailing separator (slash) + * @param string $lang_path Path to the language file directory, with trailing separator (slash).D * Do not set this from user input! * - * @return bool Returns true if the requested language was loaded, false otherwise. + * @return bool */ public function setLanguage($langcode = 'en', $lang_path = '') { @@ -2395,78 +2211,44 @@ class PHPMailer //Define full set of translatable strings in English $PHPMAILER_LANG = [ 'authenticate' => 'SMTP Error: Could not authenticate.', - 'buggy_php' => 'Your version of PHP is affected by a bug that may result in corrupted messages.' . - ' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in' . - ' your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.', 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', 'data_not_accepted' => 'SMTP Error: data not accepted.', 'empty_message' => 'Message body empty', 'encoding' => 'Unknown encoding: ', 'execute' => 'Could not execute: ', - 'extension_missing' => 'Extension missing: ', 'file_access' => 'Could not access file: ', 'file_open' => 'File Error: Could not open file: ', 'from_failed' => 'The following From address failed: ', 'instantiate' => 'Could not instantiate mail function.', 'invalid_address' => 'Invalid address: ', - 'invalid_header' => 'Invalid header name or value', 'invalid_hostentry' => 'Invalid hostentry: ', 'invalid_host' => 'Invalid host: ', 'mailer_not_supported' => ' mailer is not supported.', 'provide_address' => 'You must provide at least one recipient email address.', 'recipients_failed' => 'SMTP Error: The following recipients failed: ', 'signing' => 'Signing Error: ', - 'smtp_code' => 'SMTP code: ', - 'smtp_code_ex' => 'Additional SMTP info: ', 'smtp_connect_failed' => 'SMTP connect() failed.', - 'smtp_detail' => 'Detail: ', 'smtp_error' => 'SMTP server error: ', 'variable_set' => 'Cannot set or reset variable: ', - 'no_smtputf8' => 'Server does not support SMTPUTF8 needed to send to Unicode addresses', + 'extension_missing' => 'Extension missing: ', ]; if (empty($lang_path)) { //Calculate an absolute path so it can work if CWD is not here $lang_path = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR; } - //Validate $langcode - $foundlang = true; - $langcode = strtolower($langcode); - if ( - !preg_match('/^(?P[a-z]{2})(?P \r\n"; - if ($async) { - $b .= "
\r\n\r\n
"; + $b .= " \r\n"; + $b .= "
\r\n\r\n
"; + } else { + $b .= " \r\n"; } /* @@ -93,7 +89,7 @@ function piwik_analytics(string &$b) $b .= ""; } @@ -108,7 +104,6 @@ function piwik_addon_admin (string &$o) '$siteid' => ['siteid', DI::l10n()->t('Site ID'), DI::config()->get('piwik','siteid' ), ''], '$optout' => ['optout', DI::l10n()->t('Show opt-out cookie link?'), DI::config()->get('piwik','optout' ), ''], '$async' => ['async', DI::l10n()->t('Asynchronous tracking'), DI::config()->get('piwik','async' ), ''], - '$shortendpoint' => ['shortendpoint', DI::l10n()->t("Shortcut path to the script ('/js/' instead of '/piwik.js')"), DI::config()->get('piwik','shortendpoint' ), ''], ]); } @@ -118,5 +113,4 @@ function piwik_addon_admin_post() DI::config()->set('piwik', 'siteid', trim($_POST['siteid'] ?? '')); DI::config()->set('piwik', 'optout', trim($_POST['optout'] ?? '')); DI::config()->set('piwik', 'async', trim($_POST['async'] ?? '')); - DI::config()->set('piwik', 'shortendpoint', trim($_POST['shortendpoint'] ?? '')); } diff --git a/piwik/templates/admin.tpl b/piwik/templates/admin.tpl index 7a9b5d71..2ab1869b 100644 --- a/piwik/templates/admin.tpl +++ b/piwik/templates/admin.tpl @@ -2,5 +2,4 @@ {{include file="field_input.tpl" field=$siteid}} {{include file="field_checkbox.tpl" field=$optout}} {{include file="field_checkbox.tpl" field=$async}} -{{include file="field_checkbox.tpl" field=$shortendpoint}}
diff --git a/planets/lang/bg/messages.po b/planets/lang/bg/messages.po deleted file mode 100644 index d4e30492..00000000 --- a/planets/lang/bg/messages.po +++ /dev/null @@ -1,27 +0,0 @@ -# ADDON planets -# Copyright (C) -# This file is distributed under the same license as the Friendica planets addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 11:19+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: planets.php:126 -msgid "Enable Planets Addon" -msgstr "" - -#: planets.php:131 -msgid "Planets Settings" -msgstr "" diff --git a/planets/lang/bg/strings.php b/planets/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/planets/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: planets.php:126 -msgid "Enable Planets Addon" -msgstr "" - -#: planets.php:131 -msgid "Planets Settings" -msgstr "" diff --git a/planets/lang/ca/strings.php b/planets/lang/ca/strings.php index d34874f6..625dcab9 100644 --- a/planets/lang/ca/strings.php +++ b/planets/lang/ca/strings.php @@ -1,7 +1,5 @@ -strings["Planets Settings"] = "Ajustos de Planet"; +$a->strings["Enable Planets Addon"] = "Activa Addon de Planet"; +$a->strings["Submit"] = "Enviar"; diff --git a/planets/lang/de/messages.po b/planets/lang/de/messages.po index c06493e2..507bbbf5 100644 --- a/planets/lang/de/messages.po +++ b/planets/lang/de/messages.po @@ -14,9 +14,9 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 11:19+0000\n" -"Last-Translator: Steffen K9, 2021\n" -"Language-Team: German (http://app.transifex.com/Friendica/friendica/language/de/)\n" +"PO-Revision-Date: 2021-12-22 16:22+0000\n" +"Last-Translator: Transifex Bot <>\n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/planets/lang/eo/messages.po b/planets/lang/eo/messages.po deleted file mode 100644 index 9b8c31a5..00000000 --- a/planets/lang/eo/messages.po +++ /dev/null @@ -1,27 +0,0 @@ -# ADDON planets -# Copyright (C) -# This file is distributed under the same license as the Friendica planets addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 11:19+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: planets.php:126 -msgid "Enable Planets Addon" -msgstr "" - -#: planets.php:131 -msgid "Planets Settings" -msgstr "" diff --git a/planets/lang/eo/strings.php b/planets/lang/eo/strings.php index 68e8a64c..c6b6d413 100644 --- a/planets/lang/eo/strings.php +++ b/planets/lang/eo/strings.php @@ -1,7 +1,5 @@ -strings["Planets Settings"] = "Agordo pri Planets"; +$a->strings["Enable Planets Addon"] = "Ŝalti la Planets kromprogamon"; +$a->strings["Submit"] = "Sendi"; diff --git a/planets/lang/et/messages.po b/planets/lang/et/messages.po deleted file mode 100644 index 062c6de0..00000000 --- a/planets/lang/et/messages.po +++ /dev/null @@ -1,28 +0,0 @@ -# ADDON planets -# Copyright (C) -# This file is distributed under the same license as the Friendica planets addon package. -# -# -# Translators: -# Rain Hawk, 2020 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 11:19+0000\n" -"Last-Translator: Rain Hawk, 2020\n" -"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: et\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: planets.php:126 -msgid "Enable Planets Addon" -msgstr "" - -#: planets.php:131 -msgid "Planets Settings" -msgstr "" diff --git a/planets/lang/et/strings.php b/planets/lang/et/strings.php deleted file mode 100644 index dfe78358..00000000 --- a/planets/lang/et/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gd\n" -"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" - -#: planets.php:126 -msgid "Enable Planets Addon" -msgstr "" - -#: planets.php:131 -msgid "Planets Settings" -msgstr "" diff --git a/planets/lang/gd/strings.php b/planets/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/planets/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/planets/lang/is/messages.po b/planets/lang/is/messages.po deleted file mode 100644 index 9a82e125..00000000 --- a/planets/lang/is/messages.po +++ /dev/null @@ -1,27 +0,0 @@ -# ADDON planets -# Copyright (C) -# This file is distributed under the same license as the Friendica planets addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 11:19+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: is\n" -"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" - -#: planets.php:126 -msgid "Enable Planets Addon" -msgstr "" - -#: planets.php:131 -msgid "Planets Settings" -msgstr "" diff --git a/planets/lang/is/strings.php b/planets/lang/is/strings.php index 975c341e..82f8b728 100644 --- a/planets/lang/is/strings.php +++ b/planets/lang/is/strings.php @@ -1,7 +1,5 @@ -strings["Planets Settings"] = ""; +$a->strings["Enable Planets Addon"] = ""; +$a->strings["Submit"] = "Senda inn"; diff --git a/planets/lang/it/messages.po b/planets/lang/it/messages.po index c15d7460..b3a93820 100644 --- a/planets/lang/it/messages.po +++ b/planets/lang/it/messages.po @@ -10,20 +10,28 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2014-06-23 11:19+0000\n" -"Last-Translator: Sylke Vicious , 2021\n" -"Language-Team: Italian (http://app.transifex.com/Friendica/friendica/language/it/)\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" +"PO-Revision-Date: 2021-02-16 12:56+0000\n" +"Last-Translator: Sylke Vicious \n" +"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: planets.php:126 +#: planets.php:131 planets.php:135 +msgid "Planets" +msgstr "Pianeti" + +#: planets.php:139 +msgid "Planets Settings" +msgstr "Impostazioni \"Pianeti\"" + +#: planets.php:141 msgid "Enable Planets Addon" msgstr "Abilita il componente aggiuntivo Pianeti" -#: planets.php:131 -msgid "Planets Settings" -msgstr "Impostazioni \"Pianeti\"" +#: planets.php:147 +msgid "Save Settings" +msgstr "Salva Impostazioni" diff --git a/planets/lang/it/strings.php b/planets/lang/it/strings.php index 040f65ad..7d5ac516 100644 --- a/planets/lang/it/strings.php +++ b/planets/lang/it/strings.php @@ -3,7 +3,9 @@ if(! function_exists("string_plural_select_it")) { function string_plural_select_it($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} -$a->strings['Enable Planets Addon'] = 'Abilita il componente aggiuntivo Pianeti'; +$a->strings['Planets'] = 'Pianeti'; $a->strings['Planets Settings'] = 'Impostazioni "Pianeti"'; +$a->strings['Enable Planets Addon'] = 'Abilita il componente aggiuntivo Pianeti'; +$a->strings['Save Settings'] = 'Salva Impostazioni'; diff --git a/planets/planets.php b/planets/planets.php index 8849010a..8a206fb5 100644 --- a/planets/planets.php +++ b/planets/planets.php @@ -7,7 +7,9 @@ * Author: Tony Baldwin */ +use Friendica\App; use Friendica\Core\Hook; +use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; @@ -27,7 +29,7 @@ function planets_install() Hook::register('addon_settings', 'addon/planets/planets.php', 'planets_settings'); Hook::register('addon_settings_post', 'addon/planets/planets.php', 'planets_settings_post'); - DI::logger()->notice("installed planets"); + Logger::notice("installed planets"); } /** @@ -38,7 +40,7 @@ function planets_install() */ function planets_post_hook(&$item) { - DI::logger()->notice('planets invoked'); + Logger::notice('planets invoked'); if (!DI::userSession()->getLocalUserId()) { /* non-zero if this is a logged in user of this system */ diff --git a/pnut/README.md b/pnut/README.md deleted file mode 100644 index 798174b8..00000000 --- a/pnut/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Pnut connector - -With this addon to friendica you can give your users the possibility to post their *public* messages to pnut.io. - -No setup is needed for the admins to make it work for their users, however it is possible for the admin to create a client, so that the users don't have to. - -To do so, go to https://pnut.io/dev and scroll down to "Create New Client". -Enter a name of your choice and enter your Friendica host name as the website. -Use https://(yourhost.name)/pnut/connect as a redirect url, replace "(yourhost.name)" with the host name of your system. -Limit the scope to "basic,files,follow,polls,presence,stream,update_profile,write_post" \ No newline at end of file diff --git a/pnut/lang/C/messages.po b/pnut/lang/C/messages.po deleted file mode 100644 index 89b065fd..00000000 --- a/pnut/lang/C/messages.po +++ /dev/null @@ -1,74 +0,0 @@ -# ADDON pnut -# Copyright (C) -# This file is distributed under the same license as the Friendica pnut addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-03 11:53+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: pnut.php:42 -msgid "Permission denied." -msgstr "" - -#: pnut.php:79 -msgid "You are now authenticated with pnut.io." -msgstr "" - -#: pnut.php:82 -msgid "Error fetching token. Please try again." -msgstr "" - -#: pnut.php:85 -msgid "return to the connector page" -msgstr "" - -#: pnut.php:103 -msgid "Save Settings" -msgstr "" - -#: pnut.php:104 pnut.php:150 -msgid "Client ID" -msgstr "" - -#: pnut.php:105 pnut.php:151 -msgid "Client Secret" -msgstr "" - -#: pnut.php:139 -msgid "Authenticate with pnut.io" -msgstr "" - -#: pnut.php:143 -msgid "Disconnect" -msgstr "" - -#: pnut.php:148 -msgid "Enable Pnut Post Addon" -msgstr "" - -#: pnut.php:149 -msgid "Post to Pnut by default" -msgstr "" - -#: pnut.php:152 -msgid "Access Token" -msgstr "" - -#: pnut.php:161 -msgid "Pnut Export" -msgstr "" - -#: pnut.php:203 -msgid "Post to Pnut" -msgstr "" diff --git a/pnut/lib/LICENSE b/pnut/lib/LICENSE deleted file mode 100644 index 579599a8..00000000 --- a/pnut/lib/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2013, Josh Dolitsky -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Josh Dolitsky nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL TRAVIS RICHARDSON BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/pnut/lib/phpnut.php b/pnut/lib/phpnut.php deleted file mode 100644 index 716945ed..00000000 --- a/pnut/lib/phpnut.php +++ /dev/null @@ -1,2512 +0,0 @@ -_clientId = $client_id_or_token; - $this->_clientSecret = $client_secret; - } else { - $this->_accessToken = $client_id_or_token; - } - - // if the digicert certificate exists in the same folder as this file, - // remember that fact for later - if (file_exists(__DIR__ . '/DigiCertHighAssuranceEVRootCA.pem')) { - $this->_sslCA = __DIR__ . '/DigiCertHighAssuranceEVRootCA.pem'; - } - } - - /** - * Set whether or not to strip Envelope Response (meta) information - * This option will be deprecated in the future. Is it to allow - * a stepped migration path between code expecting the old behavior - * and new behavior. When not stripped, you still can use the proper - * method to pull the meta information. Please start converting your code ASAP - */ - public function includeResponseEnvelope(): void - { - $this->_stripResponseEnvelope = false; - } - - /** - * Construct the proper Auth URL for the user to visit and either grant - * or not access to your app. Usually you would place this as a link for - * the user to client, or a redirect to send them to the auth URL. - * Also can be called after authentication for additional scopes - * @param string $callback_uri Where you want the user to be directed - * after authenticating with pnut.io. This must be one of the URIs - * allowed by your pnut.io application settings. - * @param array $scope An array of scopes (permissions) you wish to obtain - * from the user. If you don't specify anything, you'll only receive - * access to the user's basic profile (the default). - */ - public function getAuthUrl(?string $callback_uri=null, array $scope=null): string - { - if (empty($this->_clientId)) { - throw new phpnutException('You must specify your pnut client ID'); - } - - if (is_null($callback_uri)) { - if (defined('PNUT_REDIRECT_URI')) { - $callback_uri = PNUT_REDIRECT_URI; - } elseif (isset($_ENV['PNUT_REDIRECT_URI'])) { - $callback_uri = $_ENV['PNUT_REDIRECT_URI']; - } else { - throw new phpnutException('You must specify your pnut callback URI'); - } - } - - if (is_null($scope)) { - if (defined('PNUT_APP_SCOPE')) { - $scope = PNUT_APP_SCOPE; - } elseif (isset($_ENV['PNUT_APP_SCOPE'])) { - $scope = $_ENV['PNUT_APP_SCOPE']; - } else { - $scope = 'basic'; - } - } - - if (is_array($scope)) { - $scope = implode(',', $scope); - } - - // construct an authorization url based on our client id and other data - $data = [ - 'client_id'=>$this->_clientId, - 'response_type'=>'code', - 'redirect_uri'=>$callback_uri, - 'scope'=>$scope, - ]; - - $url = $this->_authUrl; - if ($this->_accessToken) { - $url .= 'authorize?'; - } else { - $url .= 'authenticate?'; - } - $url .= $this->buildQueryString($data); - - // return the constructed url - return $url; - } - - /** - * Call this after they return from the auth page, or anytime you need the - * token. For example, you could store it in a database and use - * setAccessToken() later on to return on behalf of the user. - */ - public function getAccessToken(string $callback_uri) - { - // if there's no access token set, and they're returning from - // the auth page with a code, use the code to get a token - if (!$this->_accessToken && isset($_GET['code']) && $_GET['code'] !== '') { - - if (empty($this->_clientId) || empty($this->_clientSecret)) { - throw new phpnutException('You must specify your Pnut client ID and client secret'); - } - - // construct the necessary elements to get a token - $data = [ - 'client_id'=>$this->_clientId, - 'client_secret'=>$this->_clientSecret, - 'grant_type'=>'authorization_code', - 'redirect_uri'=>$callback_uri, - 'code'=>$_GET['code'], - ]; - - // try and fetch the token with the above data - $res = $this->httpReq( - 'post', - "{$this->_baseUrl}oauth/access_token", - $data - ); - - // store it for later - $this->_accessToken = $res['access_token']; - $this->_username = $res['username']; - $this->_user_id = $res['user_id']; - } - - // return what we have (this may be a token, or it may be nothing) - return $this->_accessToken; - } - - /** - * Check the scope of current token to see if it has required scopes - * has to be done after a check - * - * @return int|array - */ - public function checkScopes(array $app_scopes) - { - if (count($this->_scopes) === 0) { - return -1; // _scope is empty - } - $missing = []; - foreach($app_scopes as $scope) { - if (!in_array($scope, $this->_scopes)) { - if ($scope === 'public_messages') { - // messages works for public_messages - if (in_array('messages', $this->_scopes)) { - // if we have messages in our scopes - continue; - } - } - $missing[] = $scope; - } - } - // identify the ones missing - if (count($missing) !== 0) { - // do something - return $missing; - } - return 0; // 0 missing - } - - /** - * Set the access token (eg: after retrieving it from offline storage) - * @param string $token A valid access token you're previously received - * from calling getAccessToken(). - */ - public function setAccessToken(?string $token=null): void - { - $this->_accessToken = $token; - } - - /** - * Deauthorize the current token (delete your authorization from the API) - * Generally this is useful for logging users out from a web app, so they - * don't get automatically logged back in the next time you redirect them - * to the authorization URL. - */ - public function deauthorizeToken() - { - return $this->httpReq('delete', "{$this->_baseUrl}token"); - } - - /** - * Retrieve an app access token from the app.net API. This allows you - * to access the API without going through the user access flow if you - * just want to (eg) consume global. App access tokens are required for - * some actions (like streaming global). DO NOT share the return value - * of this function with any user (or save it in a cookie, etc). This - * is considered secret info for your app only. - * @return string The app access token - */ - public function getAppAccessToken() - { - if (empty($this->_clientId) || empty($this->_clientSecret)) { - throw new phpnutException('You must specify your Pnut client ID and client secret'); - } - - // construct the necessary elements to get a token - $data = [ - 'client_id'=>$this->_clientId, - 'client_secret'=>$this->_clientSecret, - 'grant_type'=>'client_credentials', - ]; - // try and fetch the token with the above data - $res = $this->httpReq( - 'post', - "{$this->_baseUrl}oauth/access_token", - $data - ); - // store it for later - $this->_appAccessToken = $res['access_token']; - $this->_accessToken = $res['access_token']; - $this->_username = null; - $this->_user_id = null; - return $this->_accessToken; - } - - /** - * Returns the total number of requests you're allowed within the - * alloted time period. - * @see getRateLimitReset() - */ - public function getRateLimit() - { - return $this->_rateLimit; - } - - /** - * The number of requests you have remaining within the alloted time period - * @see getRateLimitReset() - */ - public function getRateLimitRemaining() - { - return $this->_rateLimitRemaining; - } - - /** - * The number of seconds remaining in the alloted time period. - * When this time is up you'll have getRateLimit() available again. - */ - public function getRateLimitReset() - { - return $this->_rateLimitReset; - } - - /** - * The scope the user has - */ - public function getScope() - { - return $this->_scope; - } - - /** - * Internal function, parses out important information pnut.io adds - * to the headers. - */ - protected function parseHeaders(string $response) - { - // take out the headers - // set internal variables - // return the body/content - $this->_rateLimit = null; - $this->_rateLimitRemaining = null; - $this->_rateLimitReset = null; - $this->_scope = null; - - $response = explode("\r\n\r\n", $response, 2); - $headers = $response[0]; - - if ($headers === 'HTTP/1.1 100 Continue') { - $response = explode("\r\n\r\n", $response[1], 2); - $headers = $response[0]; - } - - // this is not a good way to parse http headers - // it will not (for example) take into account multiline headers - // but what we're looking for is pretty basic, so we can ignore those shortcomings - $headers = explode("\r\n", $headers); - foreach ($headers as $header) { - $header = explode(': ', $header, 2); - if (count($header) < 2) { - continue; - } - list($k, $v) = $header; - switch ($k) { - case 'X-RateLimit-Remaining': - $this->_rateLimitRemaining = $v; - break; - case 'X-RateLimit-Limit': - $this->_rateLimit = $v; - break; - case 'X-RateLimit-Reset': - $this->_rateLimitReset = $v; - break; - case 'X-OAuth-Scopes': - $this->_scope = $v; - $this->_scopes = explode(',', $v); - break; - } - } - return $response[1] ?? null; - } - - /** - * Internal function. Used to turn things like TRUE into 1, and then - * calls http_build_query. - */ - protected function buildQueryString(array $array): string - { - foreach ($array as $k => &$v) { - if (is_array($v)) { - $v = implode(',', $v); - } elseif ($v === true) { - $v = '1'; - } - elseif ($v === false) { - $v = '0'; - } - unset($v); - } - return http_build_query($array); - } - - - /** - * Internal function to handle all - * HTTP requests (POST,PUT,GET,DELETE) - * - * @param string|array $params - */ - protected function httpReq(string $act, string $req, $params = [], string $contentType='application/x-www-form-urlencoded') - { - $ch = curl_init($req); - $headers = []; - if($act !== 'get') { - curl_setopt($ch, CURLOPT_POST, true); - // if they passed an array, build a list of parameters from it - if (is_array($params) && $act !== 'post-raw') { - $params = $this->buildQueryString($params); - } - curl_setopt($ch, CURLOPT_POSTFIELDS, $params); - $headers[] = "Content-Type: {$contentType}"; - } - if($act !== 'post' && $act !== 'post-raw') { - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, strtoupper($act)); - } - if($act === 'get' && isset($params['access_token'])) { - $headers[] = "Authorization: Bearer {$params['access_token']}"; - } elseif ($this->_accessToken) { - $headers[] = "Authorization: Bearer {$this->_accessToken}"; - } - curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLINFO_HEADER_OUT, true); - curl_setopt($ch, CURLOPT_HEADER, true); - if ($this->_sslCA) { - curl_setopt($ch, CURLOPT_CAINFO, $this->_sslCA); - } - $this->_last_response = curl_exec($ch); - $this->_last_request = curl_getinfo($ch, CURLINFO_HEADER_OUT); - $http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE); - curl_close($ch); - - if ($http_status === 0) { - throw new phpnutException("Unable to connect to {$req}"); - } - if ($this->_last_request === false) { - if (!curl_getinfo($ch, CURLINFO_SSL_VERIFYRESULT)) { - throw new phpnutException('SSL verification failed, connection terminated.'); - } - } - if ($this->_last_response) { - $response = $this->parseHeaders($this->_last_response); - if ($response) { - $response = json_decode($response, true); - - if (isset($response['meta'])) { - if (isset($response['meta']['max_id'])) { - $this->_maxid = $response['meta']['max_id']; - $this->_minid = $response['meta']['min_id']; - } - if (isset($response['meta']['more'])) { - $this->_more = $response['meta']['more']; - } - if (isset($response['meta']['marker'])) { - $this->_last_marker = $response['meta']['marker']; - } - } - - // look for errors - if (isset($response['error'])) { - if (is_array($response['error'])) { - throw new phpnutException( - $response['error']['message'], - $response['error']['code'] - ); - } else { - throw new phpnutException($response['error']); - } - } - - // look for response migration errors - elseif (isset($response['meta'], $response['meta']['error_message'])) { - throw new phpnutException( - $response['meta']['error_message'], - $response['meta']['code'] - ); - } - } - } - - if ($http_status < 200 || $http_status >= 300) { - throw new phpnutException("HTTP error {$http_status}"); - } - - // if we've received a migration response, handle it and return data only - elseif ($this->_stripResponseEnvelope && isset($response['meta'], $response['data'])) { - return $response['data']; - } - - // else non response migration response, just return it - elseif (isset($response)) { - return $response; - } - - else { - throw new phpnutException('No response'); - } - } - - - /** - * Get max_id from last meta response data envelope - */ - public function getResponseMaxID() - { - return $this->_maxid; - } - - /** - * Get min_id from last meta response data envelope - */ - public function getResponseMinID() - { - return $this->_minid; - } - - /** - * Get more from last meta response data envelope - */ - public function getResponseMore() - { - return $this->_more; - } - - /** - * Get marker from last meta response data envelope - */ - public function getResponseMarker() - { - return $this->_last_marker; - } - - public function getLastRequest() - { - return $this->_last_request; - } - - public function getLastResponse() - { - return $this->_last_response; - } - - /** - * Fetch API configuration object - * @return array - */ - public function getConfig() - { - return $this->httpReq('get', "{$this->_baseUrl}sys/config"); - } - - /** - * Fetch basic API statistics - * @return array - */ - public function getStats() - { - return $this->httpReq('get', "{$this->_baseUrl}sys/stats"); - } - - /** - * Process user content, message or post text. - * Mentions and hashtags will be parsed out of the - * text, as will bare URLs. To create a link in the text without using a - * bare URL, include the anchor text in the object text and include a link - * entity in the function call. - * @param string $text The text of the user/message/post - * @param array $data An associative array of optional post data. This - * will likely change as the API evolves, as of this writing allowed keys are: - * reply_to, and raw. "raw" may be a complex object represented - * by an associative array. - * @param array $params An associative array of optional data to be included - * in the URL (such as 'include_raw') - * @return array An associative array representing the post. - */ - public function processText(string $text, array $data=[], array $params=[]) - { - $data['text'] = $text; - $json = json_encode($data); - $qs = ''; - if (!empty($params)) { - $qs = '?' . $this->buildQueryString($params); - } - return $this->httpReq( - 'post', - $this->_baseUrl . 'text/process' . $qs, - $json, - 'application/json' - ); - } - - /** - * Create a new Post object. Mentions and hashtags will be parsed out of the - * post text, as will bare URLs. To create a link in a post without using a - * bare URL, include the anchor text in the post's text and include a link - * entity in the post creation call. - * @param string $text The text of the post - * @param array $data An associative array of optional post data. This - * will likely change as the API evolves, as of this writing allowed keys are: - * reply_to, is_nsfw, and raw. "raw" may be a complex object represented - * by an associative array. - * @param array $params An associative array of optional data to be included - * in the URL (such as 'include_raw') - * @return array An associative array representing the post. - */ - public function createPost(string $text, array $data=[], array $params=[]) - { - $data['text'] = $text; - $json = json_encode($data); - $qs = ''; - if (!empty($params)) { - $qs = '?' . $this->buildQueryString($params); - } - return $this->httpReq( - 'post', - $this->_baseUrl . 'posts' . $qs, - $json, - 'application/json' - ); - } - - /** - * Create a new Post object. Mentions and hashtags will be parsed out of the - * post text, as will bare URLs. To create a link in a post without using a - * bare URL, include the anchor text in the post's text and include a link - * entity in the post creation call. - * @param integer $post_id The ID of the post to revise - * @param string $text The new text of the post - * @param array $data An associative array of optional post data. This - * will likely change as the API evolves, as of this writing allowed keys are: - * is_nsfw. - * @param array $params An associative array of optional data to be included - * in the URL (such as 'include_raw') - * @return array An associative array representing the post. - */ - public function revisePost(int $post_id, string $text, array $data=[], array $params=[]) - { - $data['text'] = $text; - $json = json_encode($data); - $qs = ''; - if (!empty($params)) { - $qs = '?' . $this->buildQueryString($params); - } - return $this->httpReq( - 'put', - $this->_baseUrl . 'posts/' . urlencode($post_id) . $qs, - $json, - 'application/json' - ); - } - - /** - * Returns a specific Post. - * @param integer $post_id The ID of the post to retrieve - * @param array $params An associative array of optional general parameters. - * @return array An associative array representing the post - */ - public function getPost(int $post_id, array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'posts/' . urlencode($post_id) . '?' - . $this->buildQueryString($params) - ); - } - - /** - * Returns a list of Posts. - * @param array $post_ids The list of post IDs to retrieve - * @param array $params An associative array of optional general parameters. - * @return array An array of arrays representing the posts - */ - public function getMultiplePosts(array $post_ids, array $params=[]) - { - $params['ids'] = $post_ids; - - return $this->httpReq( - 'get', - $this->_baseUrl . 'posts?' . $this->buildQueryString($params) - ); - } - - /** - * Delete a Post. The current user must be the same user who created the Post. - * It returns the deleted Post on success. - * @param integer $post_id The ID of the post to delete - * @return array An associative array representing the post that was deleted - */ - public function deletePost(int $post_id) - { - return $this->httpReq( - 'delete', - $this->_baseUrl . 'posts/' . urlencode($post_id) - ); - } - - /** - * Retrieve the Posts that are 'in reply to' a specific Post. - * @param integer $post_id The ID of the post you want to retrieve replies for. - * @param array $params An associative array of optional general parameters. - * @return array An array of associative arrays, each representing a single post. - */ - public function getPostThread(int $post_id, array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'posts/' . urlencode($post_id) . '/thread?' - . $this->buildQueryString($params) - ); - } - - /** - * Retrieve revisions of a post. Currently only one can be created. - * @param integer $post_id The ID of the post you want to retrieve previous revisions of. - * @param array $params An associative array of optional general parameters. - * @return array An array of associative arrays, each representing a single post. - */ - public function getPostRevisions(int $post_id, array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'posts/' . urlencode($post_id) . '/revisions?' - . $this->buildQueryString($params) - ); - } - - /** - * Get the most recent Posts created by a specific User in reverse - * chronological order (most recent first). - * @param string|int $user_id $user_id Either the ID of the user you wish to retrieve posts by, - * or the string "me", which will retrieve posts for the user you're authenticated - * as. - * @param array $params An associative array of optional general parameters. - * @return array An array of associative arrays, each representing a single post. - */ - public function getUserPosts($user_id = 'me', array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'users/' . urlencode($user_id) . '/posts?' - . $this->buildQueryString($params) - ); - } - - /** - * Get the most recent Posts mentioning by a specific User in reverse - * chronological order (newest first). - * @param string|int $user_id Either the ID of the user who is being mentioned, or - * the string "me", which will retrieve posts for the user you're authenticated - * as. - * @param array $params An associative array of optional general parameters. - * @return array An array of associative arrays, each representing a single post. - */ - public function getUserMentions($user_id='me', array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'users/' . urlencode($user_id) . '/mentions?' - . $this->buildQueryString($params) - ); - } - - /** - * Get the currently authenticated user's recent messages - * @param array $params An associative array of optional general parameters. - * @return array An array of associative arrays, each representing a single post. - */ - public function getUserMessages(array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'users/me/messages?' - . $this->buildQueryString($params) - ); - } - - /** - * Return the 20 most recent posts from the current User and - * the Users they follow. - * @param array $params An associative array of optional general parameters. - * @return array An array of associative arrays, each representing a single post. - */ - public function getUserStream(array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'posts/streams/me?' - . $this->buildQueryString($params) - ); - } - - /** - * Retrieve a list of all public Posts on pnut.io, often referred to as the - * global stream. - * @param array $params An associative array of optional general parameters. - * @return array An array of associative arrays, each representing a single post. - */ - public function getPublicPosts(array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'posts/streams/global?' - . $this->buildQueryString($params) - ); - } - - /** - * Retrieve a list of "explore" streams - * @return array An array of associative arrays, each representing a single explore stream. - */ - public function getPostExploreStreams() - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'posts/streams/explore' - ); - } - - /** - * Retrieve a list of posts from an "explore" stream on pnut.io. - * @param string $slug [] - * @param array $params An associative array of optional general parameters. - * @return array An array of associative arrays, each representing a single post. - */ - public function getPostExploreStream(string $slug, array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'posts/streams/explore/' . urlencode($slug) . '?' - . $this->buildQueryString($params) - ); - } - - /** - * Bookmark a post - * @param integer $post_id The post ID to bookmark - */ - public function bookmarkPost(int $post_id) - { - return $this->httpReq( - 'put', - $this->_baseUrl . 'posts/' . urlencode($post_id) . '/bookmark' - ); - } - - /** - * Unbookmark a post - * @param integer $post_id The post ID to unbookmark - */ - public function unbookmarkPost(int $post_id) - { - return $this->httpReq( - 'delete', - $this->_baseUrl . 'posts/' . urlencode($post_id) . '/bookmark' - ); - } - - /** - * List the posts bookmarked by the current user - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: count, before_id, since_id, include_muted, include_deleted, - * and include_post_raw. - * See https://github.com/phpnut/api-spec/blob/master/resources/posts.md#general-parameters - * @param string|int $user_id - * @return array An array of associative arrays, each representing a single - * user who has bookmarked a post - */ - public function getBookmarked($user_id='me', array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'users/' . urlencode($user_id) . '/bookmarks?' - . $this->buildQueryString($params) - ); - } - - /** - * List the interactions with a post (bookmark, repost, reply) - * @param integer $post_id the post ID to get interactions from - * @param array $params optional parameters like filters or excludes - * @return array An array of associative arrays, each representing one post interaction. - */ - public function getPostInteractions(int $post_id, array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'posts/' . urlencode($post_id) . '/interactions?' - . $this->buildQueryString($params) - ); - } - - /** - * List the bookmarks of a post - * @param integer $post_id the post ID to get stars from - * @return array An array of associative arrays, each representing one bookmark action. - */ - public function getPostBookmarks(int $post_id) - { - return $this->getPostInteractions($post_id, ['filters'=>['bookmark']]); - } - - /** - * Returns an array of User objects of users who reposted the specified post. - * @param integer $post_id the post ID to - * @return array An array of associative arrays, each representing a single - * user who reposted $post_id - */ - public function getPostReposts(int $post_id) - { - return $this->getPostInteractions($post_id, ['filters'=>['repost']]); - } - - /** - * Repost an existing Post object. - * @param integer $post_id The id of the post - * @return mixed the reposted post - */ - public function repost(int $post_id) - { - return $this->httpReq( - 'put', - $this->_baseUrl . 'posts/' . urlencode($post_id) . '/repost' - ); - } - - /** - * Delete a post that the user has reposted. - * @param integer $post_id The id of the post - * @return mixed the un-reposted post - */ - public function deleteRepost(int $post_id) - { - return $this->httpReq( - 'delete', - $this->_baseUrl . 'posts/' . urlencode($post_id) . '/repost' - ); - } - - /** - * Return Posts matching a specific #hashtag. - * @param string $hashtag The hashtag you're looking for. - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: count, before_id, since_id, include_muted, include_deleted, - * include_directed_posts, and include_raw. - * @return array An array of associative arrays, each representing a single post. - */ - public function searchHashtags(string $hashtag, array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'posts/tags/' . urlencode($hashtag) . '?' - . $this->buildQueryString($params) - ); - } - - /** - * List the posts who match a specific search term - * @param array $params a list of filter, search query, and general Post parameters - * see: https://docs.pnut.io/resources/posts/search - * @param string $query The search query. Supports - * normal search terms. Searches post text. - * @return string|array|false An array of associative arrays, each representing one post. - * or false on error - */ - public function searchPosts(array $params=[], string $query='', string $order='default') - { - if (!is_array($params)) { - return false; - } - if (!empty($query)) { - $params['q'] = $query; - } - if ($order === 'default') { - if (!empty($query)) { - $params['order'] = 'relevance'; - } else { - $params['order'] = 'id'; - } - } - return $this->httpReq( - 'get', - $this->_baseUrl . 'posts/search?' . $this->buildQueryString($params) - ); - } - - /** - * Return the 20 most recent posts for a stream using a valid Token - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: count, before_id, since_id, include_muted, include_deleted, - * and include_post_raw. - * @return array An array of associative arrays, each representing a single post. - */ - public function getUserPersonalStream(array $params=[]) - { - if ($params['access_token']) { - return $this->httpReq( - 'get', - $this->_baseUrl . 'posts/streams/me?' - . $this->buildQueryString($params), - $params - ); - } else { - return $this->httpReq( - 'get', - $this->_baseUrl . 'posts/streams/me?' - . $this->buildQueryString($params) - ); - } - } - - /** - * Return the 20 most recent Posts from the current User's personalized stream - * and mentions stream merged into one stream. - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: count, before_id, since_id, include_muted, include_deleted, - * include_directed_posts, and include_raw. - * @return array An array of associative arrays, each representing a single post. - */ - public function getUserUnifiedStream(array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'posts/streams/unified?' - . $this->buildQueryString($params) - ); - } - - /** - * List User interactions - */ - public function getMyActions(array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'users/me/interactions?' - . $this->buildQueryString($params) - ); - } - - /** - * Returns a specific user object. - * @param string|int $user_id The ID of the user you want to retrieve, or the string "@-username", or the string - * "me" to retrieve data for the users you're currently authenticated as. - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: include_raw|include_user_raw. - * @return array An associative array representing the user data. - */ - public function getUser($user_id='me', array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'users/' . urlencode($user_id) . '?' - . $this->buildQueryString($params) - ); - } - - /** - * Returns multiple users request by an array of user ids - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: include_raw|include_user_raw. - * @return array An associative array representing the users data. - */ - public function getUsers(array $user_arr, array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'users?ids=' . implode(',', $user_arr) - . '&' . $this->buildQueryString($params) - ); - } - - /** - * Add the specified user ID to the list of users followed. - * Returns the User object of the user being followed. - * @param string|int $user_id The user ID of the user to follow. - * @return array An associative array representing the user you just followed. - */ - public function followUser($user_id) - { - return $this->httpReq( - 'put', - $this->_baseUrl . 'users/' . urlencode($user_id) . '/follow' - ); - } - - /** - * Removes the specified user ID to the list of users followed. - * Returns the User object of the user being unfollowed. - * @param string|int $user_id The user ID of the user to unfollow. - * @return array An associative array representing the user you just unfollowed. - */ - public function unfollowUser($user_id) - { - return $this->httpReq( - 'delete', - $this->_baseUrl . 'users/' . urlencode($user_id) . '/follow' - ); - } - - /** - * Returns an array of User objects the specified user is following. - * @param string|int $user_id Either the ID of the user being followed, or - * the string "me", which will retrieve posts for the user you're authenticated - * as. - * @return array An array of associative arrays, each representing a single - * user following $user_id - */ - public function getFollowing($user_id='me', array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'users/' . urlencode($user_id) . '/following?' - . $this->buildQueryString($params) - ); - } - - /** - * Returns an array of User ids the specified user is following. - * @param string|int $user_id Either the ID of the user being followed, or - * the string "me", which will retrieve posts for the user you're authenticated - * as. - * @return array user ids the specified user is following. - */ - public function getFollowingIDs($user_id='me') - { - return $this->httpReq( - 'get', - "{$this->_baseUrl}users/{$user_id}/following?include_user=0" - ); - } - - /** - * Returns an array of User objects for users following the specified user. - * @param string|int $user_id Either the ID of the user being followed, or - * the string "me", which will retrieve posts for the user you're authenticated - * as. - * @return array An array of associative arrays, each representing a single - * user following $user_id - */ - public function getFollowers($user_id='me', array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'users/' . urlencode($user_id) . '/followers?' - . $this->buildQueryString($params) - ); - } - - /** - * Returns an array of User ids for users following the specified user. - * @param string|int $user_id Either the ID of the user being followed, or - * the string "me", which will retrieve posts for the user you're authenticated - * as. - * @return array user ids for users following the specified user - */ - public function getFollowersIDs($user_id='me') - { - return $this->httpReq( - 'get', - "{$this->_baseUrl}users/{$user_id}/followers?include_user=0" - ); - } - - /** - * Retrieve a user's user ID by specifying their username. - * @param string $username The username of the user you want the ID of, without - * an @ symbol at the beginning. - * @return integer The user's user ID - */ - public function getIdByUsername(string $username) - { - return $this->httpReq( - 'get', - "{$this->_baseUrl}users/@{$username}?include_user=0" - ); - } - - /** - * Mute a user - * @param string|int $user_id The user ID to mute - */ - public function muteUser($user_id) - { - return $this->httpReq( - 'put', - $this->_baseUrl . 'users/' . urlencode($user_id) . '/mute' - ); - } - - /** - * Unmute a user - * @param string|int $user_id The user ID to unmute - */ - public function unmuteUser($user_id) - { - return $this->httpReq( - 'delete', - $this->_baseUrl . 'users/' . urlencode($user_id) . '/mute' - ); - } - - /** - * List the users muted by the current user - * @return array An array of associative arrays, each representing one muted user. - */ - public function getMuted() - { - return $this->httpReq( - 'get', - "{$this->_baseUrl}users/me/muted" - ); - } - - /** - * Get a user object by username - * @param string $name the @name to get - * @return array representing one user - */ - public function getUserByName(string $name) - { - return $this->httpReq( - 'get', - "{$this->_baseUrl}users/@{$name}" - ); - } - - /** - * List the users who match a specific search term - * @param string $query The search query. Supports @username or #tag searches as - * well as normal search terms. Searches username, display name, bio information. - * Does not search posts. - * @return array|false An array of associative arrays, each representing one user. - */ - public function searchUsers(array $params=[], string $query='') - { - if (!is_array($params)) { - return false; - } - if ($query === '') { - return false; - } - $params['q'] = $query; - return $this->httpReq( - 'get', - $this->_baseUrl . 'users/search?q=' . $this->buildQueryString($params) - ); - } - - /** - * Update Profile Data via JSON - * @data array containing user descriptors - */ - public function updateUserData(array $data=[], array $params=[]) - { - $json = json_encode($data); - return $this->httpReq( - 'put', - $this->_baseUrl . 'users/me?' - . $this->buildQueryString($params), - $json, - 'application/json' - ); - } - - /** - * Update a user image - * @image path reference to image - * @which avatar|cover - */ - protected function updateUserImage(string $image, string $which='avatar') - { - $mimeType = ''; - - $test = @getimagesize($image); - if ($test && array_key_exists('mime', $test)) { - $mimeType = $test['mime']; - } - $data = [ - $which => new CURLFile($image, $mimeType) - ]; - return $this->httpReq( - 'post-raw', - "{$this->_baseUrl}users/me/{$which}", - $data, - 'multipart/form-data' - ); - } - - public function updateUserAvatar($avatar) - { - return $this->updateUserImage('avatar', $avatar); - } - - public function updateUserCover($cover) - { - return $this->updateUserImage('cover', $cover); - } - - /** - * Returns a Client object - * @param string $client_id - * @return array An array representing the client - */ - public function getClient(string $client_id, array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'clients/' . urlencode($client_id) . '?' - . $this->buildQueryString($params) - ); - } - - /** - * Returns a list of truncated client details made by a user - * @param string $user_id - * @return array A list of arrays representing clients - */ - public function getUserClients(string $user_id) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'users/' . urlencode($user_id) . '/clients' - ); - } - - /** - * update stream marker - */ - public function updateStreamMarker(array $data=[]) - { - $json = json_encode($data); - return $this->httpReq( - 'post', - "{$this->_baseUrl}markers", - $json, - 'application/json' - ); - } - - /** - * get a page of current user subscribed channels - */ - public function getMyChannelSubscriptions(array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'users/me/channels/subscribed?' . $this->buildQueryString($params) - ); - } - - /** - * get user channels - */ - public function getMyChannels(array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'users/me/channels?' . $this->buildQueryString($params) - ); - } - - /** - * create a channel - * note: you cannot create a channel with type=io.pnut.core.pm (see createMessage) - */ - public function createChannel(array $data=[]) - { - $json = json_encode($data); - return $this->httpReq( - 'post', - "{$this->_baseUrl}channels", - $json, - 'application/json' - ); - } - - /** - * get channelid info - */ - public function getChannel(int $channelid, array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'channels/' . $channelid . '?' - . $this->buildQueryString($params) - ); - } - - /** - * get an existing private message channel between multiple users - * @param string|array $users Can be a comma- or space-separated string, or an array. - * Usernames with @-symbol, or user ids. - */ - public function getExistingPM($users, array $params=[]) - { - if (is_string($users)) { - $users = explode(',', str_replace(' ', ',', $users)); - } - foreach($users as $key=>$user) { - if (!is_numeric($user) && substr($user, 0, 1) !== '@') { - $users[$key] = "@{$user}"; - } - } - $params['ids'] = $users; - return $this->httpReq( - 'get', - $this->_baseUrl . 'users/me/channels/existing_pm?' - . $this->buildQueryString($params) - ); - } - - /** - * get multiple channels' info by an array of channelids - */ - public function getChannels(array $channels, array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'channels?ids=' . implode(',', $channels) . '&' - . $this->buildQueryString($params) - ); - } - - /** - * update channelid - */ - public function updateChannel(int $channelid, array $data=[]) - { - $json = json_encode($data); - return $this->httpReq( - 'put', - "{$this->_baseUrl}channels/{$channelid}", - $json, - 'application/json' - ); - } - - /** - * subscribe from channelid - */ - public function channelSubscribe(int $channelid) - { - return $this->httpReq( - 'put', - $this->_baseUrl.'channels/'.$channelid.'/subscribe' - ); - } - - /** - * unsubscribe from channelid - */ - public function channelUnsubscribe(int $channelid) - { - return $this->httpReq( - 'delete', - $this->_baseUrl.'channels/'.$channelid.'/subscribe' - ); - } - - /** - * mute channelid - */ - public function channelMute(int $channelid) - { - return $this->httpReq( - 'put', - $this->_baseUrl.'channels/'.$channelid.'/mute' - ); - } - - /** - * unmute channelid - */ - public function channelUnmute(int $channelid) - { - return $this->httpReq( - 'delete', - $this->_baseUrl.'channels/'.$channelid.'/mute' - ); - } - - /** - * get all user objects subscribed to channelid - */ - public function getChannelSubscriptions(int $channelid, array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl.'channels/'.$channelid.'/subscribers?' - . $this->buildQueryString($params) - ); - } - - /** - * get all user IDs subscribed to channelid - */ - public function getChannelSubscriptionsById(int $channelid) - { - return $this->httpReq( - 'get', - "{$this->_baseUrl}channels/{$channelid}/subscribers?include_user=0" - ); - } - - /** - * Retrieve a list of "explore" streams - * @return array An array of associative arrays, each representing a single explore stream. - */ - public function getChannelExploreStreams() - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'channels/streams/explore' - ); - } - - /** - * Retrieve a list of channels from an "explore" stream on pnut.io. - * @param string $slug [] - * @param array $params An associative array of optional general parameters. - * @return array An array of associative arrays, each representing a single channel. - */ - public function getChannelExploreStream(string $slug, array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl . 'channels/streams/explore/' . urlencode($slug) . '?' - . $this->buildQueryString($params) - ); - } - - /** - * mark channel inactive - */ - public function deleteChannel(int $channelid) - { - return $this->httpReq( - 'delete', - $this->_baseUrl.'channels/'.$channelid - ); - } - - /** - * List the channels that match a specific search term - * @param array $params a list of filter, search query, and general Channel parameters - * see: https://docs.pnut.io/resources/channels/search - * @param string $query The search query. Supports - * normal search terms. Searches common channel raw. - * @return array An array of associative arrays, each representing one channel. - * or false on error - */ - public function searchChannels(array $params=[], string $query='', string $order='default') - { - if (!empty($query)) { - $params['q'] = $query; - } - if ($order === 'default') { - if (!empty($query)) { - $params['order'] = 'id'; - } else { - $params['order'] = 'activity'; - } - } - return $this->httpReq( - 'get', - $this->_baseUrl . 'channels/search?' . $this->buildQueryString($params) - ); - } - - - /** - * get a page of messages in channelid - */ - public function getMessages(int $channelid, array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl.'channels/'.$channelid.'/messages?' - . $this->buildQueryString($params) - ); - } - - /** - * get a page of messages in channelid in a thread - */ - public function getMessageThread(int $channelid, int $messageid, array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl.'channels/'.$channelid.'/messages/'.$messageid.'/thread?' - . $this->buildQueryString($params) - ); - } - - /** - * get a page of sticky messages in channelid - */ - public function getStickyMessages(int $channelid, array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl.'channels/'.$channelid.'/sticky_messages?' - . $this->buildQueryString($params) - ); - } - - /** - * sticky messsage - */ - public function stickyMessage(int $channelid, int $messageid) - { - return $this->httpReq( - 'put', - $this->_baseUrl.'channels/'.$channelid.'/messages/'.$messageid.'/sticky' - ); - } - - /** - * unsticky messsage - */ - public function unstickyMessage(int $channelid, int $messageid) - { - return $this->httpReq( - 'delete', - $this->_baseUrl.'channels/'.$channelid.'/messages/'.$messageid.'/sticky' - ); - } - - /** - * create message - * @param string|int $channelid numeric or "pm" for auto-channel (type=io.pnut.core.pm) - * @param array $data array('text'=>'YOUR_MESSAGE') If a type=io.pnut.core.pm, then "destinations" key can be set to address as an array of people to send this PM too - * @param array $params query parameters - */ - public function createMessage($channelid, array $data, array $params=[]) - { - if (isset($data['destinations'])) { - if (is_string($data['destinations'])) { - $data['destinations'] = explode(',', str_replace(' ', ',', $data['destinations'])); - } - foreach($data['destinations'] as $key=>$user) { - if (!is_numeric($user) && substr($user, 0,1 ) !== '@') { - $data['destinations'][$key] = "@{$user}"; - } - } - } - $json = json_encode($data); - return $this->httpReq( - 'post', - $this->_baseUrl.'channels/'.$channelid.'/messages?' - . $this->buildQueryString($params), - $json, - 'application/json' - ); - } - - /** - * get message - */ - public function getMessage(int $channelid, int $messageid, array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl.'channels/'.$channelid.'/messages/'.$messageid.'?' - . $this->buildQueryString($params) - ); - } - - /** - * Returns a list of Messages. - * @param array $message_ids The list of message IDs to retrieve - * @param array $params An associative array of optional general parameters. - * @return array An array of arrays representing the messages - */ - public function getMultipleMessages(array $message_ids, array $params=[]) - { - $params['ids'] = $message_ids; - - return $this->httpReq( - 'get', - $this->_baseUrl . 'channels/messages?' . $this->buildQueryString($params) - ); - } - - /** - * delete messsage - */ - public function deleteMessage(int $channelid, int $messageid) - { - return $this->httpReq( - 'delete', - $this->_baseUrl.'channels/'.$channelid.'/messages/'.$messageid - ); - } - - /** - * List the messages that match a specific search term - * @param array $params a list of filter, search query, and general Message parameters - * see: https://docs.pnut.io/resources/messages/search - * @param string $query The search query. Supports - * normal search terms. Searches common channel raw. - * @return string|array|false An array of associative arrays, each representing one channel. - * or false on error - */ - public function searchMessages(array $params=[], string $query='', string $order='default') - { - if (!is_array($params)) { - return false; - } - if (!empty($query)) { - $params['q'] = $query; - } - if ($order === 'default') { - if (!empty($query)) { - $params['order'] = 'id'; - } else { - $params['order'] = 'relevance'; - } - } - return $this->httpReq( - 'get', - $this->_baseUrl . 'channels/messages/search?' - . $this->buildQueryString($params) - ); - } - - /** - * Upload a file to a user's file store - * @param string $file A string containing the path of the file to upload. - * @param array $data Additional data about the file you're uploading. At the - * moment accepted keys are: mime-type, kind, type, name, public and raw. - * - If you don't specify mime-type, phpnut will attempt to guess the mime type - * based on the file, however this isn't always reliable. - * - If you don't specify kind phpnut will attempt to determine if the file is - * an image or not. - * - If you don't specify name, phpnut will use the filename of the first - * parameter. - * - If you don't specify is_public, your file will be uploaded as a private file. - * - Type is REQUIRED. - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: include_raw|include_file_raw. - * @return array An associative array representing the file - */ - public function createFile($file, array $data, array $params=[]) - { - if (!$file) { - throw new phpnutException('You must specify a path to a file'); - } - if (!file_exists($file)) { - throw new phpnutException('File path specified does not exist'); - } - if (!is_readable($file)) { - throw new phpnutException('File path specified is not readable'); - } - if (!array_key_exists('type', $data) || !$data['type']) { - throw new phpnutException('Type is required when creating a file'); - } - if (!array_key_exists('name', $data)) { - $data['name'] = basename($file); - } - if (array_key_exists('mime-type', $data)) { - $mimeType = $data['mime-type']; - unset($data['mime-type']); - } else { - $mimeType = null; - } - if (!array_key_exists('kind', $data)) { - $test = @getimagesize($file); - if ($test && array_key_exists('mime', $test)) { - $data['kind'] = 'image'; - if (!$mimeType) { - $mimeType = $test['mime']; - } - } - else { - $data['kind'] = 'other'; - } - } - if (!$mimeType) { - $finfo = finfo_open(FILEINFO_MIME_TYPE); - $mimeType = finfo_file($finfo, $file); - finfo_close($finfo); - } - if (!$mimeType) { - throw new phpnutException('Unable to determine mime type of file, try specifying it explicitly'); - } - $data['content'] = new \CurlFile($file, $mimeType); - return $this->httpReq( - 'post-raw', - "{$this->_baseUrl}files", - $data, - 'multipart/form-data' - ); - } - - public function createFilePlaceholder($file, array $params=[]) - { - $name = basename($file); - $data = [ - 'raw' => $params['raw'], - 'kind' => $params['kind'], - 'name' => $name, - 'type' => $params['metadata'] - ]; - $json = json_encode($data); - return $this->httpReq( - 'post', - $this->_baseUrl.'files', - $json, - 'application/json' - ); - } - - public function updateFileContent(int $fileid, string $file) - { - $data = file_get_contents($file); - $finfo = finfo_open(FILEINFO_MIME_TYPE); - $mime = finfo_file($finfo, $file); - finfo_close($finfo); - return $this->httpReq( - 'put', - $this->_baseUrl.'files/'.$fileid.'/content', - $data, - $mime - ); - } - - /** - * Allows for file rename and annotation changes. - * @param integer $file_id The ID of the file to update - * @param array $params An associative array of file parameters. - * @return array An associative array representing the updated file - */ - public function updateFile(int $file_id, array $params=[]) - { - $data = [ - 'raw' => $params['raw'], - 'name' => $params['name'], - ]; - $json = json_encode($data); - return $this->httpReq( - 'put', - $this->_baseUrl.'files/'.urlencode($file_id), - $json, - 'application/json' - ); - } - - /** - * Returns a specific File. - * @param integer $file_id The ID of the file to retrieve - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: include_raw|include_file_raw. - * @return array An associative array representing the file - */ - public function getFile(int $file_id, array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl.'files/'.urlencode($file_id).'?' - . $this->buildQueryString($params) - ); - } - - public function getFileContent(int $file_id, array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl.'files/'.urlencode($file_id).'/content?' - . $this->buildQueryString($params) - ); - } - - /** $file_key : derived_file_key */ - public function getDerivedFileContent(int $file_id, string $file_key, array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl.'files/'.urlencode($file_id).'/content/'.urlencode($file_key).'?'.$this->buildQueryString($params) - ); - } - - /** - * Returns file objects. - * @param array $file_ids The IDs of the files to retrieve - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: include_raw|include_file_raw. - * @return array An associative array representing the file data. - */ - public function getFiles(array $file_ids, array $params=[]) - { - $ids = ''; - foreach($file_ids as $id) { - $ids .= $id . ','; - } - $params['ids'] = substr($ids, 0, -1); - return $this->httpReq( - 'get', - $this->_baseUrl.'files?'.$this->buildQueryString($params) - ); - } - - /** - * Returns a user's file objects. - * @param array $params An associative array of optional general parameters. - * This will likely change as the API evolves, as of this writing allowed keys - * are: include_raw|include_file_raw|include_user_raw. - * @return array An associative array representing the file data. - */ - public function getUserFiles(array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl.'users/me/files?'.$this->buildQueryString($params) - ); - } - - /** - * Delete a File. The current user must be the same user who created the File. - * It returns the deleted File on success. - * @param integer $file_id The ID of the file to delete - * @return array An associative array representing the file that was deleted - */ - public function deleteFile(int $file_id) - { - return $this->httpReq( - 'delete', - $this->_baseUrl.'files/'.urlencode($file_id) - ); - } - - /** - * Create a poll - * @param array $data An associative array of the required parameters. - * @param array $params An associative array of optional general parameters. - * Allowed keys: include_raw,include_poll_raw, ... - * @return array An associative array representing the poll - */ - public function createPoll(array $data, array $params=[]) - { - $json = json_encode($data); - return $this->httpReq( - 'post', - $this->_baseUrl.'polls?'.$this->buildQueryString($params), - $json, - 'application/json' - ); - } - - /** - * Responds to a poll. - * @param integer $poll_id The ID of the poll to respond to - * @param array $positions list of positions for the poll response - * @param array $params An associative array of optional general parameters. - */ - public function respondToPoll(int $poll_id, array $positions, array $params=[]) - { - $json = json_encode(['positions' => $positions]); - return $this->httpReq( - 'put', - $this->_baseUrl.'polls/'.urlencode($poll_id).'/response?'.$this->buildQueryString($params), - $json, - 'application/json' - ); - } - - /** - * Returns a specific Poll. - * @param integer $poll_id The ID of the poll to retrieve - * @param array $params An associative array of optional general parameters. - * @return array An associative array representing the poll - */ - public function getPoll(int $poll_id, array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl.'polls/'.urlencode($poll_id).'?'.$this->buildQueryString($params) - ); - } - - /** - * Returns a list of Polls. - * @param array $poll_ids The list of poll IDs to retrieve - * @param array $params An associative array of optional general parameters. - * @return array An array of arrays representing the polls - */ - public function getMultiplePolls(array $poll_ids, array $params=[]) - { - $params['ids'] = $poll_ids; - - return $this->httpReq( - 'get', - $this->_baseUrl . 'polls?' . $this->buildQueryString($params) - ); - } - - /** - * Returns a user's poll objects. - * @param array $params An associative array of optional general parameters. - * @return array An associative array representing the poll data. - */ - public function getUserPolls(array $params=[]) - { - return $this->httpReq( - 'get', - $this->_baseUrl.'users/me/polls?'.$this->buildQueryString($params) - ); - } - - /** - * Delete a Poll. The current user must be the same user who created the Poll. - * @param integer $poll_id The ID of the poll to delete - * @param array $params An associative array of optional general parameters. - * @return array An associative array representing the poll that was deleted - */ - public function deletePoll(int $poll_id, array $params=[]) - { - return $this->httpReq( - 'delete', - $this->_baseUrl.'polls/'.urlencode($poll_id).'?'.$this->buildQueryString($params) - ); - } - - /** - * List the polls that match a specific search term - * @param array $params a list of filter, search query, and general Poll parameters - * see: https://docs.pnut.io/resources/channels/search - * @return array An array of associative arrays, each representing one poll. - * or false on error - */ - public function searchPolls(array $params=[], string $order='id') - { - $params['order'] = $order; - - return $this->httpReq( - 'get', - $this->_baseUrl . 'polls/search?' . $this->buildQueryString($params) - ); - } - - - /** - * Get Application Information - */ - public function getAppTokenInfo() - { - // requires appAccessToken - if (!$this->_appAccessToken) { - $this->getAppAccessToken(); - } - // ensure request is made with our appAccessToken - $params['access_token'] = $this->_appAccessToken; - return $this->httpReq( - 'get', - "{$this->_baseUrl}token", - $params - ); - } - - /** - * Get User Information - */ - public function getUserTokenInfo() - { - return $this->httpReq( - 'get', - "{$this->_baseUrl}token" - ); - } - - /** - * Get Application Authorized User IDs - */ - public function getAppUserIDs() - { - // requires appAccessToken - if (!$this->_appAccessToken) { - $this->getAppAccessToken(); - } - // ensure request is made with our appAccessToken - $params['access_token'] = $this->_appAccessToken; - return $this->httpReq( - 'get', - "{$this->_baseUrl}apps/me/users/ids", - $params - ); - } - - /** - * Get Application Authorized User Tokens - */ - public function getAppUserTokens() - { - // requires appAccessToken - if (!$this->_appAccessToken) { - $this->getAppAccessToken(); - } - // ensure request is made with our appAccessToken - $params['access_token'] = $this->_appAccessToken; - return $this->httpReq( - 'get', - "{$this->_baseUrl}apps/me/users/tokens", - $params - ); - } - - /** - * Registers your function (or an array of object and method) to be called - * whenever an event is received via an open pnut.io stream. Your function - * will receive a single parameter, which is the object wrapper containing - * the meta and data. - * @param mixed $function A PHP callback (either a string containing the function name, - * or an array where the first element is the class/object and the second - * is the method). - */ - public function registerStreamFunction($function): void - { - $this->_streamCallback = $function; - } - - /** - * Opens a stream that's been created for this user/app and starts sending - * events/objects to your defined callback functions. You must define at - * least one callback function before opening a stream. - * @param mixed $stream Either a stream ID or the endpoint of a stream - * you've already created. This stream must exist and must be valid for - * your current access token. If you pass a stream ID, the library will - * make an API call to get the endpoint. - * - * This function will return immediately, but your callback functions - * will continue to receive events until you call closeStream() or until - * pnut.io terminates the stream from their end with an error. - * - * If you're disconnected due to a network error, the library will - * automatically attempt to reconnect you to the same stream, no action - * on your part is necessary for this. However if the pnut.io API returns - * an error, a reconnection attempt will not be made. - * - * Note there is no closeStream, because once you open a stream you - * can't stop it (unless you exit() or die() or throw an uncaught - * exception, or something else that terminates the script). - * @return boolean True - * @see createStream() - */ - public function openStream($stream): bool - { - // if there's already a stream running, don't allow another - if ($this->_currentStream) { - throw new phpnutException('There is already a stream being consumed, only one stream can be consumed per phpnutStream instance'); - } - // must register a callback (or the exercise is pointless) - if (!$this->_streamCallback) { - throw new phpnutException('You must define your callback function using registerStreamFunction() before calling openStream'); - } - // if the stream is a numeric value, get the stream info from the api - if (is_numeric($stream)) { - $stream = $this->getStream($stream); - $this->_streamUrl = $stream['endpoint']; - } - else { - $this->_streamUrl = $stream; - } - // continue doing this until we get an error back or something...? - $this->httpStream( - 'get', - $this->_streamUrl - ); - return true; - } - - /** - * Close the currently open stream. - */ - public function closeStream(): void - { - if (!$this->_lastStreamActivity) { - // never opened - return; - } - if (!$this->_multiStream) { - throw new phpnutException('You must open a stream before calling closeStream()'); - } - curl_close($this->_currentStream); - curl_multi_remove_handle($this->_multiStream, $this->_currentStream); - curl_multi_close($this->_multiStream); - $this->_currentStream = null; - $this->_multiStream = null; - } - - /** - * Retrieve all streams for the current access token. - * @return array An array of stream definitions. - */ - public function getAllStreams() - { - return $this->httpReq( - 'get', - "{$this->_baseUrl}streams" - ); - } - - /** - * Returns a single stream specified by a stream ID. The stream must have been - * created with the current access token. - * @return array A stream definition - */ - public function getStream(string $streamId) - { - return $this->httpReq( - 'get', - $this->_baseUrl.'streams/'.urlencode($streamId) - ); - } - - /** - * Creates a stream for the current app access token. - * - * @param array $objectTypes The objects you want to retrieve data for from the - * stream. At time of writing these can be 'post', 'bookmark', 'user_follow', 'mute', 'block', 'stream_marker', 'message', 'channel', 'channel_subscription', 'token', and/or 'user'. - * If you don't specify, a few standard events will be retrieved. - */ - public function createStream(?array $objectTypes=null) - { - // default object types to everything - if (is_null($objectTypes)) { - $objectTypes = [ - 'post', - 'bookmark', - 'user_follow', - ]; - } - $data = [ - 'object_types'=>$objectTypes, - 'type'=>'long_poll', - ]; - $data = json_encode($data); - $response = $this->httpReq( - 'post', - "{$this->_baseUrl}streams", - $data, - 'application/json' - ); - return $response; - } - - /** - * Update stream for the current app access token - * - * @param string $streamId The stream ID to update. This stream must have been - * created by the current access token. - * @param array $data allows object_types, type, filter_id and key to be updated. filter_id/key can be omitted - */ - public function updateStream(string $streamId, array $data) - { - // objectTypes is likely required - if (is_null($data['object_types'])) { - $data['object_types'] = [ - 'post', - 'bookmark', - 'user_follow', - ]; - } - // type can still only be long_poll - if (is_null($data['type'])) { - $data['type'] = 'long_poll'; - } - $data = json_encode($data); - $response = $this->httpReq( - 'put', - $this->_baseUrl.'streams/'.urlencode($streamId), - $data, - 'application/json' - ); - return $response; - } - - /** - * Deletes a stream if you no longer need it. - * - * @param string $streamId The stream ID to delete. This stream must have been - * created by the current access token. - */ - public function deleteStream(string $streamId) - { - return $this->httpReq( - 'delete', - $this->_baseUrl.'streams/'.urlencode($streamId) - ); - } - - /** - * Deletes all streams created by the current access token. - */ - public function deleteAllStreams() - { - return $this->httpReq( - 'delete', - "{$this->_baseUrl}streams" - ); - } - - /** - * Internal function used to process incoming chunks from the stream. This is only - * public because it needs to be accessed by CURL. Do not call or use this function - * in your own code. - * @ignore - */ - public function httpStreamReceive($ch, $data) - { - $this->_lastStreamActivity = time(); - $this->_streamBuffer .= $data; - if (!$this->_streamHeaders) { - $pos = strpos($this->_streamBuffer, "\r\n\r\n"); - if ($pos !== false) { - $this->_streamHeaders = substr($this->_streamBuffer, 0, $pos); - $this->_streamBuffer = substr($this->_streamBuffer, $pos+4); - } - } else { - $pos = strpos($this->_streamBuffer, "\r\n"); - while ($pos !== false) { - $command = substr($this->_streamBuffer, 0, $pos); - $this->_streamBuffer = substr($this->_streamBuffer, $pos+2); - $command = json_decode($command, true); - if ($command) { - call_user_func($this->_streamCallback, $command); - } - $pos = strpos($this->_streamBuffer, "\r\n"); - } - } - return strlen($data); - } - - /** - * Opens a long lived HTTP connection to the pnut.io servers, and sends data - * received to the httpStreamReceive function. As a general rule you should not - * directly call this method, it's used by openStream(). - */ - protected function httpStream(string $act, $req, array $params=[], string $contentType='application/x-www-form-urlencoded'): void - { - if ($this->_currentStream) { - throw new phpnutException('There is already an open stream, you must close the existing one before opening a new one'); - } - $headers = []; - $this->_streamBuffer = ''; - if ($this->_accessToken) { - $headers[] = "Authorization: Bearer {$this->_accessToken}"; - } - $this->_currentStream = curl_init($req); - curl_setopt($this->_currentStream, CURLOPT_HTTPHEADER, $headers); - curl_setopt($this->_currentStream, CURLOPT_RETURNTRANSFER, true); - curl_setopt($this->_currentStream, CURLINFO_HEADER_OUT, true); - curl_setopt($this->_currentStream, CURLOPT_HEADER, true); - if ($this->_sslCA) { - curl_setopt($this->_currentStream, CURLOPT_CAINFO, $this->_sslCA); - } - // every time we receive a chunk of data, forward it to httpStreamReceive - curl_setopt($this->_currentStream, CURLOPT_WRITEFUNCTION, array($this, 'httpStreamReceive')); - // curl_exec($ch); - // return; - $this->_multiStream = curl_multi_init(); - $this->_lastStreamActivity = time(); - curl_multi_add_handle($this->_multiStream, $this->_currentStream); - } - - public function reconnectStream(): void - { - $this->closeStream(); - $this->_connectFailCounter++; - // if we've failed a few times, back off - if ($this->_connectFailCounter > 1) { - $sleepTime = pow(2, $this->_connectFailCounter); - // don't sleep more than 60 seconds - if ($sleepTime > 60) { - $sleepTime = 60; - } - sleep($sleepTime); - } - $this->httpStream('get', $this->_streamUrl); - } - - /** - * Process an open stream for x microseconds, then return. This is useful if you want - * to be doing other things while processing the stream. If you just want to - * consume the stream without other actions, you can call processForever() instead. - * @param null|float $microseconds The number of microseconds to process for before - * returning. There are 1,000,000 microseconds in a second. - * - * @return void - */ - public function processStream($microseconds=null): void - { - if (!$this->_multiStream) { - throw new phpnutException('You must open a stream before calling processStream()'); - } - $start = microtime(true); - $active = null; - $inQueue = null; - $sleepFor = 0; - do { - // if we haven't received anything within 5.5 minutes, reconnect - // keepalives are sent every 5 minutes (measured on 2013-3-12 by @ryantharp) - if (time()-$this->_lastStreamActivity >= 330) { - $this->reconnectStream(); - } - curl_multi_exec($this->_multiStream, $active); - if (!$active) { - $httpCode = curl_getinfo($this->_currentStream, CURLINFO_HTTP_CODE); - // don't reconnect on 400 errors - if ($httpCode >= 400 && $httpCode <= 499) { - throw new phpnutException("Received HTTP error {$httpCode} check your URL and credentials before reconnecting"); - } - $this->reconnectStream(); - } - // sleep for a max of 2/10 of a second - $timeSoFar = (microtime(true)-$start)*1000000; - $sleepFor = $this->streamingSleepFor; - if ($timeSoFar+$sleepFor > $microseconds) { - $sleepFor = $microseconds - $timeSoFar; - } - if ($sleepFor > 0) { - usleep($sleepFor); - } - } while ($timeSoFar+$sleepFor < $microseconds); - } - - /** - * Process an open stream forever. This function will never return, if you - * want to perform other actions while consuming the stream, you should use - * processFor() instead. - * @return void This function will never return - * @see processFor(); - */ - public function processStreamForever(): void - { - while (true) { - $this->processStream(600); - } - } -} diff --git a/pnut/lib/phpnutException.php b/pnut/lib/phpnutException.php deleted file mode 100644 index 77e768fe..00000000 --- a/pnut/lib/phpnutException.php +++ /dev/null @@ -1,5 +0,0 @@ - - * Status: In Development - */ - -require_once 'addon/pnut/lib/phpnut.php'; -require_once 'addon/pnut/lib/phpnutException.php'; - -use Friendica\Content\Text\BBCode; -use Friendica\Content\Text\Plaintext; -use Friendica\Core\Config\Util\ConfigFileManager; -use Friendica\Core\Hook; -use Friendica\Core\Renderer; -use Friendica\Core\System; -use Friendica\DI; -use Friendica\Model\Item; -use Friendica\Model\Photo; -use phpnut\phpnutException; - -const PNUT_LIMIT = 256; - -function pnut_install() -{ - Hook::register('load_config', __FILE__, 'pnut_load_config'); - Hook::register('hook_fork', __FILE__, 'pnut_hook_fork'); - Hook::register('post_local', __FILE__, 'pnut_post_local'); - Hook::register('notifier_normal', __FILE__, 'pnut_post_hook'); - Hook::register('jot_networks', __FILE__, 'pnut_jot_nets'); - Hook::register('connector_settings', __FILE__, 'pnut_settings'); - Hook::register('connector_settings_post', __FILE__, 'pnut_settings_post'); -} - -function pnut_module() {} - -function pnut_content() -{ - if (!DI::userSession()->getLocalUserId()) { - DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); - return ''; - } - - if (isset(DI::args()->getArgv()[1])) { - switch (DI::args()->getArgv()[1]) { - case 'connect': - $o = pnut_connect(); - break; - - default: - $o = print_r(DI::args()->getArgv(), true); - break; - } - } else { - $o = pnut_connect(); - } - return $o; -} - -function pnut_connect() -{ - $client_id = DI::config()->get('pnut', 'client_id'); - $client_secret = DI::config()->get('pnut', 'client_secret'); - - if (empty($client_id) || empty($client_secret)) { - $client_id = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'pnut', 'client_id'); - $client_secret = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'pnut', 'client_secret'); - } - - $callback_url = DI::baseUrl() . '/pnut/connect'; - - $nut = new phpnut\phpnut($client_id, $client_secret); - - try { - $token = $nut->getAccessToken($callback_url); - DI::logger()->debug('Got Token', [$token]); - $o = DI::l10n()->t('You are now authenticated with pnut.io.'); - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'pnut', 'access_token', $token); - } catch (phpnutException $e) { - $o = DI::l10n()->t('Error fetching token. Please try again.', ['code' => $e->getCode(), 'message' => $e->getMessage()]); - } - - $o .= '
' . DI::l10n()->t("return to the connector page") . ''; - - return $o; -} - -function pnut_load_config(ConfigFileManager $loader) -{ - DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('pnut'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); -} - -function pnut_addon_admin(string &$o) -{ - $client_id = DI::config()->get('pnut', 'client_id'); - $client_secret = DI::config()->get('pnut', 'client_secret'); - - $t = Renderer::getMarkupTemplate('admin.tpl', 'addon/pnut/'); - - $o = Renderer::replaceMacros($t, [ - '$submit' => DI::l10n()->t('Save Settings'), - '$client_id' => ['pnut_client_id', DI::l10n()->t('Client ID'), $client_id], - '$client_secret' => ['pnut_client_secret', DI::l10n()->t('Client Secret'), $client_secret], - ]); -} - -function pnut_addon_admin_post() -{ - DI::config()->set('pnut', 'client_id', $_POST['pnut_client_id']); - DI::config()->set('pnut', 'client_secret', $_POST['pnut_client_secret']); -} - -function pnut_settings(array &$data) -{ - if (!DI::userSession()->getLocalUserId()) { - return; - } - - $redirectUri = DI::baseUrl() . '/pnut/connect'; - $scope = ['write_post', 'files']; - - $enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'pnut', 'post') ?? false; - $def_enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'pnut', 'post_by_default') ?? false; - $client_id = DI::config()->get('pnut', 'client_id'); - $client_secret = DI::config()->get('pnut', 'client_secret'); - $token = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'pnut', 'access_token'); - - $user_client = empty($client_id) || empty($client_secret); - if ($user_client) { - $client_id = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'pnut', 'client_id'); - $client_secret = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'pnut', 'client_secret'); - } - - if (!empty($client_id) && !empty($client_secret) && empty($token)) { - $nut = new phpnut\phpnut($client_id, $client_secret); - $authorize_url = $nut->getAuthUrl($redirectUri, $scope); - $authorize_text = DI::l10n()->t('Authenticate with pnut.io'); - } - - if (!empty($token)) { - $disconn_btn = DI::l10n()->t('Disconnect'); - } - - $t = Renderer::getMarkupTemplate('connector_settings.tpl', 'addon/pnut/'); - $html = Renderer::replaceMacros($t, [ - '$enable' => ['pnut', DI::l10n()->t('Enable Pnut Post Addon'), $enabled], - '$bydefault' => ['pnut_bydefault', DI::l10n()->t('Post to Pnut by default'), $def_enabled], - '$client_id' => ['pnut_client_id', DI::l10n()->t('Client ID'), $client_id], - '$client_secret' => ['pnut_client_secret', DI::l10n()->t('Client Secret'), $client_secret], - '$access_token' => ['pnut_access_token', DI::l10n()->t('Access Token'), $token, '', '', 'readonly'], - '$authorize_url' => $authorize_url ?? '', - '$authorize_text' => $authorize_text ?? '', - '$disconn_btn' => $disconn_btn ?? '', - 'user_client' => $user_client, - ]); - - $data = [ - 'connector' => 'pnut', - 'title' => DI::l10n()->t('Pnut Export'), - 'image' => 'addon/pnut/pnut.svg', - 'enabled' => $enabled, - 'html' => $html, - ]; -} - -function pnut_settings_post(array &$b) -{ - if (empty($_POST['pnut-submit']) && empty($_POST['pnut-disconnect'])) { - return; - } - - if (!empty($_POST['pnut-disconnect'])) { - DI::pConfig()->delete(DI::userSession()->getLocalUserId(), 'pnut', 'post'); - DI::pConfig()->delete(DI::userSession()->getLocalUserId(), 'pnut', 'post_by_default'); - DI::pConfig()->delete(DI::userSession()->getLocalUserId(), 'pnut', 'client_id'); - DI::pConfig()->delete(DI::userSession()->getLocalUserId(), 'pnut', 'client_secret'); - DI::pConfig()->delete(DI::userSession()->getLocalUserId(), 'pnut', 'access_token'); - } else { - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'pnut', 'post', intval($_POST['pnut'])); - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'pnut', 'post_by_default', intval($_POST['pnut_bydefault'])); - if (!empty($_POST['pnut_client_id'])) { - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'pnut', 'client_id', $_POST['pnut_client_id']); - } - if (!empty($_POST['pnut_client_secret'])) { - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'pnut', 'client_secret', $_POST['pnut_client_secret']); - } - } -} - -function pnut_jot_nets(array &$jotnets_fields) -{ - if (!DI::userSession()->getLocalUserId()) { - return; - } - - if (DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'pnut', 'post')) { - $jotnets_fields[] = [ - 'type' => 'checkbox', - 'field' => [ - 'pnut_enable', - DI::l10n()->t('Post to Pnut'), - DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'pnut', 'post_by_default') - ] - ]; - } -} - -function pnut_hook_fork(array &$b) -{ - if ($b['name'] != 'notifier_normal') { - return; - } - - $post = $b['data']; - - if (($post['created'] !== $post['edited']) && !$post['deleted']) { - DI::logger()->info('Editing is not supported by the addon'); - $b['execute'] = false; - return; - } - - if (!strstr($post['postopts'] ?? '', 'pnut') || ($post['gravity'] != Item::GRAVITY_PARENT) || ($post['private'] == Item::PRIVATE)) { - $b['execute'] = false; - return; - } -} - -function pnut_post_local(array &$b) -{ - if (!DI::userSession()->getLocalUserId() || (DI::userSession()->getLocalUserId() != $b['uid'])) { - return; - } - - if ($b['edit'] || ($b['private'] == Item::PRIVATE) || ($b['gravity'] != Item::GRAVITY_PARENT)) { - return; - } - - $pnut_post = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'pnut', 'post')); - $pnut_enable = (($pnut_post && !empty($_REQUEST['pnut_enable'])) ? intval($_REQUEST['pnut_enable']) : 0); - - // if API is used, default to the chosen settings - if ($b['api_source'] && intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'pnut', 'post_by_default'))) { - $pnut_enable = 1; - } - - if (!$pnut_enable) { - return; - } - - if (strlen($b['postopts'])) { - $b['postopts'] .= ','; - } - - $b['postopts'] .= 'pnut'; -} - -function pnut_post_hook(array &$b) -{ - /** - * Post to pnut.io - */ - if ($b['deleted'] || ($b['private'] == Item::PRIVATE) || ($b['created'] !== $b['edited'])) { - return; - } - - if (Item::isGroupPost($b['uri-id'])) { - return; - } - - DI::logger()->notice('PNUT post invoked', ['id' => $b['id'], 'guid' => $b['guid'], 'plink' => $b['plink']]); - DI::logger()->debug('PNUT array', $b); - - $token = DI::pConfig()->get($b['uid'], 'pnut', 'access_token'); - $nut = new phpnut\phpnut($token); - - $msgarr = Plaintext::getPost($b, PNUT_LIMIT, true, BBCode::EXTERNAL); - $text = $msgarr['text']; - $raw = []; - - DI::logger()->debug('PNUT msgarr', $msgarr); - - if (count($msgarr['parts']) > 1) { - $tstamp = time(); - $raw['nl.chimpnut.blog.post'][] = ['body' => $b['body'], 'tstamp' => $tstamp]; - $text = Plaintext::shorten($text, 252 - strlen($b['plink']), $b['uid']); - $text .= "\n" . $b['plink']; - } - - if ($msgarr['type'] == 'link') { - $text .= "\n[" . $msgarr['title'] . "](" . $msgarr['url'] . ")"; - } - - if ($msgarr['type'] == 'photo') { - $fileraw = ['type' => 'dev.mcmillian.friendica.image', 'kind' => 'image', 'is_public' => true]; - foreach ($msgarr['images'] as $image) { - DI::logger()->debug('PNUT image', $image); - - if (!empty($image['id'])) { - $photo = Photo::selectFirst([], ['id' => $image['id']]); - DI::logger()->debug('PNUT selectFirst'); - } else { - $photo = Photo::createPhotoForExternalResource($image['url']); - DI::logger()->debug('PNUT createPhotoForExternalResource'); - } - $picturedata = Photo::getImageForPhoto($photo); - - DI::logger()->debug('PNUT photo', $photo); - $picurefile = tempnam(System::getTempPath(), 'pnut'); - file_put_contents($picurefile, $picturedata); - DI::logger()->debug('PNUT got file?', ['filename' => $picurefile]); - $imagefile = $nut->createFile($picurefile, $fileraw); - DI::logger()->debug('PNUT file', ['pnutimagefile' => $imagefile]); - unlink($picurefile); - - $raw['io.pnut.core.oembed'][] = ['+io.pnut.core.file' => ['file_id' => $imagefile['id'], 'file_token' => $imagefile['file_token'], 'format' => 'oembed']]; - } - } - - $raw['io.pnut.core.crosspost'][] = ['canonical_url' => $b['plink']]; - $nut->createPost($text, ['raw' => $raw]); - - DI::logger()->debug('PNUT post complete', ['id' => $b['id'], 'text' => $text, 'raw' => $raw]); -} diff --git a/pnut/pnut.svg b/pnut/pnut.svg deleted file mode 100644 index 6cc64b01..00000000 --- a/pnut/pnut.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/pnut/templates/admin.tpl b/pnut/templates/admin.tpl deleted file mode 100644 index b4cc3651..00000000 --- a/pnut/templates/admin.tpl +++ /dev/null @@ -1,3 +0,0 @@ -{{include file="field_input.tpl" field=$client_id}} -{{include file="field_input.tpl" field=$client_secret}} -
diff --git a/pnut/templates/connector_settings.tpl b/pnut/templates/connector_settings.tpl deleted file mode 100644 index 6662a5ae..00000000 --- a/pnut/templates/connector_settings.tpl +++ /dev/null @@ -1,14 +0,0 @@ -

{{$status}}

-{{include file="field_checkbox.tpl" field=$enable}} -{{include file="field_checkbox.tpl" field=$bydefault}} -{{if $user_client}} - {{include file="field_input.tpl" field=$client_id}} - {{include file="field_input.tpl" field=$client_secret}} - {{include file="field_input.tpl" field=$access_token}} -{{/if}} -{{if $authorize_url}} - {{$authorize_text}} -{{/if}} -{{if $disconn_btn}} -
-{{/if}} diff --git a/public_server/lang/bg/messages.po b/public_server/lang/bg/messages.po deleted file mode 100644 index c0091e35..00000000 --- a/public_server/lang/bg/messages.po +++ /dev/null @@ -1,48 +0,0 @@ -# ADDON public_server -# Copyright (C) -# This file is distributed under the same license as the Friendica public_server addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 11:24+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: public_server.php:64 -msgid "Administrator" -msgstr "" - -#: public_server.php:118 -#, php-format -msgid "Your account on %s will expire in a few days." -msgstr "" - -#: public_server.php:119 -msgid "Your Friendica account is about to expire." -msgstr "" - -#: public_server.php:120 -#, php-format -msgid "" -"Hi %1$s,\n" -"\n" -"Your account on %2$s will expire in less than five days. You may keep your account by logging in at least once every 30 days" -msgstr "" - -#: public_server.php:158 -msgid "Save Settings" -msgstr "" - -#: public_server.php:160 -msgid "Set any of these options to 0 to deactivate it." -msgstr "" diff --git a/public_server/lang/bg/strings.php b/public_server/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/public_server/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: public_server.php:64 -msgid "Administrator" -msgstr "" - -#: public_server.php:118 -#, php-format -msgid "Your account on %s will expire in a few days." -msgstr "" - -#: public_server.php:119 -msgid "Your Friendica account is about to expire." -msgstr "" - -#: public_server.php:120 -#, php-format -msgid "" -"Hi %1$s,\n" -"\n" -"Your account on %2$s will expire in less than five days. You may keep your account by logging in at least once every 30 days" -msgstr "" - -#: public_server.php:158 -msgid "Save Settings" -msgstr "" - -#: public_server.php:160 -msgid "Set any of these options to 0 to deactivate it." -msgstr "" diff --git a/public_server/lang/ca/strings.php b/public_server/lang/ca/strings.php index d34874f6..ead9e954 100644 --- a/public_server/lang/ca/strings.php +++ b/public_server/lang/ca/strings.php @@ -1,7 +1,5 @@ -strings["Administrator"] = "Administrador"; +$a->strings["Your account on %s will expire in a few days."] = "El teu compte en %s expirarà en pocs dies."; +$a->strings["Your Friendica account is about to expire."] = "El teu compte de Friendica està a punt de caducar."; diff --git a/public_server/lang/de/messages.po b/public_server/lang/de/messages.po index cc2cf617..514d579d 100644 --- a/public_server/lang/de/messages.po +++ b/public_server/lang/de/messages.po @@ -12,9 +12,9 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 11:24+0000\n" -"Last-Translator: Till Mohr , 2021\n" -"Language-Team: German (http://app.transifex.com/Friendica/friendica/language/de/)\n" +"PO-Revision-Date: 2021-05-23 19:49+0000\n" +"Last-Translator: Till Mohr \n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/public_server/lang/eo/messages.po b/public_server/lang/eo/messages.po deleted file mode 100644 index 12293a21..00000000 --- a/public_server/lang/eo/messages.po +++ /dev/null @@ -1,48 +0,0 @@ -# ADDON public_server -# Copyright (C) -# This file is distributed under the same license as the Friendica public_server addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 11:24+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: public_server.php:64 -msgid "Administrator" -msgstr "" - -#: public_server.php:118 -#, php-format -msgid "Your account on %s will expire in a few days." -msgstr "" - -#: public_server.php:119 -msgid "Your Friendica account is about to expire." -msgstr "" - -#: public_server.php:120 -#, php-format -msgid "" -"Hi %1$s,\n" -"\n" -"Your account on %2$s will expire in less than five days. You may keep your account by logging in at least once every 30 days" -msgstr "" - -#: public_server.php:158 -msgid "Save Settings" -msgstr "" - -#: public_server.php:160 -msgid "Set any of these options to 0 to deactivate it." -msgstr "" diff --git a/public_server/lang/eo/strings.php b/public_server/lang/eo/strings.php index 68e8a64c..91fc41f6 100644 --- a/public_server/lang/eo/strings.php +++ b/public_server/lang/eo/strings.php @@ -1,7 +1,5 @@ -strings["Administrator"] = "Administranto"; +$a->strings["Your account on %s will expire in a few days."] = "Via konto ĉe %s senvalidiĝos post kelkaj tagoj."; +$a->strings["Your Friendica account is about to expire."] = "Via konto ĉe Friendica baldaŭ senvalidiĝos."; diff --git a/public_server/lang/et/messages.po b/public_server/lang/et/messages.po deleted file mode 100644 index 932807e7..00000000 --- a/public_server/lang/et/messages.po +++ /dev/null @@ -1,48 +0,0 @@ -# ADDON public_server -# Copyright (C) -# This file is distributed under the same license as the Friendica public_server addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 11:24+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: et\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: public_server.php:64 -msgid "Administrator" -msgstr "" - -#: public_server.php:118 -#, php-format -msgid "Your account on %s will expire in a few days." -msgstr "" - -#: public_server.php:119 -msgid "Your Friendica account is about to expire." -msgstr "" - -#: public_server.php:120 -#, php-format -msgid "" -"Hi %1$s,\n" -"\n" -"Your account on %2$s will expire in less than five days. You may keep your account by logging in at least once every 30 days" -msgstr "" - -#: public_server.php:158 -msgid "Save Settings" -msgstr "" - -#: public_server.php:160 -msgid "Set any of these options to 0 to deactivate it." -msgstr "" diff --git a/public_server/lang/et/strings.php b/public_server/lang/et/strings.php deleted file mode 100644 index dfe78358..00000000 --- a/public_server/lang/et/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -, 2022 # StefOfficiel , 2015 msgid "" @@ -13,8 +12,8 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-02-01 18:15+0100\n" "PO-Revision-Date: 2014-06-23 11:24+0000\n" -"Last-Translator: cracrayol, 2025\n" -"Language-Team: French (http://app.transifex.com/Friendica/friendica/language/fr/)\n" +"Last-Translator: Hypolite Petovan , 2022\n" +"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -44,7 +43,7 @@ msgstr "%1$s,\n\nVotre compte sur %2$s va expirer dans moins de 5 jours. Vous po #: public_server.php:158 msgid "Save Settings" -msgstr "Sauvegarder les paramètres" +msgstr "Enregistrer les paramètres" #: public_server.php:160 msgid "Set any of these options to 0 to deactivate it." diff --git a/public_server/lang/fr/strings.php b/public_server/lang/fr/strings.php index 0ac61152..add86c16 100644 --- a/public_server/lang/fr/strings.php +++ b/public_server/lang/fr/strings.php @@ -13,5 +13,5 @@ $a->strings['Hi %1$s, Your account on %2$s will expire in less than five days. You may keep your account by logging in at least once every 30 days'] = '%1$s, Votre compte sur %2$s va expirer dans moins de 5 jours. Vous pouvez conserver votre compte en vous identifiant au moins une fois tous les 30 jours'; -$a->strings['Save Settings'] = 'Sauvegarder les paramètres'; +$a->strings['Save Settings'] = 'Enregistrer les paramètres'; $a->strings['Set any of these options to 0 to deactivate it.'] = 'Entrez 0 comme valeur pour n\'importe quelle de ces options pour la désactiver.'; diff --git a/public_server/lang/gd/messages.po b/public_server/lang/gd/messages.po deleted file mode 100644 index c716b211..00000000 --- a/public_server/lang/gd/messages.po +++ /dev/null @@ -1,48 +0,0 @@ -# ADDON public_server -# Copyright (C) -# This file is distributed under the same license as the Friendica public_server addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 11:24+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gd\n" -"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" - -#: public_server.php:64 -msgid "Administrator" -msgstr "" - -#: public_server.php:118 -#, php-format -msgid "Your account on %s will expire in a few days." -msgstr "" - -#: public_server.php:119 -msgid "Your Friendica account is about to expire." -msgstr "" - -#: public_server.php:120 -#, php-format -msgid "" -"Hi %1$s,\n" -"\n" -"Your account on %2$s will expire in less than five days. You may keep your account by logging in at least once every 30 days" -msgstr "" - -#: public_server.php:158 -msgid "Save Settings" -msgstr "" - -#: public_server.php:160 -msgid "Set any of these options to 0 to deactivate it." -msgstr "" diff --git a/public_server/lang/gd/strings.php b/public_server/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/public_server/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/public_server/lang/is/messages.po b/public_server/lang/is/messages.po deleted file mode 100644 index b41a4e10..00000000 --- a/public_server/lang/is/messages.po +++ /dev/null @@ -1,48 +0,0 @@ -# ADDON public_server -# Copyright (C) -# This file is distributed under the same license as the Friendica public_server addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 11:24+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: is\n" -"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" - -#: public_server.php:64 -msgid "Administrator" -msgstr "" - -#: public_server.php:118 -#, php-format -msgid "Your account on %s will expire in a few days." -msgstr "" - -#: public_server.php:119 -msgid "Your Friendica account is about to expire." -msgstr "" - -#: public_server.php:120 -#, php-format -msgid "" -"Hi %1$s,\n" -"\n" -"Your account on %2$s will expire in less than five days. You may keep your account by logging in at least once every 30 days" -msgstr "" - -#: public_server.php:158 -msgid "Save Settings" -msgstr "" - -#: public_server.php:160 -msgid "Set any of these options to 0 to deactivate it." -msgstr "" diff --git a/public_server/lang/is/strings.php b/public_server/lang/is/strings.php index 975c341e..fc5424b3 100644 --- a/public_server/lang/is/strings.php +++ b/public_server/lang/is/strings.php @@ -1,7 +1,5 @@ -strings["Administrator"] = "Kerfisstjóri"; +$a->strings["Your account on %s will expire in a few days."] = ""; +$a->strings["Your Friendica account is about to expire."] = ""; diff --git a/public_server/lang/it/messages.po b/public_server/lang/it/messages.po index c091cfd6..5c46ab33 100644 --- a/public_server/lang/it/messages.po +++ b/public_server/lang/it/messages.po @@ -11,14 +11,14 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 11:24+0000\n" -"Last-Translator: Sylke Vicious , 2021\n" -"Language-Team: Italian (http://app.transifex.com/Friendica/friendica/language/it/)\n" +"PO-Revision-Date: 2021-02-16 12:57+0000\n" +"Last-Translator: Sylke Vicious \n" +"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: public_server.php:64 msgid "Administrator" diff --git a/public_server/lang/it/strings.php b/public_server/lang/it/strings.php index 41d5b0e9..a095f2a6 100644 --- a/public_server/lang/it/strings.php +++ b/public_server/lang/it/strings.php @@ -3,7 +3,7 @@ if(! function_exists("string_plural_select_it")) { function string_plural_select_it($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} $a->strings['Administrator'] = 'Amministratore'; $a->strings['Your account on %s will expire in a few days.'] = 'Il tuo account su %s scadrà tra pochi giorni.'; diff --git a/public_server/lang/ru/messages.po b/public_server/lang/ru/messages.po deleted file mode 100644 index 00898802..00000000 --- a/public_server/lang/ru/messages.po +++ /dev/null @@ -1,48 +0,0 @@ -# ADDON public_server -# Copyright (C) -# This file is distributed under the same license as the Friendica public_server addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 11:24+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Russian (http://app.transifex.com/Friendica/friendica/language/ru/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" - -#: public_server.php:64 -msgid "Administrator" -msgstr "" - -#: public_server.php:118 -#, php-format -msgid "Your account on %s will expire in a few days." -msgstr "" - -#: public_server.php:119 -msgid "Your Friendica account is about to expire." -msgstr "" - -#: public_server.php:120 -#, php-format -msgid "" -"Hi %1$s,\n" -"\n" -"Your account on %2$s will expire in less than five days. You may keep your account by logging in at least once every 30 days" -msgstr "" - -#: public_server.php:158 -msgid "Save Settings" -msgstr "" - -#: public_server.php:160 -msgid "Set any of these options to 0 to deactivate it." -msgstr "" diff --git a/public_server/lang/ru/strings.php b/public_server/lang/ru/strings.php index 0579fc21..405a408f 100644 --- a/public_server/lang/ru/strings.php +++ b/public_server/lang/ru/strings.php @@ -1,7 +1,5 @@ -=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; } -}} +strings["Administrator"] = "Администратор"; +$a->strings["Your account on %s will expire in a few days."] = ""; +$a->strings["Your Friendica account is about to expire."] = ""; diff --git a/public_server/public_server.php b/public_server/public_server.php index 9cd0f667..79201007 100644 --- a/public_server/public_server.php +++ b/public_server/public_server.php @@ -6,8 +6,10 @@ * Author: Keith Fernie */ +use Friendica\App; use Friendica\BaseModule; use Friendica\Core\Hook; +use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\Database\DBA; use Friendica\DI; @@ -27,7 +29,7 @@ function public_server_install() function public_server_load_config(ConfigFileManager $loader) { - DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('public_server'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); + DI::app()->getConfigCache()->load($loader->loadAddonConfig('public_server'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } function public_server_register_account($b) @@ -46,7 +48,7 @@ function public_server_register_account($b) function public_server_cron($b) { - DI::logger()->notice("public_server: cron start"); + Logger::notice("public_server: cron start"); $users = DBA::selectToArray('user', [], ["`account_expires_on` > ? AND `account_expires_on` < ? AND `expire_notification_sent` <= ?", DBA::NULL_DATETIME, DateTimeFormat::utc('now + 5 days'), DBA::NULL_DATETIME]); @@ -57,8 +59,8 @@ function public_server_cron($b) 'uid' => $rr['uid'], 'system_type' => 'public_server_expire', 'source_name' => DI::l10n()->t('Administrator'), - 'source_link' => DI::baseUrl(), - 'source_photo' => DI::baseUrl() . '/images/person-80.jpg', + 'source_link' => DI::baseUrl()->get(), + 'source_photo' => DI::baseUrl()->get() . '/images/person-80.jpg', ]); $fields = ['expire_notification_sent' => DateTimeFormat::utcNow()]; @@ -95,14 +97,14 @@ function public_server_cron($b) } } - DI::logger()->notice("public_server: cron end"); + Logger::notice("public_server: cron end"); } function public_server_enotify(array &$b) { if (!empty($b['params']) && $b['params']['type'] == Notification\Type::SYSTEM && !empty($b['params']['system_type']) && $b['params']['system_type'] === 'public_server_expire') { - $b['itemlink'] = DI::baseUrl(); + $b['itemlink'] = DI::baseUrl()->get(); $b['epreamble'] = $b['preamble'] = DI::l10n()->t('Your account on %s will expire in a few days.', DI::config()->get('system', 'sitename')); $b['subject'] = DI::l10n()->t('Your Friendica account is about to expire.'); $b['body'] = DI::l10n()->t("Hi %1\$s,\n\nYour account on %2\$s will expire in less than five days. You may keep your account by logging in at least once every 30 days", $b['params']['to_name'], "[url=" . DI::config()->get('system', 'url') . "]" . DI::config()->get('config', 'sitename') . "[/url]"); diff --git a/pumpio/lang/C/messages.po b/pumpio/lang/C/messages.po index 7e14cd79..baac56e6 100644 --- a/pumpio/lang/C/messages.po +++ b/pumpio/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:50-0400\n" +"POT-Creation-Date: 2021-11-21 19:17-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,76 +17,76 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: pumpio.php:62 +#: pumpio.php:57 msgid "Permission denied." msgstr "" -#: pumpio.php:156 +#: pumpio.php:152 #, php-format msgid "Unable to register the client at the pump.io server '%s'." msgstr "" -#: pumpio.php:196 +#: pumpio.php:192 msgid "You are now authenticated to pumpio." msgstr "" -#: pumpio.php:197 +#: pumpio.php:193 msgid "return to the connector page" msgstr "" -#: pumpio.php:217 +#: pumpio.php:213 msgid "Post to pumpio" msgstr "" -#: pumpio.php:241 +#: pumpio.php:237 msgid "Save Settings" msgstr "" -#: pumpio.php:243 +#: pumpio.php:239 msgid "Delete this preset" msgstr "" -#: pumpio.php:249 +#: pumpio.php:245 msgid "Authenticate your pump.io connection" msgstr "" -#: pumpio.php:256 +#: pumpio.php:252 msgid "Pump.io servername (without \"http://\" or \"https://\" )" msgstr "" -#: pumpio.php:257 +#: pumpio.php:253 msgid "Pump.io username (without the servername)" msgstr "" -#: pumpio.php:258 +#: pumpio.php:254 msgid "Import the remote timeline" msgstr "" -#: pumpio.php:259 +#: pumpio.php:255 msgid "Enable Pump.io Post Addon" msgstr "" -#: pumpio.php:260 +#: pumpio.php:256 msgid "Post to Pump.io by default" msgstr "" -#: pumpio.php:261 +#: pumpio.php:257 msgid "Should posts be public?" msgstr "" -#: pumpio.php:262 +#: pumpio.php:258 msgid "Mirror all public posts" msgstr "" -#: pumpio.php:267 +#: pumpio.php:263 msgid "Pump.io Import/Export/Mirror" msgstr "" -#: pumpio.php:924 +#: pumpio.php:920 msgid "status" msgstr "" -#: pumpio.php:928 +#: pumpio.php:924 #, php-format msgid "%1$s likes %2$s's %3$s" msgstr "" diff --git a/pumpio/lang/bg/messages.po b/pumpio/lang/bg/messages.po deleted file mode 100644 index d8cbfb7d..00000000 --- a/pumpio/lang/bg/messages.po +++ /dev/null @@ -1,93 +0,0 @@ -# ADDON pumpio -# Copyright (C) -# This file is distributed under the same license as the Friendica pumpio addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:50-0400\n" -"PO-Revision-Date: 2014-06-23 11:30+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: pumpio.php:62 -msgid "Permission denied." -msgstr "" - -#: pumpio.php:156 -#, php-format -msgid "Unable to register the client at the pump.io server '%s'." -msgstr "" - -#: pumpio.php:196 -msgid "You are now authenticated to pumpio." -msgstr "" - -#: pumpio.php:197 -msgid "return to the connector page" -msgstr "" - -#: pumpio.php:217 -msgid "Post to pumpio" -msgstr "" - -#: pumpio.php:241 -msgid "Save Settings" -msgstr "" - -#: pumpio.php:243 -msgid "Delete this preset" -msgstr "" - -#: pumpio.php:249 -msgid "Authenticate your pump.io connection" -msgstr "" - -#: pumpio.php:256 -msgid "Pump.io servername (without \"http://\" or \"https://\" )" -msgstr "" - -#: pumpio.php:257 -msgid "Pump.io username (without the servername)" -msgstr "" - -#: pumpio.php:258 -msgid "Import the remote timeline" -msgstr "" - -#: pumpio.php:259 -msgid "Enable Pump.io Post Addon" -msgstr "" - -#: pumpio.php:260 -msgid "Post to Pump.io by default" -msgstr "" - -#: pumpio.php:261 -msgid "Should posts be public?" -msgstr "" - -#: pumpio.php:262 -msgid "Mirror all public posts" -msgstr "" - -#: pumpio.php:267 -msgid "Pump.io Import/Export/Mirror" -msgstr "" - -#: pumpio.php:924 -msgid "status" -msgstr "" - -#: pumpio.php:928 -#, php-format -msgid "%1$s likes %2$s's %3$s" -msgstr "" diff --git a/pumpio/lang/bg/strings.php b/pumpio/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/pumpio/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: pumpio.php:62 -msgid "Permission denied." -msgstr "" - -#: pumpio.php:156 -#, php-format -msgid "Unable to register the client at the pump.io server '%s'." -msgstr "" - -#: pumpio.php:196 -msgid "You are now authenticated to pumpio." -msgstr "" - -#: pumpio.php:197 -msgid "return to the connector page" -msgstr "" - -#: pumpio.php:217 -msgid "Post to pumpio" -msgstr "" - -#: pumpio.php:241 -msgid "Save Settings" -msgstr "" - -#: pumpio.php:243 -msgid "Delete this preset" -msgstr "" - -#: pumpio.php:249 -msgid "Authenticate your pump.io connection" -msgstr "" - -#: pumpio.php:256 -msgid "Pump.io servername (without \"http://\" or \"https://\" )" -msgstr "" - -#: pumpio.php:257 -msgid "Pump.io username (without the servername)" -msgstr "" - -#: pumpio.php:258 -msgid "Import the remote timeline" -msgstr "" - -#: pumpio.php:259 -msgid "Enable Pump.io Post Addon" -msgstr "" - -#: pumpio.php:260 -msgid "Post to Pump.io by default" -msgstr "" - -#: pumpio.php:261 -msgid "Should posts be public?" -msgstr "" - -#: pumpio.php:262 -msgid "Mirror all public posts" -msgstr "" - -#: pumpio.php:267 -msgid "Pump.io Import/Export/Mirror" -msgstr "" - -#: pumpio.php:924 -msgid "status" -msgstr "" - -#: pumpio.php:928 -#, php-format -msgid "%1$s likes %2$s's %3$s" -msgstr "" diff --git a/pumpio/lang/ca/strings.php b/pumpio/lang/ca/strings.php deleted file mode 100644 index d34874f6..00000000 --- a/pumpio/lang/ca/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" -#: pumpio.php:57 +#: pumpio.php:38 msgid "Permission denied." msgstr "Přístup odmítnut." -#: pumpio.php:152 +#: pumpio.php:124 #, php-format msgid "Unable to register the client at the pump.io server '%s'." -msgstr "Nebylo možné registrovat klienta na serveru pump.io \"%s\"." +msgstr "Nebylo možné registrovat klienta na pump.io serveru '%s'." -#: pumpio.php:192 +#: pumpio.php:164 msgid "You are now authenticated to pumpio." -msgstr "Nyní jste přihlášen/a na pump.io." +msgstr "Nyní jste přihlášen k pumpio." -#: pumpio.php:193 +#: pumpio.php:165 msgid "return to the connector page" -msgstr "návrat na stránku konektoru" +msgstr "návrat ke stránce konektor" -#: pumpio.php:213 +#: pumpio.php:183 msgid "Post to pumpio" -msgstr "Posílat na pump.io" +msgstr "Příspěvek na pumpio" -#: pumpio.php:237 -msgid "Save Settings" -msgstr "Uložit nastavení" +#: pumpio.php:221 pumpio.php:225 +msgid "Pump.io Import/Export/Mirror" +msgstr "Pump.oi Import/Export/Zrcadlení" -#: pumpio.php:239 -msgid "Delete this preset" -msgstr "" +#: pumpio.php:229 +msgid "pump.io username (without the servername)" +msgstr "uživatelské jméno pump.io (bez jména serveru)" -#: pumpio.php:245 +#: pumpio.php:234 +msgid "pump.io servername (without \"http://\" or \"https://\" )" +msgstr "jméno serveru pump.io (bez \"http://\" nebo \"https://\" )" + +#: pumpio.php:246 msgid "Authenticate your pump.io connection" msgstr "Přihlásit ke spojení na pump.io" -#: pumpio.php:252 -msgid "Pump.io servername (without \"http://\" or \"https://\" )" -msgstr "" - -#: pumpio.php:253 -msgid "Pump.io username (without the servername)" -msgstr "" - -#: pumpio.php:254 +#: pumpio.php:250 msgid "Import the remote timeline" msgstr "Importovat vzdálenou časovou osu" #: pumpio.php:255 -msgid "Enable Pump.io Post Addon" -msgstr "" +msgid "Enable pump.io Post Addon" +msgstr "Povolit doplněk pumo.io Post" -#: pumpio.php:256 -msgid "Post to Pump.io by default" -msgstr "" +#: pumpio.php:260 +msgid "Post to pump.io by default" +msgstr "Posílat příspěvky na pump.io automaticky" -#: pumpio.php:257 +#: pumpio.php:265 msgid "Should posts be public?" msgstr "Mají být příspěvky veřejné?" -#: pumpio.php:258 +#: pumpio.php:270 msgid "Mirror all public posts" msgstr "Zrcadlit všechny veřejné příspěvky" -#: pumpio.php:263 -msgid "Pump.io Import/Export/Mirror" -msgstr "Import/Export/Zrcadlení Pump.io" +#: pumpio.php:275 +msgid "Check to delete this preset" +msgstr "Zaškrtnout pro smazání tohoto nastavení" -#: pumpio.php:920 +#: pumpio.php:285 +msgid "Save Settings" +msgstr "Uložit Nastavení" + +#: pumpio.php:515 +msgid "Pump.io post failed. Queued for retry." +msgstr "Zaslání příspěvku na Pump.io selhalo. Příspěvek byl zařazen do fronty pro opakované odeslání." + +#: pumpio.php:587 +msgid "Pump.io like failed. Queued for retry." +msgstr "Zaslání příspěvku na Pump.io zřejmě selhalo. Příspěvek byl zařazen do fronty pro opakované odeslání." + +#: pumpio.php:875 msgid "status" msgstr "stav" -#: pumpio.php:924 +#: pumpio.php:879 #, php-format msgid "%1$s likes %2$s's %3$s" -msgstr "Uživateli %1$s se líbí %3$s uživatele %2$s" +msgstr "%1$s se líbí %3$s %2$s" diff --git a/pumpio/lang/cs/strings.php b/pumpio/lang/cs/strings.php index 9e90d014..b05b20d7 100644 --- a/pumpio/lang/cs/strings.php +++ b/pumpio/lang/cs/strings.php @@ -6,15 +6,22 @@ function string_plural_select_cs($n){ if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; } }} $a->strings['Permission denied.'] = 'Přístup odmítnut.'; -$a->strings['Unable to register the client at the pump.io server \'%s\'.'] = 'Nebylo možné registrovat klienta na serveru pump.io "%s".'; -$a->strings['You are now authenticated to pumpio.'] = 'Nyní jste přihlášen/a na pump.io.'; -$a->strings['return to the connector page'] = 'návrat na stránku konektoru'; -$a->strings['Post to pumpio'] = 'Posílat na pump.io'; -$a->strings['Save Settings'] = 'Uložit nastavení'; +$a->strings['Unable to register the client at the pump.io server \'%s\'.'] = 'Nebylo možné registrovat klienta na pump.io serveru \'%s\'.'; +$a->strings['You are now authenticated to pumpio.'] = 'Nyní jste přihlášen k pumpio.'; +$a->strings['return to the connector page'] = 'návrat ke stránce konektor'; +$a->strings['Post to pumpio'] = 'Příspěvek na pumpio'; +$a->strings['Pump.io Import/Export/Mirror'] = 'Pump.oi Import/Export/Zrcadlení'; +$a->strings['pump.io username (without the servername)'] = 'uživatelské jméno pump.io (bez jména serveru)'; +$a->strings['pump.io servername (without "http://" or "https://" )'] = 'jméno serveru pump.io (bez "http://" nebo "https://" )'; $a->strings['Authenticate your pump.io connection'] = 'Přihlásit ke spojení na pump.io'; $a->strings['Import the remote timeline'] = 'Importovat vzdálenou časovou osu'; +$a->strings['Enable pump.io Post Addon'] = 'Povolit doplněk pumo.io Post'; +$a->strings['Post to pump.io by default'] = 'Posílat příspěvky na pump.io automaticky'; $a->strings['Should posts be public?'] = 'Mají být příspěvky veřejné?'; $a->strings['Mirror all public posts'] = 'Zrcadlit všechny veřejné příspěvky'; -$a->strings['Pump.io Import/Export/Mirror'] = 'Import/Export/Zrcadlení Pump.io'; +$a->strings['Check to delete this preset'] = 'Zaškrtnout pro smazání tohoto nastavení'; +$a->strings['Save Settings'] = 'Uložit Nastavení'; +$a->strings['Pump.io post failed. Queued for retry.'] = 'Zaslání příspěvku na Pump.io selhalo. Příspěvek byl zařazen do fronty pro opakované odeslání.'; +$a->strings['Pump.io like failed. Queued for retry.'] = 'Zaslání příspěvku na Pump.io zřejmě selhalo. Příspěvek byl zařazen do fronty pro opakované odeslání.'; $a->strings['status'] = 'stav'; -$a->strings['%1$s likes %2$s\'s %3$s'] = 'Uživateli %1$s se líbí %3$s uživatele %2$s'; +$a->strings['%1$s likes %2$s\'s %3$s'] = '%1$s se líbí %3$s %2$s'; diff --git a/pumpio/lang/de/messages.po b/pumpio/lang/de/messages.po index 40119f32..5b33d2e3 100644 --- a/pumpio/lang/de/messages.po +++ b/pumpio/lang/de/messages.po @@ -12,9 +12,9 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-11-21 19:17-0500\n" -"PO-Revision-Date: 2014-06-23 11:30+0000\n" -"Last-Translator: Tobias Diekershoff , 2018,2022\n" -"Language-Team: German (http://app.transifex.com/Friendica/friendica/language/de/)\n" +"PO-Revision-Date: 2022-01-22 17:36+0000\n" +"Last-Translator: Tobias Diekershoff \n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/pumpio/lang/eo/messages.po b/pumpio/lang/eo/messages.po deleted file mode 100644 index 80654e32..00000000 --- a/pumpio/lang/eo/messages.po +++ /dev/null @@ -1,93 +0,0 @@ -# ADDON pumpio -# Copyright (C) -# This file is distributed under the same license as the Friendica pumpio addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:50-0400\n" -"PO-Revision-Date: 2014-06-23 11:30+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: pumpio.php:62 -msgid "Permission denied." -msgstr "" - -#: pumpio.php:156 -#, php-format -msgid "Unable to register the client at the pump.io server '%s'." -msgstr "" - -#: pumpio.php:196 -msgid "You are now authenticated to pumpio." -msgstr "" - -#: pumpio.php:197 -msgid "return to the connector page" -msgstr "" - -#: pumpio.php:217 -msgid "Post to pumpio" -msgstr "" - -#: pumpio.php:241 -msgid "Save Settings" -msgstr "" - -#: pumpio.php:243 -msgid "Delete this preset" -msgstr "" - -#: pumpio.php:249 -msgid "Authenticate your pump.io connection" -msgstr "" - -#: pumpio.php:256 -msgid "Pump.io servername (without \"http://\" or \"https://\" )" -msgstr "" - -#: pumpio.php:257 -msgid "Pump.io username (without the servername)" -msgstr "" - -#: pumpio.php:258 -msgid "Import the remote timeline" -msgstr "" - -#: pumpio.php:259 -msgid "Enable Pump.io Post Addon" -msgstr "" - -#: pumpio.php:260 -msgid "Post to Pump.io by default" -msgstr "" - -#: pumpio.php:261 -msgid "Should posts be public?" -msgstr "" - -#: pumpio.php:262 -msgid "Mirror all public posts" -msgstr "" - -#: pumpio.php:267 -msgid "Pump.io Import/Export/Mirror" -msgstr "" - -#: pumpio.php:924 -msgid "status" -msgstr "" - -#: pumpio.php:928 -#, php-format -msgid "%1$s likes %2$s's %3$s" -msgstr "" diff --git a/pumpio/lang/eo/strings.php b/pumpio/lang/eo/strings.php deleted file mode 100644 index 68e8a64c..00000000 --- a/pumpio/lang/eo/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: et\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: pumpio.php:62 -msgid "Permission denied." -msgstr "" - -#: pumpio.php:156 -#, php-format -msgid "Unable to register the client at the pump.io server '%s'." -msgstr "" - -#: pumpio.php:196 -msgid "You are now authenticated to pumpio." -msgstr "" - -#: pumpio.php:197 -msgid "return to the connector page" -msgstr "" - -#: pumpio.php:217 -msgid "Post to pumpio" -msgstr "" - -#: pumpio.php:241 -msgid "Save Settings" -msgstr "" - -#: pumpio.php:243 -msgid "Delete this preset" -msgstr "" - -#: pumpio.php:249 -msgid "Authenticate your pump.io connection" -msgstr "" - -#: pumpio.php:256 -msgid "Pump.io servername (without \"http://\" or \"https://\" )" -msgstr "" - -#: pumpio.php:257 -msgid "Pump.io username (without the servername)" -msgstr "" - -#: pumpio.php:258 -msgid "Import the remote timeline" -msgstr "" - -#: pumpio.php:259 -msgid "Enable Pump.io Post Addon" -msgstr "" - -#: pumpio.php:260 -msgid "Post to Pump.io by default" -msgstr "" - -#: pumpio.php:261 -msgid "Should posts be public?" -msgstr "" - -#: pumpio.php:262 -msgid "Mirror all public posts" -msgstr "" - -#: pumpio.php:267 -msgid "Pump.io Import/Export/Mirror" -msgstr "" - -#: pumpio.php:924 -msgid "status" -msgstr "" - -#: pumpio.php:928 -#, php-format -msgid "%1$s likes %2$s's %3$s" -msgstr "" diff --git a/pumpio/lang/et/strings.php b/pumpio/lang/et/strings.php deleted file mode 100644 index dfe78358..00000000 --- a/pumpio/lang/et/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -, 2022 # ea1cd8241cb389ffb6f92bc6891eff5d_dc12308 <70dced5587d47e18d88f9298024d96f8_93383>, 2015 # StefOfficiel , 2015 @@ -12,86 +11,86 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:50-0400\n" +"POT-Creation-Date: 2021-11-21 19:17-0500\n" "PO-Revision-Date: 2014-06-23 11:30+0000\n" -"Last-Translator: Florent C., 2023\n" -"Language-Team: French (http://app.transifex.com/Friendica/friendica/language/fr/)\n" +"Last-Translator: Hypolite Petovan , 2022\n" +"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: fr\n" "Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" -#: pumpio.php:62 +#: pumpio.php:57 msgid "Permission denied." msgstr "Permission refusée." -#: pumpio.php:156 +#: pumpio.php:152 #, php-format msgid "Unable to register the client at the pump.io server '%s'." msgstr "Impossible d'enregistrer le client sur le serveur pump.io \"%s\"." -#: pumpio.php:196 +#: pumpio.php:192 msgid "You are now authenticated to pumpio." msgstr "Vous êtes maintenant authentifié sur pump.io." -#: pumpio.php:197 +#: pumpio.php:193 msgid "return to the connector page" msgstr "Retourner à la page du connecteur" -#: pumpio.php:217 +#: pumpio.php:213 msgid "Post to pumpio" msgstr "Publier sur pump.io" -#: pumpio.php:241 +#: pumpio.php:237 msgid "Save Settings" msgstr "Sauvegarder les paramètres" -#: pumpio.php:243 +#: pumpio.php:239 msgid "Delete this preset" msgstr "Supprimer ce préréglage" -#: pumpio.php:249 +#: pumpio.php:245 msgid "Authenticate your pump.io connection" msgstr "Identifiez votre connexion à pump.io" -#: pumpio.php:256 +#: pumpio.php:252 msgid "Pump.io servername (without \"http://\" or \"https://\" )" msgstr "Domaine du serveur Pump.io (sans \"http://\" ou \"https://\")" -#: pumpio.php:257 +#: pumpio.php:253 msgid "Pump.io username (without the servername)" msgstr "Nom d'utilisateur Pump.io (sans le domaine de serveur)" -#: pumpio.php:258 +#: pumpio.php:254 msgid "Import the remote timeline" -msgstr "Importer le flux distant" +msgstr "Importer la timeline distante" -#: pumpio.php:259 +#: pumpio.php:255 msgid "Enable Pump.io Post Addon" msgstr "Activer l'extension Pump.io" -#: pumpio.php:260 +#: pumpio.php:256 msgid "Post to Pump.io by default" msgstr "Publier sur Pump.io par défaut" -#: pumpio.php:261 +#: pumpio.php:257 msgid "Should posts be public?" msgstr "Les messages devraient être publiques ?" -#: pumpio.php:262 +#: pumpio.php:258 msgid "Mirror all public posts" msgstr "Refléter toutes les publications publiques" -#: pumpio.php:267 +#: pumpio.php:263 msgid "Pump.io Import/Export/Mirror" msgstr "Import/Export/Miroir Pump.io" -#: pumpio.php:924 +#: pumpio.php:920 msgid "status" msgstr "statut" -#: pumpio.php:928 +#: pumpio.php:924 #, php-format msgid "%1$s likes %2$s's %3$s" msgstr "%1$s aime lea %3$s de %2$s" diff --git a/pumpio/lang/fr/strings.php b/pumpio/lang/fr/strings.php index 14ddade1..bdbbc462 100644 --- a/pumpio/lang/fr/strings.php +++ b/pumpio/lang/fr/strings.php @@ -15,7 +15,7 @@ $a->strings['Delete this preset'] = 'Supprimer ce préréglage'; $a->strings['Authenticate your pump.io connection'] = 'Identifiez votre connexion à pump.io'; $a->strings['Pump.io servername (without "http://" or "https://" )'] = 'Domaine du serveur Pump.io (sans "http://" ou "https://")'; $a->strings['Pump.io username (without the servername)'] = 'Nom d\'utilisateur Pump.io (sans le domaine de serveur)'; -$a->strings['Import the remote timeline'] = 'Importer le flux distant'; +$a->strings['Import the remote timeline'] = 'Importer la timeline distante'; $a->strings['Enable Pump.io Post Addon'] = 'Activer l\'extension Pump.io'; $a->strings['Post to Pump.io by default'] = 'Publier sur Pump.io par défaut'; $a->strings['Should posts be public?'] = 'Les messages devraient être publiques ?'; diff --git a/pumpio/lang/gd/messages.po b/pumpio/lang/gd/messages.po deleted file mode 100644 index 0cefa2cd..00000000 --- a/pumpio/lang/gd/messages.po +++ /dev/null @@ -1,93 +0,0 @@ -# ADDON pumpio -# Copyright (C) -# This file is distributed under the same license as the Friendica pumpio addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:50-0400\n" -"PO-Revision-Date: 2014-06-23 11:30+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gd\n" -"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" - -#: pumpio.php:62 -msgid "Permission denied." -msgstr "" - -#: pumpio.php:156 -#, php-format -msgid "Unable to register the client at the pump.io server '%s'." -msgstr "" - -#: pumpio.php:196 -msgid "You are now authenticated to pumpio." -msgstr "" - -#: pumpio.php:197 -msgid "return to the connector page" -msgstr "" - -#: pumpio.php:217 -msgid "Post to pumpio" -msgstr "" - -#: pumpio.php:241 -msgid "Save Settings" -msgstr "" - -#: pumpio.php:243 -msgid "Delete this preset" -msgstr "" - -#: pumpio.php:249 -msgid "Authenticate your pump.io connection" -msgstr "" - -#: pumpio.php:256 -msgid "Pump.io servername (without \"http://\" or \"https://\" )" -msgstr "" - -#: pumpio.php:257 -msgid "Pump.io username (without the servername)" -msgstr "" - -#: pumpio.php:258 -msgid "Import the remote timeline" -msgstr "" - -#: pumpio.php:259 -msgid "Enable Pump.io Post Addon" -msgstr "" - -#: pumpio.php:260 -msgid "Post to Pump.io by default" -msgstr "" - -#: pumpio.php:261 -msgid "Should posts be public?" -msgstr "" - -#: pumpio.php:262 -msgid "Mirror all public posts" -msgstr "" - -#: pumpio.php:267 -msgid "Pump.io Import/Export/Mirror" -msgstr "" - -#: pumpio.php:924 -msgid "status" -msgstr "" - -#: pumpio.php:928 -#, php-format -msgid "%1$s likes %2$s's %3$s" -msgstr "" diff --git a/pumpio/lang/gd/strings.php b/pumpio/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/pumpio/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/pumpio/lang/is/messages.po b/pumpio/lang/is/messages.po deleted file mode 100644 index a1c9b37d..00000000 --- a/pumpio/lang/is/messages.po +++ /dev/null @@ -1,93 +0,0 @@ -# ADDON pumpio -# Copyright (C) -# This file is distributed under the same license as the Friendica pumpio addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:50-0400\n" -"PO-Revision-Date: 2014-06-23 11:30+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: is\n" -"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" - -#: pumpio.php:62 -msgid "Permission denied." -msgstr "" - -#: pumpio.php:156 -#, php-format -msgid "Unable to register the client at the pump.io server '%s'." -msgstr "" - -#: pumpio.php:196 -msgid "You are now authenticated to pumpio." -msgstr "" - -#: pumpio.php:197 -msgid "return to the connector page" -msgstr "" - -#: pumpio.php:217 -msgid "Post to pumpio" -msgstr "" - -#: pumpio.php:241 -msgid "Save Settings" -msgstr "" - -#: pumpio.php:243 -msgid "Delete this preset" -msgstr "" - -#: pumpio.php:249 -msgid "Authenticate your pump.io connection" -msgstr "" - -#: pumpio.php:256 -msgid "Pump.io servername (without \"http://\" or \"https://\" )" -msgstr "" - -#: pumpio.php:257 -msgid "Pump.io username (without the servername)" -msgstr "" - -#: pumpio.php:258 -msgid "Import the remote timeline" -msgstr "" - -#: pumpio.php:259 -msgid "Enable Pump.io Post Addon" -msgstr "" - -#: pumpio.php:260 -msgid "Post to Pump.io by default" -msgstr "" - -#: pumpio.php:261 -msgid "Should posts be public?" -msgstr "" - -#: pumpio.php:262 -msgid "Mirror all public posts" -msgstr "" - -#: pumpio.php:267 -msgid "Pump.io Import/Export/Mirror" -msgstr "" - -#: pumpio.php:924 -msgid "status" -msgstr "" - -#: pumpio.php:928 -#, php-format -msgid "%1$s likes %2$s's %3$s" -msgstr "" diff --git a/pumpio/lang/is/strings.php b/pumpio/lang/is/strings.php deleted file mode 100644 index 975c341e..00000000 --- a/pumpio/lang/is/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -, 2014,2018 -# Sylke Vicious , 2023 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:17-0500\n" -"PO-Revision-Date: 2014-06-23 11:30+0000\n" -"Last-Translator: Sylke Vicious , 2023\n" -"Language-Team: Italian (http://app.transifex.com/Friendica/friendica/language/it/)\n" +"POT-Creation-Date: 2014-06-23 14:45+0200\n" +"PO-Revision-Date: 2018-03-19 13:25+0000\n" +"Last-Translator: fabrixxm \n" +"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: pumpio.php:57 +#: pumpio.php:38 msgid "Permission denied." msgstr "Permesso negato." -#: pumpio.php:152 +#: pumpio.php:124 #, php-format msgid "Unable to register the client at the pump.io server '%s'." msgstr "Impossibile registrare il client sul server pump.io '%s'" -#: pumpio.php:192 +#: pumpio.php:164 msgid "You are now authenticated to pumpio." msgstr "Sei autenticato su pump.io" -#: pumpio.php:193 +#: pumpio.php:165 msgid "return to the connector page" msgstr "ritorna alla pagina del connettore" -#: pumpio.php:213 +#: pumpio.php:183 msgid "Post to pumpio" msgstr "Invia a pump.io" -#: pumpio.php:237 -msgid "Save Settings" -msgstr "Salva Impostazioni" +#: pumpio.php:221 pumpio.php:225 +msgid "Pump.io Import/Export/Mirror" +msgstr "Esporta/Importa/Clona pump.io" -#: pumpio.php:239 -msgid "Delete this preset" -msgstr "Elimina questa preimpostazione" +#: pumpio.php:229 +msgid "pump.io username (without the servername)" +msgstr "nome utente pump.io (senza il nome del server)" -#: pumpio.php:245 +#: pumpio.php:234 +msgid "pump.io servername (without \"http://\" or \"https://\" )" +msgstr "nome del server pump.io (senza \"http://\" o \"https://\")" + +#: pumpio.php:246 msgid "Authenticate your pump.io connection" msgstr "Autentica la tua connessione pump.io" -#: pumpio.php:252 -msgid "Pump.io servername (without \"http://\" or \"https://\" )" -msgstr "Nome server Pump.io (senza \"http://\" o \"https://\" )" - -#: pumpio.php:253 -msgid "Pump.io username (without the servername)" -msgstr "Nome utente Pump.io (senza nome server)" - -#: pumpio.php:254 +#: pumpio.php:250 msgid "Import the remote timeline" msgstr "Importa la timeline remota" #: pumpio.php:255 -msgid "Enable Pump.io Post Addon" -msgstr "Abilita componente aggiuntivo di pubblicazione Pump.io" +msgid "Enable pump.io Post Addon" +msgstr "Abilita il componente aggiuntivo di invio ad pump.io" -#: pumpio.php:256 -msgid "Post to Pump.io by default" -msgstr "Pubblica su Pump.io per impostazione predefinita" +#: pumpio.php:260 +msgid "Post to pump.io by default" +msgstr "Invia sempre a pump.io" -#: pumpio.php:257 +#: pumpio.php:265 msgid "Should posts be public?" msgstr "I messaggi devono essere pubblici?" -#: pumpio.php:258 +#: pumpio.php:270 msgid "Mirror all public posts" msgstr "Clona tutti i messaggi pubblici" -#: pumpio.php:263 -msgid "Pump.io Import/Export/Mirror" -msgstr "Esporta/Importa/Clona pump.io" +#: pumpio.php:275 +msgid "Check to delete this preset" +msgstr "Seleziona per elimiare queto preset" -#: pumpio.php:920 +#: pumpio.php:285 +msgid "Save Settings" +msgstr "Salva Impostazioni" + +#: pumpio.php:515 +msgid "Pump.io post failed. Queued for retry." +msgstr "Invio a pump.io fallito. In attesa di riprovare." + +#: pumpio.php:587 +msgid "Pump.io like failed. Queued for retry." +msgstr "Invio 'mi piace' a pump.io fallito. In attesa di riprovare." + +#: pumpio.php:875 msgid "status" msgstr "stato" -#: pumpio.php:924 +#: pumpio.php:879 #, php-format msgid "%1$s likes %2$s's %3$s" msgstr "a %1$s piace %2$s di %3$s" diff --git a/pumpio/lang/it/strings.php b/pumpio/lang/it/strings.php index 512d3e7f..8721222c 100644 --- a/pumpio/lang/it/strings.php +++ b/pumpio/lang/it/strings.php @@ -3,23 +3,25 @@ if(! function_exists("string_plural_select_it")) { function string_plural_select_it($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} $a->strings['Permission denied.'] = 'Permesso negato.'; $a->strings['Unable to register the client at the pump.io server \'%s\'.'] = 'Impossibile registrare il client sul server pump.io \'%s\''; $a->strings['You are now authenticated to pumpio.'] = 'Sei autenticato su pump.io'; $a->strings['return to the connector page'] = 'ritorna alla pagina del connettore'; $a->strings['Post to pumpio'] = 'Invia a pump.io'; -$a->strings['Save Settings'] = 'Salva Impostazioni'; -$a->strings['Delete this preset'] = 'Elimina questa preimpostazione'; +$a->strings['Pump.io Import/Export/Mirror'] = 'Esporta/Importa/Clona pump.io'; +$a->strings['pump.io username (without the servername)'] = 'nome utente pump.io (senza il nome del server)'; +$a->strings['pump.io servername (without "http://" or "https://" )'] = 'nome del server pump.io (senza "http://" o "https://")'; $a->strings['Authenticate your pump.io connection'] = 'Autentica la tua connessione pump.io'; -$a->strings['Pump.io servername (without "http://" or "https://" )'] = 'Nome server Pump.io (senza "http://" o "https://" )'; -$a->strings['Pump.io username (without the servername)'] = 'Nome utente Pump.io (senza nome server)'; $a->strings['Import the remote timeline'] = 'Importa la timeline remota'; -$a->strings['Enable Pump.io Post Addon'] = 'Abilita componente aggiuntivo di pubblicazione Pump.io'; -$a->strings['Post to Pump.io by default'] = 'Pubblica su Pump.io per impostazione predefinita'; +$a->strings['Enable pump.io Post Addon'] = 'Abilita il componente aggiuntivo di invio ad pump.io'; +$a->strings['Post to pump.io by default'] = 'Invia sempre a pump.io'; $a->strings['Should posts be public?'] = 'I messaggi devono essere pubblici?'; $a->strings['Mirror all public posts'] = 'Clona tutti i messaggi pubblici'; -$a->strings['Pump.io Import/Export/Mirror'] = 'Esporta/Importa/Clona pump.io'; +$a->strings['Check to delete this preset'] = 'Seleziona per elimiare queto preset'; +$a->strings['Save Settings'] = 'Salva Impostazioni'; +$a->strings['Pump.io post failed. Queued for retry.'] = 'Invio a pump.io fallito. In attesa di riprovare.'; +$a->strings['Pump.io like failed. Queued for retry.'] = 'Invio \'mi piace\' a pump.io fallito. In attesa di riprovare.'; $a->strings['status'] = 'stato'; $a->strings['%1$s likes %2$s\'s %3$s'] = 'a %1$s piace %2$s di %3$s'; diff --git a/pumpio/lang/ru/messages.po b/pumpio/lang/ru/messages.po deleted file mode 100644 index a847a856..00000000 --- a/pumpio/lang/ru/messages.po +++ /dev/null @@ -1,93 +0,0 @@ -# ADDON pumpio -# Copyright (C) -# This file is distributed under the same license as the Friendica pumpio addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:50-0400\n" -"PO-Revision-Date: 2014-06-23 11:30+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Russian (http://app.transifex.com/Friendica/friendica/language/ru/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" - -#: pumpio.php:62 -msgid "Permission denied." -msgstr "" - -#: pumpio.php:156 -#, php-format -msgid "Unable to register the client at the pump.io server '%s'." -msgstr "" - -#: pumpio.php:196 -msgid "You are now authenticated to pumpio." -msgstr "" - -#: pumpio.php:197 -msgid "return to the connector page" -msgstr "" - -#: pumpio.php:217 -msgid "Post to pumpio" -msgstr "" - -#: pumpio.php:241 -msgid "Save Settings" -msgstr "" - -#: pumpio.php:243 -msgid "Delete this preset" -msgstr "" - -#: pumpio.php:249 -msgid "Authenticate your pump.io connection" -msgstr "" - -#: pumpio.php:256 -msgid "Pump.io servername (without \"http://\" or \"https://\" )" -msgstr "" - -#: pumpio.php:257 -msgid "Pump.io username (without the servername)" -msgstr "" - -#: pumpio.php:258 -msgid "Import the remote timeline" -msgstr "" - -#: pumpio.php:259 -msgid "Enable Pump.io Post Addon" -msgstr "" - -#: pumpio.php:260 -msgid "Post to Pump.io by default" -msgstr "" - -#: pumpio.php:261 -msgid "Should posts be public?" -msgstr "" - -#: pumpio.php:262 -msgid "Mirror all public posts" -msgstr "" - -#: pumpio.php:267 -msgid "Pump.io Import/Export/Mirror" -msgstr "" - -#: pumpio.php:924 -msgid "status" -msgstr "" - -#: pumpio.php:928 -#, php-format -msgid "%1$s likes %2$s's %3$s" -msgstr "" diff --git a/pumpio/lang/ru/strings.php b/pumpio/lang/ru/strings.php deleted file mode 100644 index 0579fc21..00000000 --- a/pumpio/lang/ru/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; } -}} diff --git a/pumpio/oauth/http.php b/pumpio/oauth/http.php index 3045e509..5d5e23f0 100644 --- a/pumpio/oauth/http.php +++ b/pumpio/oauth/http.php @@ -109,11 +109,9 @@ class http_class var $connected_port = -1; var $connected_ssl = 0; - private $content_length_set; - /* Private methods - DO NOT CALL */ - private function Tokenize($string,$separator="") + Function Tokenize($string,$separator="") { if(!strcmp($separator,"")) { @@ -137,18 +135,18 @@ class http_class } } - private function CookieEncode($value, $name) + Function CookieEncode($value, $name) { return($name ? str_replace("=", "%25", $value) : str_replace(";", "%3B", $value)); } - private function SetError($error, $error_code = HTTP_CLIENT_ERROR_UNSPECIFIED_ERROR) + Function SetError($error, $error_code = HTTP_CLIENT_ERROR_UNSPECIFIED_ERROR) { $this->error_code = $error_code; return($this->error=$error); } - private function SetPHPError($error, &$php_error_message, $error_code = HTTP_CLIENT_ERROR_UNSPECIFIED_ERROR) + Function SetPHPError($error, &$php_error_message, $error_code = HTTP_CLIENT_ERROR_UNSPECIFIED_ERROR) { if(IsSet($php_error_message) && strlen($php_error_message)) @@ -156,7 +154,7 @@ class http_class return($this->SetError($error, $error_code)); } - private function SetDataAccessError($error,$check_connection=0) + Function SetDataAccessError($error,$check_connection=0) { $this->error=$error; $this->error_code = HTTP_CLIENT_ERROR_COMMUNICATION_FAILURE; @@ -176,7 +174,7 @@ class http_class } } - private function OutputDebug($message) + Function OutputDebug($message) { if($this->log_debug) error_log($message); @@ -190,7 +188,7 @@ class http_class } } - private function GetLine() + Function GetLine() { for($line="";;) { @@ -229,7 +227,7 @@ class http_class } } - private function PutLine($line) + Function PutLine($line) { if($this->debug) $this->OutputDebug("C $line"); @@ -241,7 +239,7 @@ class http_class return(1); } - private function PutData($data) + Function PutData($data) { if(strlen($data)) { @@ -256,7 +254,7 @@ class http_class return(1); } - private function FlushData() + Function FlushData() { if(!fflush($this->connection)) { @@ -266,7 +264,7 @@ class http_class return(1); } - private function ReadChunkSize() + Function ReadChunkSize() { if($this->remaining_chunk==0) { @@ -291,7 +289,7 @@ class http_class return(""); } - private function ReadBytes($length) + Function ReadBytes($length) { if($this->use_curl) { @@ -358,7 +356,7 @@ class http_class return($bytes); } - private function EndOfInput() + Function EndOfInput() { if($this->use_curl) return($this->read_response>=strlen($this->response)); @@ -369,7 +367,7 @@ class http_class return(feof($this->connection)); } - private function Resolve($domain, &$ip, $server_type) + Function Resolve($domain, &$ip, $server_type) { if(preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/',$domain)) $ip=$domain; @@ -387,7 +385,7 @@ class http_class return(''); } - private function Connect($host_name, $host_port, $ssl, $server_type = 'HTTP') + Function Connect($host_name, $host_port, $ssl, $server_type = 'HTTP') { $domain=$host_name; $port = $host_port; @@ -554,7 +552,7 @@ class http_class } } - private function Disconnect() + Function Disconnect() { if($this->debug) $this->OutputDebug("Disconnected from ".$this->connected_host); @@ -571,7 +569,7 @@ class http_class /* Public methods */ - public function GetRequestArguments($url, &$arguments) + Function GetRequestArguments($url, &$arguments) { $this->error = ''; $this->error_code = HTTP_CLIENT_ERROR_NO_ERROR; @@ -623,7 +621,7 @@ class http_class return(""); } - public function Open($arguments) + Function Open($arguments) { if(strlen($this->error)) return($this->error); @@ -752,7 +750,7 @@ class http_class return(""); } - public function Close($force = 0) + Function Close($force = 0) { if($this->state=="Disconnected") return("1 already disconnected"); @@ -769,7 +767,7 @@ class http_class return($this->Disconnect()); } - private function PickCookies(&$cookies,$secure) + Function PickCookies(&$cookies,$secure) { if(IsSet($this->cookies[$secure])) { @@ -805,7 +803,7 @@ class http_class } } - private function GetFileDefinition($file, &$definition) + Function GetFileDefinition($file, &$definition) { $name=""; if(IsSet($file["FileName"])) @@ -992,6 +990,9 @@ class http_class if(GetType($length=@filesize($file["FileName"]))!="integer") { $error="it was not possible to determine the length of the file ".$file["FileName"]; + if(IsSet($php_errormsg) + && strlen($php_errormsg)) + $error.=": ".$php_errormsg; if(!file_exists($file["FileName"])) $error="it was not possible to access the file ".$file["FileName"]; return($error); @@ -1006,7 +1007,7 @@ class http_class return(""); } - private function ConnectFromProxy($arguments, &$headers) + Function ConnectFromProxy($arguments, &$headers) { if(!$this->PutLine('CONNECT '.$this->host_name.':'.($this->host_port ? $this->host_port : 443).' HTTP/1.0') || (strlen($this->user_agent) @@ -1051,7 +1052,7 @@ class http_class return(""); } - public function SendRequest($arguments) + Function SendRequest($arguments) { if(strlen($this->error)) return($this->error); @@ -1439,7 +1440,7 @@ class http_class return(""); } - private function SetCookie($name, $value, $expires="" , $path="/" , $domain="" , $secure=0, $verbatim=0) + Function SetCookie($name, $value, $expires="" , $path="/" , $domain="" , $secure=0, $verbatim=0) { if(strlen($this->error)) return($this->error); @@ -1471,7 +1472,7 @@ class http_class return(""); } - private function SendRequestBody($data, $end_of_data) + Function SendRequestBody($data, $end_of_data) { if(strlen($this->error)) return($this->error); @@ -1507,7 +1508,7 @@ class http_class return(""); } - private function ReadReplyHeadersResponse(&$headers) + Function ReadReplyHeadersResponse(&$headers) { $headers=array(); if(strlen($this->error)) @@ -1634,7 +1635,7 @@ class http_class return(""); } - private function Redirect(&$headers) + Function Redirect(&$headers) { if($this->follow_redirect) { @@ -1677,7 +1678,7 @@ class http_class return(""); } - private function Authenticate(&$headers, $proxy, &$proxy_authorization, &$user, &$password, &$realm, &$workstation) + Function Authenticate(&$headers, $proxy, &$proxy_authorization, &$user, &$password, &$realm, &$workstation) { if($proxy) { @@ -1696,10 +1697,9 @@ class http_class if(IsSet($headers[$authenticate_header]) && $this->sasl_authenticate) { - if(!class_exists('sasl_client_class')) - { + if(function_exists("class_exists") + && !class_exists("sasl_client_class")) return($this->SetError("the SASL client class needs to be loaded to be able to authenticate".($proxy ? " with the proxy server" : "")." and access this site", HTTP_CLIENT_ERROR_INVALID_PARAMETERS)); - } if(GetType($headers[$authenticate_header])=="array") $authenticate=$headers[$authenticate_header]; else @@ -1719,7 +1719,7 @@ class http_class else $mechanisms[]=$mechanism; } - $sasl=new \sasl_client_class(); + $sasl=new sasl_client_class; if(IsSet($user)) $sasl->SetCredential("user",$user); if(IsSet($password)) @@ -1731,8 +1731,6 @@ class http_class $sasl->SetCredential("uri",$this->request_uri); $sasl->SetCredential("method",$this->request_method); $sasl->SetCredential("session",$this->session); - $message = ''; - $interactions = []; do { $status=$sasl->Start($mechanisms,$message,$interactions); @@ -1908,8 +1906,8 @@ class http_class } return(""); } - - public function ReadReplyHeaders(&$headers) + + Function ReadReplyHeaders(&$headers) { if(strlen($error=$this->ReadReplyHeadersResponse($headers))) return($error); @@ -1940,7 +1938,7 @@ class http_class return(""); } - private function ReadReplyBody(&$body,$length) + Function ReadReplyBody(&$body,$length) { $body=""; if(strlen($this->error)) @@ -1982,7 +1980,7 @@ class http_class return(""); } - public function ReadWholeReplyBody(&$body) + Function ReadWholeReplyBody(&$body) { $body = ''; for(;;) @@ -1995,7 +1993,7 @@ class http_class } } - private function SaveCookies(&$cookies, $domain='', $secure_only=0, $persistent_only=0) + Function SaveCookies(&$cookies, $domain='', $secure_only=0, $persistent_only=0) { $now=gmdate("Y-m-d H-i-s"); $cookies=array(); @@ -2036,17 +2034,17 @@ class http_class } } - private function SavePersistentCookies(&$cookies, $domain='', $secure_only=0) + Function SavePersistentCookies(&$cookies, $domain='', $secure_only=0) { $this->SaveCookies($cookies, $domain, $secure_only, 1); } - private function GetPersistentCookies(&$cookies, $domain='', $secure_only=0) + Function GetPersistentCookies(&$cookies, $domain='', $secure_only=0) { $this->SavePersistentCookies($cookies, $domain, $secure_only); } - private function RestoreCookies($cookies, $clear=1) + Function RestoreCookies($cookies, $clear=1) { $new_cookies=($clear ? array() : $this->cookies); for($secure_cookies=0, Reset($cookies); $secure_cookies */ +use Friendica\App; use Friendica\Content\Text\BBCode; use Friendica\Content\Text\HTML; +use Friendica\Core\Addon; use Friendica\Core\Hook; +use Friendica\Core\Logger; use Friendica\Core\Protocol; use Friendica\Core\Renderer; use Friendica\Core\Worker; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Contact; -use Friendica\Model\Circle; +use Friendica\Model\Group; use Friendica\Model\Item; use Friendica\Model\Post; use Friendica\Model\User; @@ -93,7 +96,7 @@ function pumpio_registerclient($host) $application_name = DI::config()->get('pumpio', 'application_name'); if ($application_name == '') { - $application_name = DI::baseUrl()->getHost(); + $application_name = DI::baseUrl()->getHostname(); } $firstAdmin = User::getFirstAdmin(['email']); @@ -102,10 +105,10 @@ function pumpio_registerclient($host) $params['contacts'] = $firstAdmin['email']; $params['application_type'] = 'native'; $params['application_name'] = $application_name; - $params['logo_url'] = DI::baseUrl() . '/images/friendica-256.png'; - $params['redirect_uris'] = DI::baseUrl() . '/pumpio/connect'; + $params['logo_url'] = DI::baseUrl()->get() . '/images/friendica-256.png'; + $params['redirect_uris'] = DI::baseUrl()->get() . '/pumpio/connect'; - DI::logger()->info('pumpio_registerclient: ' . $url . ' parameters', $params); + Logger::info('pumpio_registerclient: ' . $url . ' parameters', $params); // @TODO Rewrite this to our own HTTP client $ch = curl_init($url); @@ -120,10 +123,10 @@ function pumpio_registerclient($host) if ($curl_info['http_code'] == '200') { $values = json_decode($s); - DI::logger()->info('pumpio_registerclient: success ', (array)$values); + Logger::info('pumpio_registerclient: success ', (array)$values); return $values; } - DI::logger()->info('pumpio_registerclient: failed: ', $curl_info); + Logger::info('pumpio_registerclient: failed: ', $curl_info); return false; } @@ -136,7 +139,7 @@ function pumpio_connect() $hostname = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'pumpio', 'host'); if ((($consumer_key == '') || ($consumer_secret == '')) && ($hostname != '')) { - DI::logger()->notice('pumpio_connect: register client'); + Logger::notice('pumpio_connect: register client'); $clientdata = pumpio_registerclient($hostname); DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'pumpio', 'consumer_key', $clientdata->client_id); DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'pumpio', 'consumer_secret', $clientdata->client_secret); @@ -144,17 +147,17 @@ function pumpio_connect() $consumer_key = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'pumpio', 'consumer_key'); $consumer_secret = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'pumpio', 'consumer_secret'); - DI::logger()->info('pumpio_connect: ckey: ' . $consumer_key . ' csecrect: ' . $consumer_secret); + Logger::info('pumpio_connect: ckey: ' . $consumer_key . ' csecrect: ' . $consumer_secret); } if (($consumer_key == '') || ($consumer_secret == '')) { - DI::logger()->notice('pumpio_connect: '.sprintf('Unable to register the client at the pump.io server "%s".', $hostname)); + Logger::notice('pumpio_connect: '.sprintf('Unable to register the client at the pump.io server "%s".', $hostname)); return DI::l10n()->t("Unable to register the client at the pump.io server '%s'.", $hostname); } // The callback URL is the script that gets called after the user authenticates with pumpio - $callback_url = DI::baseUrl() . '/pumpio/connect'; + $callback_url = DI::baseUrl()->get() . '/pumpio/connect'; // Let's begin. First we need a Request Token. The request token is required to send the user // to pumpio's login page. @@ -177,7 +180,7 @@ function pumpio_connect() if (($success = $client->Initialize())) { if (($success = $client->Process())) { if (strlen($client->access_token)) { - DI::logger()->info('pumpio_connect: otoken: ' . $client->access_token . ', osecrect: ' . $client->access_token_secret); + Logger::info('pumpio_connect: otoken: ' . $client->access_token . ', osecrect: ' . $client->access_token_secret); DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'pumpio', 'oauth_token', $client->access_token); DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'pumpio', 'oauth_token_secret', $client->access_token_secret); } @@ -189,11 +192,11 @@ function pumpio_connect() } if ($success) { - DI::logger()->notice('pumpio_connect: authenticated'); + Logger::notice('pumpio_connect: authenticated'); $o = DI::l10n()->t('You are now authenticated to pumpio.'); - $o .= '
' . DI::l10n()->t('return to the connector page') . ''; + $o .= '
' . DI::l10n()->t('return to the connector page') . ''; } else { - DI::logger()->notice('pumpio_connect: could not connect'); + Logger::notice('pumpio_connect: could not connect'); $o = 'Could not connect to pumpio. Refresh the page or try again later.'; } @@ -249,7 +252,7 @@ function pumpio_settings(array &$data) '$pumpio_user' => $pumpio_user, '$oauth_token' => $oauth_token, '$oauth_token_secret' => $oauth_token_secret, - '$authenticate_url' => DI::baseUrl() . '/pumpio/connect', + '$authenticate_url' => DI::baseUrl()->get() . '/pumpio/connect', '$servername' => ['pumpio_host', DI::l10n()->t('Pump.io servername (without "http://" or "https://" )'), $pumpio_host], '$username' => ['pumpio_user', DI::l10n()->t('Pump.io username (without the servername)'), $pumpio_user], '$import' => ['pumpio_import', DI::l10n()->t('Import the remote timeline'), $import_enabled], @@ -317,7 +320,7 @@ function pumpio_settings_post(array &$b) function pumpio_load_config(ConfigFileManager $loader) { - DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('pumpio'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); + DI::app()->getConfigCache()->load($loader->loadAddonConfig('pumpio'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } function pumpio_hook_fork(array &$b) @@ -342,14 +345,14 @@ function pumpio_hook_fork(array &$b) if (DI::pConfig()->get($post['uid'], 'pumpio', 'import')) { // Don't fork if it isn't a reply to a pump.io post - if (($post['gravity'] != Item::GRAVITY_PARENT) && !Post::exists(['id' => $post['parent'], 'network' => Protocol::PUMPIO])) { - DI::logger()->notice('No pump.io parent found for item ' . $post['id']); + if (($post['parent'] != $post['id']) && !Post::exists(['id' => $post['parent'], 'network' => Protocol::PUMPIO])) { + Logger::notice('No pump.io parent found for item ' . $post['id']); $b['execute'] = false; return; } } else { // Comments are never exported when we don't import the pumpio timeline - if (!strstr($post['postopts'], 'pumpio') || ($post['gravity'] != Item::GRAVITY_PARENT)|| ($post['private'] == Item::PRIVATE)) { + if (!strstr($post['postopts'], 'pumpio') || ($post['parent'] != $post['id']) || $post['private']) { $b['execute'] = false; return; } @@ -387,11 +390,7 @@ function pumpio_send(array &$b) return; } - if (Item::isGroupPost($b['uri-id'])) { - return; - } - - DI::logger()->debug('pumpio_send: parameter ', $b); + Logger::debug('pumpio_send: parameter ', $b); $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], DI::contentItem()->addSharedPost($b)); @@ -401,7 +400,7 @@ function pumpio_send(array &$b) $orig_post = Post::selectFirst([], $condition); if (!DBA::isResult($orig_post)) { - DI::logger()->notice('pumpio_send: no pumpio post ' . $b['parent']); + Logger::notice('pumpio_send: no pumpio post ' . $b['parent']); return; } else { $iscomment = true; @@ -411,14 +410,14 @@ function pumpio_send(array &$b) $receiver = pumpio_getreceiver($b); - DI::logger()->notice('pumpio_send: receiver ', $receiver); + Logger::notice('pumpio_send: receiver ', $receiver); - if (!count($receiver) && ($b['private'] == Item::PRIVATE) || !strstr($b['postopts'], 'pumpio')) { + if (!count($receiver) && ($b['private'] || !strstr($b['postopts'], 'pumpio'))) { return; } // Dont't post if the post doesn't belong to us. - // This is a check for group postings + // This is a check for forum postings $self = User::getOwnerDataById($b['uid']); if ($b['contact-id'] != $self['id']) { return; @@ -545,13 +544,13 @@ function pumpio_send(array &$b) } $post_id = $user->object->id; - DI::logger()->notice('pumpio_send ' . $username . ': success ' . $post_id); + Logger::notice('pumpio_send ' . $username . ': success ' . $post_id); if ($post_id && $iscomment) { - DI::logger()->notice('pumpio_send ' . $username . ': Update extid ' . $post_id . ' for post id ' . $b['id']); + Logger::notice('pumpio_send ' . $username . ': Update extid ' . $post_id . ' for post id ' . $b['id']); Item::update(['extid' => $post_id], ['id' => $b['id']]); } } else { - DI::logger()->notice('pumpio_send '.$username.': '.$url.' general error: ' . print_r($user, true)); + Logger::notice('pumpio_send '.$username.': '.$url.' general error: ' . print_r($user, true)); Worker::defer(); } } @@ -583,8 +582,6 @@ function pumpio_action(int $uid, string $uri, string $action, string $content = $uri = $orig_post['uri']; } - $objectType = ''; - if (($orig_post['object-type'] != '') && (strstr($orig_post['object-type'], ActivityNamespace::ACTIVITY_SCHEMA))) { $objectType = str_replace(ActivityNamespace::ACTIVITY_SCHEMA, '', $orig_post['object-type']); } elseif (strstr($uri, '/api/comment/')) { @@ -621,18 +618,16 @@ function pumpio_action(int $uid, string $uri, string $action, string $content = } if ($success) { - DI::logger()->notice('pumpio_action '.$username.' '.$action.': success '.$uri); + Logger::notice('pumpio_action '.$username.' '.$action.': success '.$uri); } else { - DI::logger()->notice('pumpio_action '.$username.' '.$action.': general error: '.$uri); + Logger::notice('pumpio_action '.$username.' '.$action.': general error: '.$uri); Worker::defer(); } } function pumpio_sync() { - $addonHelper = DI::addonHelper(); - - if (!$addonHelper->isAddonEnabled('pumpio')) { + if (!Addon::isEnabled('pumpio')) { return; } @@ -643,15 +638,15 @@ function pumpio_sync() if ($last) { $next = $last + ($poll_interval * 60); if ($next > time()) { - DI::logger()->notice('pumpio: poll intervall not reached'); + Logger::notice('pumpio: poll intervall not reached'); return; } } - DI::logger()->notice('pumpio: cron_start'); + Logger::notice('pumpio: cron_start'); $pconfigs = DBA::selectToArray('pconfig', ['uid'], ['cat' => 'pumpio', 'k' => 'mirror', 'v' => '1']); foreach ($pconfigs as $rr) { - DI::logger()->notice('pumpio: mirroring user '.$rr['uid']); + Logger::notice('pumpio: mirroring user '.$rr['uid']); pumpio_fetchtimeline($rr['uid']); } @@ -666,12 +661,12 @@ function pumpio_sync() foreach ($pconfigs as $rr) { if ($abandon_days != 0) { if (DBA::exists('user', ["uid = ? AND `login_date` >= ?", $rr['uid'], $abandon_limit])) { - DI::logger()->notice('abandoned account: timeline from user '.$rr['uid'].' will not be imported'); + Logger::notice('abandoned account: timeline from user '.$rr['uid'].' will not be imported'); continue; } } - DI::logger()->notice('pumpio: importing timeline from user '.$rr['uid']); + Logger::notice('pumpio: importing timeline from user '.$rr['uid']); pumpio_fetchinbox($rr['uid']); // check for new contacts once a day @@ -688,7 +683,7 @@ function pumpio_sync() } } - DI::logger()->notice('pumpio: cron_end'); + Logger::notice('pumpio: cron_end'); DI::keyValue()->set('pumpio_last_poll', time()); } @@ -716,7 +711,7 @@ function pumpio_fetchtimeline(int $uid) $application_name = DI::config()->get('pumpio', 'application_name'); } if ($application_name == '') { - $application_name = DI::baseUrl()->getHost(); + $application_name = DI::baseUrl()->getHostname(); } $first_time = ($lastdate == ''); @@ -733,7 +728,7 @@ function pumpio_fetchtimeline(int $uid) $url = 'https://'.$hostname.'/api/user/'.$username.'/feed/major'; - DI::logger()->notice('pumpio: fetching for user ' . $uid . ' ' . $url . ' C:' . $client->client_id . ' CS:' . $client->client_secret . ' T:' . $client->access_token . ' TS:' . $client->access_token_secret); + Logger::notice('pumpio: fetching for user ' . $uid . ' ' . $url . ' C:' . $client->client_id . ' CS:' . $client->client_secret . ' T:' . $client->access_token . ' TS:' . $client->access_token_secret); $useraddr = $username.'@'.$hostname; @@ -745,7 +740,7 @@ function pumpio_fetchtimeline(int $uid) } if (!$success) { - DI::logger()->notice('pumpio: error fetching posts for user ' . $uid . ' ' . $useraddr . ' ', $user); + Logger::notice('pumpio: error fetching posts for user ' . $uid . ' ' . $useraddr . ' ', $user); return; } @@ -805,11 +800,11 @@ function pumpio_fetchtimeline(int $uid) } } - DI::logger()->notice('pumpio: posting for user ' . $uid); + Logger::notice('pumpio: posting for user ' . $uid); Item::insert($postarray, true); - DI::logger()->notice('pumpio: posting done - user ' . $uid); + Logger::notice('pumpio: posting done - user ' . $uid); } } } @@ -832,7 +827,6 @@ function pumpio_dounlike(int $uid, array $self, $post, string $own_id) } $contactid = 0; - $contact = []; if (Strings::compareLink($post->actor->url, $own_id)) { $contactid = $self['id']; @@ -850,16 +844,16 @@ function pumpio_dounlike(int $uid, array $self, $post, string $own_id) Item::markForDeletion(['verb' => Activity::LIKE, 'uid' => $uid, 'contact-id' => $contactid, 'thr-parent' => $orig_post['uri']]); if (DBA::isResult($contact)) { - DI::logger()->notice('pumpio_dounlike: unliked existing like. User ' . $own_id . ' ' . $uid . ' Contact: ' . $contactid . ' URI ' . $orig_post['uri']); + Logger::notice('pumpio_dounlike: unliked existing like. User ' . $own_id . ' ' . $uid . ' Contact: ' . $contactid . ' URI ' . $orig_post['uri']); } else { - DI::logger()->notice('pumpio_dounlike: not found. User ' . $own_id . ' ' . $uid . ' Contact: ' . $contactid . ' Url ' . $orig_post['uri']); + Logger::notice('pumpio_dounlike: not found. User ' . $own_id . ' ' . $uid . ' Contact: ' . $contactid . ' Url ' . $orig_post['uri']); } } function pumpio_dolike(int $uid, array $self, $post, string $own_id, $threadcompletion = true) { if (empty($post->object->id)) { - DI::logger()->info('Got empty like: '.print_r($post, true)); + Logger::info('Got empty like: '.print_r($post, true)); return; } @@ -904,7 +898,7 @@ function pumpio_dolike(int $uid, array $self, $post, string $own_id, $threadcomp ]; if (Post::exists($condition)) { - DI::logger()->notice('pumpio_dolike: found existing like. User ' . $own_id . ' ' . $uid . ' Contact: ' . $contactid . ' URI ' . $orig_post['uri']); + Logger::notice('pumpio_dolike: found existing like. User ' . $own_id . ' ' . $uid . ' Contact: ' . $contactid . ' URI ' . $orig_post['uri']); return; } @@ -938,7 +932,7 @@ function pumpio_dolike(int $uid, array $self, $post, string $own_id, $threadcomp $ret = Item::insert($likedata); - DI::logger()->notice('pumpio_dolike: ' . $ret . ' User ' . $own_id . ' ' . $uid . ' Contact: ' . $contactid . ' URI ' . $orig_post['uri']); + Logger::notice('pumpio_dolike: ' . $ret . ' User ' . $own_id . ' ' . $uid . ' Contact: ' . $contactid . ' URI ' . $orig_post['uri']); } function pumpio_get_contact($uid, $contact, $no_insert = false) @@ -982,7 +976,7 @@ function pumpio_get_contact($uid, $contact, $no_insert = false) $contact_id = $r['id']; - Circle::addMember(User::getDefaultCircle($uid), $contact_id); + Group::addMember(User::getDefaultGroup($uid), $contact_id); } else { $contact_id = $r['id']; } @@ -1325,7 +1319,7 @@ function pumpio_getreceiver(array $b) { $receiver = []; - if ($b['private'] != Item::PRIVATE) { + if (!$b['private']) { if (!strstr($b['postopts'], 'pumpio')) { return $receiver; } @@ -1359,8 +1353,8 @@ function pumpio_getreceiver(array $b) $gid = trim($gid, ' <>'); $contacts = DBA::p("SELECT `contact`.`name`, `contact`.`nick`, `contact`.`url`, `contact`.`network` - FROM `group_member` AS `circle_member`, `contact` WHERE `circle_member`.`gid` = ? - AND `contact`.`id` = `circle_member`.`contact-id` AND `contact`.`network` = ?", + FROM `group_member`, `contact` WHERE `group_member`.`gid` = ? + AND `contact`.`id` = `group_member`.`contact-id` AND `contact`.`network` = ?", $gid, Protocol::PUMPIO); while ($row = DBA::fetch($contacts)) { @@ -1409,7 +1403,7 @@ function pumpio_fetchallcomments($uid, $id) $hostname = DI::pConfig()->get($uid, 'pumpio', 'host'); $username = DI::pConfig()->get($uid, 'pumpio', 'user'); - DI::logger()->notice('pumpio_fetchallcomments: completing comment for user ' . $uid . ' post id ' . $id); + Logger::notice('pumpio_fetchallcomments: completing comment for user ' . $uid . ' post id ' . $id); $own_id = 'https://' . $hostname . '/' . $username; @@ -1434,9 +1428,7 @@ function pumpio_fetchallcomments($uid, $id) $client->access_token = $otoken; $client->access_token_secret = $osecret; - DI::logger()->notice('pumpio_fetchallcomments: fetching comment for user ' . $uid . ', URL ' . $url); - - $item = new \stdClass(); + Logger::notice('pumpio_fetchallcomments: fetching comment for user ' . $uid . ', URL ' . $url); if (pumpio_reachable($url)) { $success = $client->CallAPI($url, 'GET', [], ['FailOnAccessError' => true], $item); @@ -1499,7 +1491,7 @@ function pumpio_fetchallcomments($uid, $id) $post->object = $item; - DI::logger()->notice('pumpio_fetchallcomments: posting comment ' . $post->object->id . ' ', json_decode(json_encode($post), true)); + Logger::notice('pumpio_fetchallcomments: posting comment ' . $post->object->id . ' ', json_decode(json_encode($post), true)); pumpio_dopost($client, $uid, $self, $post, $own_id, false); } } diff --git a/pumpio/pumpio_sync.php b/pumpio/pumpio_sync.php index 09548c6d..beaf6e81 100644 --- a/pumpio/pumpio_sync.php +++ b/pumpio/pumpio_sync.php @@ -1,5 +1,5 @@ DI::config()->get('system', 'maxloadavg', 50)) { - DI::logger()->notice('system: load ' . $load[0] . ' too high. Pumpio sync deferred to next scheduled run.'); + Logger::notice('system: load ' . $load[0] . ' too high. Pumpio sync deferred to next scheduled run.'); return; } } diff --git a/qcomment/lang/bg/messages.po b/qcomment/lang/bg/messages.po deleted file mode 100644 index d0b6c4b7..00000000 --- a/qcomment/lang/bg/messages.po +++ /dev/null @@ -1,45 +0,0 @@ -# ADDON qcomment -# Copyright (C) -# This file is distributed under the same license as the Friendica qcomment addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:16-0500\n" -"PO-Revision-Date: 2014-06-23 12:30+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: qcomment.php:45 -msgid ":-)" -msgstr "" - -#: qcomment.php:45 -msgid ":-(" -msgstr "" - -#: qcomment.php:45 -msgid "lol" -msgstr "" - -#: qcomment.php:49 -msgid "" -"Quick comments are found near comment boxes, sometimes hidden. Click them to" -" provide simple replies." -msgstr "" - -#: qcomment.php:50 -msgid "Enter quick comments, one per line" -msgstr "" - -#: qcomment.php:55 -msgid "Quick Comment Settings" -msgstr "" diff --git a/qcomment/lang/bg/strings.php b/qcomment/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/qcomment/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: qcomment.php:45 -msgid ":-)" -msgstr "" - -#: qcomment.php:45 -msgid ":-(" -msgstr "" - -#: qcomment.php:45 -msgid "lol" -msgstr "" - -#: qcomment.php:49 -msgid "" -"Quick comments are found near comment boxes, sometimes hidden. Click them to" -" provide simple replies." -msgstr "" - -#: qcomment.php:50 -msgid "Enter quick comments, one per line" -msgstr "" - -#: qcomment.php:55 -msgid "Quick Comment Settings" -msgstr "" diff --git a/qcomment/lang/ca/strings.php b/qcomment/lang/ca/strings.php index d34874f6..257e9fe3 100644 --- a/qcomment/lang/ca/strings.php +++ b/qcomment/lang/ca/strings.php @@ -1,7 +1,10 @@ -strings[":-)"] = ":-)"; +$a->strings[":-("] = ":-("; +$a->strings["lol"] = "lol"; +$a->strings["Quick Comment Settings"] = "Configuració Ràpida dels Comentaris"; +$a->strings["Quick comments are found near comment boxes, sometimes hidden. Click them to provide simple replies."] = "Comentaris ràpids es troben prop de les caixes de comentaris, de vegades ocults. Feu clic a ells per donar respostes simples."; +$a->strings["Enter quick comments, one per line"] = "Introduïu els comentaris ràpids, un per línia"; +$a->strings["Submit"] = "Enviar"; +$a->strings["Quick Comment settings saved."] = "Guardada la configuració de comentaris ràpids."; diff --git a/qcomment/lang/cs/messages.po b/qcomment/lang/cs/messages.po index deb0b4ec..d2a204e3 100644 --- a/qcomment/lang/cs/messages.po +++ b/qcomment/lang/cs/messages.po @@ -10,38 +10,46 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:16-0500\n" -"PO-Revision-Date: 2014-06-23 12:30+0000\n" -"Last-Translator: Aditoo, 2018\n" -"Language-Team: Czech (http://app.transifex.com/Friendica/friendica/language/cs/)\n" +"POT-Creation-Date: 2013-02-27 05:01-0500\n" +"PO-Revision-Date: 2018-06-13 18:00+0000\n" +"Last-Translator: Aditoo\n" +"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" "Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" -#: qcomment.php:45 +#: qcomment.php:51 msgid ":-)" msgstr ":-)" -#: qcomment.php:45 +#: qcomment.php:51 msgid ":-(" msgstr ":-(" -#: qcomment.php:45 +#: qcomment.php:51 msgid "lol" msgstr "lol" -#: qcomment.php:49 +#: qcomment.php:54 +msgid "Quick Comment Settings" +msgstr "Nastavení rychlých komentářů" + +#: qcomment.php:56 msgid "" "Quick comments are found near comment boxes, sometimes hidden. Click them to" " provide simple replies." -msgstr "Rychlé komentáře jsou k nalezení blízko polí s komentáři, někdy jsou skryté. Klikněte na ně pro poskytnutí jednoduchých odpovědí." +msgstr "Rychlé komentáře jsou k nalezení blízko polí s komentáři, někdy jsou skryté. Klikněte na ně k poskytnutí jednoduchých odpovědí." -#: qcomment.php:50 +#: qcomment.php:57 msgid "Enter quick comments, one per line" msgstr "Zadejte rychlé komentáře, každý na nový řádek" -#: qcomment.php:55 -msgid "Quick Comment Settings" -msgstr "Nastavení rychlých komentářů" +#: qcomment.php:61 +msgid "Submit" +msgstr "Odeslat" + +#: qcomment.php:75 +msgid "Quick Comment settings saved." +msgstr "Nastavení Quick Comment uloženo." diff --git a/qcomment/lang/cs/strings.php b/qcomment/lang/cs/strings.php index 08df5fb4..3d70952f 100644 --- a/qcomment/lang/cs/strings.php +++ b/qcomment/lang/cs/strings.php @@ -8,6 +8,8 @@ function string_plural_select_cs($n){ $a->strings[':-)'] = ':-)'; $a->strings[':-('] = ':-('; $a->strings['lol'] = 'lol'; -$a->strings['Quick comments are found near comment boxes, sometimes hidden. Click them to provide simple replies.'] = 'Rychlé komentáře jsou k nalezení blízko polí s komentáři, někdy jsou skryté. Klikněte na ně pro poskytnutí jednoduchých odpovědí.'; -$a->strings['Enter quick comments, one per line'] = 'Zadejte rychlé komentáře, každý na nový řádek'; $a->strings['Quick Comment Settings'] = 'Nastavení rychlých komentářů'; +$a->strings['Quick comments are found near comment boxes, sometimes hidden. Click them to provide simple replies.'] = 'Rychlé komentáře jsou k nalezení blízko polí s komentáři, někdy jsou skryté. Klikněte na ně k poskytnutí jednoduchých odpovědí.'; +$a->strings['Enter quick comments, one per line'] = 'Zadejte rychlé komentáře, každý na nový řádek'; +$a->strings['Submit'] = 'Odeslat'; +$a->strings['Quick Comment settings saved.'] = 'Nastavení Quick Comment uloženo.'; diff --git a/qcomment/lang/de/messages.po b/qcomment/lang/de/messages.po index bab1515f..323ef82d 100644 --- a/qcomment/lang/de/messages.po +++ b/qcomment/lang/de/messages.po @@ -12,9 +12,9 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-11-21 19:16-0500\n" -"PO-Revision-Date: 2014-06-23 12:30+0000\n" -"Last-Translator: Steffen K9, 2021\n" -"Language-Team: German (http://app.transifex.com/Friendica/friendica/language/de/)\n" +"PO-Revision-Date: 2021-12-22 16:24+0000\n" +"Last-Translator: Transifex Bot <>\n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/qcomment/lang/eo/messages.po b/qcomment/lang/eo/messages.po deleted file mode 100644 index 4e071e53..00000000 --- a/qcomment/lang/eo/messages.po +++ /dev/null @@ -1,45 +0,0 @@ -# ADDON qcomment -# Copyright (C) -# This file is distributed under the same license as the Friendica qcomment addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:16-0500\n" -"PO-Revision-Date: 2014-06-23 12:30+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: qcomment.php:45 -msgid ":-)" -msgstr "" - -#: qcomment.php:45 -msgid ":-(" -msgstr "" - -#: qcomment.php:45 -msgid "lol" -msgstr "" - -#: qcomment.php:49 -msgid "" -"Quick comments are found near comment boxes, sometimes hidden. Click them to" -" provide simple replies." -msgstr "" - -#: qcomment.php:50 -msgid "Enter quick comments, one per line" -msgstr "" - -#: qcomment.php:55 -msgid "Quick Comment Settings" -msgstr "" diff --git a/qcomment/lang/eo/strings.php b/qcomment/lang/eo/strings.php index 68e8a64c..2c88b15f 100644 --- a/qcomment/lang/eo/strings.php +++ b/qcomment/lang/eo/strings.php @@ -1,7 +1,10 @@ -strings[":-)"] = ":-)"; +$a->strings[":-("] = ":-("; +$a->strings["lol"] = "lol"; +$a->strings["Quick Comment Settings"] = "Agordoj pri Rapidaj Komentoj"; +$a->strings["Quick comments are found near comment boxes, sometimes hidden. Click them to provide simple replies."] = "Rapidaj komentoj troviĝas apud komentkampoj, kelkfoje kaŝita. Klaku ilin por provizi simplajn rispondojn."; +$a->strings["Enter quick comments, one per line"] = "Entajpu rapidaj komentoj, po unu je linio."; +$a->strings["Submit"] = "Sendi"; +$a->strings["Quick Comment settings saved."] = "Konservis agordojn pri rapidaj komentoj."; diff --git a/qcomment/lang/et/messages.po b/qcomment/lang/et/messages.po deleted file mode 100644 index df161a8c..00000000 --- a/qcomment/lang/et/messages.po +++ /dev/null @@ -1,46 +0,0 @@ -# ADDON qcomment -# Copyright (C) -# This file is distributed under the same license as the Friendica qcomment addon package. -# -# -# Translators: -# Rain Hawk, 2020 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:16-0500\n" -"PO-Revision-Date: 2014-06-23 12:30+0000\n" -"Last-Translator: Rain Hawk, 2020\n" -"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: et\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: qcomment.php:45 -msgid ":-)" -msgstr "" - -#: qcomment.php:45 -msgid ":-(" -msgstr "" - -#: qcomment.php:45 -msgid "lol" -msgstr "" - -#: qcomment.php:49 -msgid "" -"Quick comments are found near comment boxes, sometimes hidden. Click them to" -" provide simple replies." -msgstr "" - -#: qcomment.php:50 -msgid "Enter quick comments, one per line" -msgstr "" - -#: qcomment.php:55 -msgid "Quick Comment Settings" -msgstr "" diff --git a/qcomment/lang/et/strings.php b/qcomment/lang/et/strings.php deleted file mode 100644 index dfe78358..00000000 --- a/qcomment/lang/et/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gd\n" -"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" - -#: qcomment.php:45 -msgid ":-)" -msgstr "" - -#: qcomment.php:45 -msgid ":-(" -msgstr "" - -#: qcomment.php:45 -msgid "lol" -msgstr "" - -#: qcomment.php:49 -msgid "" -"Quick comments are found near comment boxes, sometimes hidden. Click them to" -" provide simple replies." -msgstr "" - -#: qcomment.php:50 -msgid "Enter quick comments, one per line" -msgstr "" - -#: qcomment.php:55 -msgid "Quick Comment Settings" -msgstr "" diff --git a/qcomment/lang/gd/strings.php b/qcomment/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/qcomment/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/qcomment/lang/is/messages.po b/qcomment/lang/is/messages.po deleted file mode 100644 index 40e125c8..00000000 --- a/qcomment/lang/is/messages.po +++ /dev/null @@ -1,45 +0,0 @@ -# ADDON qcomment -# Copyright (C) -# This file is distributed under the same license as the Friendica qcomment addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:16-0500\n" -"PO-Revision-Date: 2014-06-23 12:30+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: is\n" -"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" - -#: qcomment.php:45 -msgid ":-)" -msgstr "" - -#: qcomment.php:45 -msgid ":-(" -msgstr "" - -#: qcomment.php:45 -msgid "lol" -msgstr "" - -#: qcomment.php:49 -msgid "" -"Quick comments are found near comment boxes, sometimes hidden. Click them to" -" provide simple replies." -msgstr "" - -#: qcomment.php:50 -msgid "Enter quick comments, one per line" -msgstr "" - -#: qcomment.php:55 -msgid "Quick Comment Settings" -msgstr "" diff --git a/qcomment/lang/is/strings.php b/qcomment/lang/is/strings.php index 975c341e..b0d3fd28 100644 --- a/qcomment/lang/is/strings.php +++ b/qcomment/lang/is/strings.php @@ -1,7 +1,10 @@ -strings[":-)"] = ":-)"; +$a->strings[":-("] = ":-("; +$a->strings["lol"] = "lol"; +$a->strings["Quick Comment Settings"] = ""; +$a->strings["Quick comments are found near comment boxes, sometimes hidden. Click them to provide simple replies."] = ""; +$a->strings["Enter quick comments, one per line"] = ""; +$a->strings["Submit"] = "Senda inn"; +$a->strings["Quick Comment settings saved."] = ""; diff --git a/qcomment/lang/it/messages.po b/qcomment/lang/it/messages.po index 2347a0dd..5772fcd2 100644 --- a/qcomment/lang/it/messages.po +++ b/qcomment/lang/it/messages.po @@ -5,43 +5,50 @@ # # Translators: # fabrixxm , 2014-2015 -# Sylke Vicious , 2021 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:16-0500\n" -"PO-Revision-Date: 2014-06-23 12:30+0000\n" -"Last-Translator: Sylke Vicious , 2021\n" -"Language-Team: Italian (http://app.transifex.com/Friendica/friendica/language/it/)\n" +"POT-Creation-Date: 2013-02-27 05:01-0500\n" +"PO-Revision-Date: 2017-09-20 06:08+0000\n" +"Last-Translator: fabrixxm \n" +"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: qcomment.php:45 +#: qcomment.php:51 msgid ":-)" msgstr ":-)" -#: qcomment.php:45 +#: qcomment.php:51 msgid ":-(" msgstr ":-(" -#: qcomment.php:45 +#: qcomment.php:51 msgid "lol" msgstr "lol" -#: qcomment.php:49 +#: qcomment.php:54 +msgid "Quick Comment Settings" +msgstr "Impostazioni commento rapido" + +#: qcomment.php:56 msgid "" "Quick comments are found near comment boxes, sometimes hidden. Click them to" " provide simple replies." msgstr "Trovi i commenti rapidi vicino al box dei commenti, a volte nascosti. Cliccali per inviare semplici risposte." -#: qcomment.php:50 +#: qcomment.php:57 msgid "Enter quick comments, one per line" msgstr "Inserire un commento rapido, uno per linea" -#: qcomment.php:55 -msgid "Quick Comment Settings" -msgstr "Impostazioni commento rapido" +#: qcomment.php:61 +msgid "Submit" +msgstr "Invia" + +#: qcomment.php:75 +msgid "Quick Comment settings saved." +msgstr "Impostazioni commento rapido salvate." diff --git a/qcomment/lang/it/strings.php b/qcomment/lang/it/strings.php index 26f8229a..59edbe06 100644 --- a/qcomment/lang/it/strings.php +++ b/qcomment/lang/it/strings.php @@ -3,11 +3,13 @@ if(! function_exists("string_plural_select_it")) { function string_plural_select_it($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} $a->strings[':-)'] = ':-)'; $a->strings[':-('] = ':-('; $a->strings['lol'] = 'lol'; +$a->strings['Quick Comment Settings'] = 'Impostazioni commento rapido'; $a->strings['Quick comments are found near comment boxes, sometimes hidden. Click them to provide simple replies.'] = 'Trovi i commenti rapidi vicino al box dei commenti, a volte nascosti. Cliccali per inviare semplici risposte.'; $a->strings['Enter quick comments, one per line'] = 'Inserire un commento rapido, uno per linea'; -$a->strings['Quick Comment Settings'] = 'Impostazioni commento rapido'; +$a->strings['Submit'] = 'Invia'; +$a->strings['Quick Comment settings saved.'] = 'Impostazioni commento rapido salvate.'; diff --git a/qcomment/qcomment.php b/qcomment/qcomment.php index f7126531..1b8bfcbf 100644 --- a/qcomment/qcomment.php +++ b/qcomment/qcomment.php @@ -18,6 +18,7 @@ * */ +use Friendica\App; use Friendica\Core\Hook; use Friendica\Core\Renderer; use Friendica\DI; diff --git a/quickphoto/README.md b/quickphoto/README.md deleted file mode 100644 index 34af0e71..00000000 --- a/quickphoto/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# QuickPhoto Addon for Friendica - -QuickPhoto is a Friendica addon that simplifies working with images in the editor. It automatically replaces long, cumbersome BBCode structures with a compact shorthand notation, without affecting functionality or compatibility. - ---- - -## Features - -- **Automatic Simplification:** Converts "monster BBCodes" like `[url=...][img=...]...[/img][/url]` instantly into the handy format `[img]|filename description[/img]`. -- **Intelligent Reconstruction:** Before submitting or previewing, the shorthand code is quickly converted back into the original, valid Friendica BBCode. -- **Real-Time Processing:** Responds immediately to drag & drop, copy & paste, and inserting images via editor buttons. -- **Focus Safety:** Cursor management ensures the focus remains stable during automatic conversion while typing. -- **Maximum Compatibility:** Supports both the standard Jot editor and the Compose module, as well as reply fields. -- **Local Cache:** Image data is securely stored in the browser's localStorage and automatically cleared after 12 hours. - ---- - -## How It Works - -The addon operates in a hybrid manner: - -- **Frontend:** A JavaScript watcher scans textareas and simplifies complex image links for better readability while writing. -- **Interface:** It integrates deeply with Friendica's jQuery functions to ensure that preview and save functions always receive the correct original data. -- **Events:** By intercepting submit and preview clicks, it guarantees that shorthand codes are never sent to the server in a format it cannot interpret. - ---- - -## Installation - -1. Create a folder named `quickphoto` in the `addon/` directory of your Friendica installation. -2. Place the file `quickphoto.php` in this folder. -3. Place the file `quickphoto.js` in the same folder. -4. Enable the addon in the Friendica administration area under **Addons**. - - --- - -MIT License - -Copyright (c) 2024-2026 Friendica Project & Contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/quickphoto/lang/C/messages.po b/quickphoto/lang/C/messages.po deleted file mode 100644 index 75476018..00000000 --- a/quickphoto/lang/C/messages.po +++ /dev/null @@ -1,22 +0,0 @@ -# ADDON quickphoto -# Copyright (C) -# This file is distributed under the same license as the Friendica quickphoto addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-07 10:18+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: quickphoto.php:18 -msgid "Image description" -msgstr "" diff --git a/quickphoto/quickphoto.js b/quickphoto/quickphoto.js deleted file mode 100644 index f8dc2294..00000000 --- a/quickphoto/quickphoto.js +++ /dev/null @@ -1,126 +0,0 @@ -(function() { - const monsterPattern = /\[url=(.*?)\]\[img=(.*?)\](.*?)\[\/img\]\[\/url\]/gi; - let throttleTimer; - - const i18nDesc = (window.qp_i18n && window.qp_i18n.imageDesc) ? window.qp_i18n.imageDesc : "Image description"; - - const cleanupOldEntries = () => { - const now = Date.now(); - const twelveHours = 12 * 60 * 60 * 1000; - for (let i = 0; i < localStorage.length; i++) { - const key = localStorage.key(i); - if (key && key.startsWith('qp_')) { - try { - const data = JSON.parse(localStorage.getItem(key)); - if (data && data.timestamp && (now - data.timestamp > twelveHours)) { - localStorage.removeItem(key); - } - } catch (e) { localStorage.removeItem(key); } - } - } - }; - - const simplify = (text) => { - if (!text || !text.includes('[url=')) return text; - return text.replace(monsterPattern, (match, urlPart, imgPart, existingDesc) => { - const fileName = imgPart.split('/').pop(); - const storageKey = `qp_${fileName}`; - - localStorage.setItem(storageKey, JSON.stringify({ - url: urlPart, - img: imgPart, - timestamp: Date.now() - })); - - let userDesc = existingDesc.trim() || i18nDesc; - return `[img]${fileName}|${userDesc}[/img]`; - }); - }; - - const reconstruct = (text) => { - if (!text || !text.includes('[img]')) return text; - return text.replace(/\[img\](.*?)\|(.*?)\[\/img\]/g, (match, fileName, desc) => { - const data = localStorage.getItem(`qp_${fileName}`); - if (data) { - const parsed = JSON.parse(data); - const finalDesc = (desc === i18nDesc) ? "" : desc; - return `[url=${parsed.url}][img=${parsed.img}]${finalDesc}[/img][/url]`; - } - return match; - }); - }; - - const applySimplify = (textarea) => { - if (!textarea || !textarea.value || !textarea.value.includes('[/img]')) return; - - (window.requestIdleCallback || function(cb) { return setTimeout(cb, 1); })(() => { - const current = textarea.value; - const simple = simplify(current); - if (current !== simple) { - const start = textarea.selectionStart; - const end = textarea.selectionEnd; - textarea.value = simple; - textarea.setSelectionRange(start, end); - } - }); - }; - - if (typeof jQuery !== 'undefined') { - const originalVal = jQuery.fn.val; - jQuery.fn.val = function(value) { - if (arguments.length === 0 && this.is('textarea')) { - return reconstruct(originalVal.call(this)); - } - if (arguments.length > 0 && this.is('textarea')) { - return originalVal.call(this, simplify(value)); - } - return originalVal.apply(this, arguments); - }; - } - - document.addEventListener('drop', (e) => { - if (e.target.tagName === 'TEXTAREA') { - setTimeout(() => applySimplify(e.target), 150); - } - }, true); - - document.addEventListener('input', (e) => { - if (e.target.tagName === 'TEXTAREA') { - clearTimeout(throttleTimer); - throttleTimer = setTimeout(() => applySimplify(e.target), 500); - } - }); - - document.addEventListener('click', (e) => { - const btn = e.target.closest( - '#wall-submit-preview, #profile-jot-submit, #wall-submit-submit, #jot-submit, ' + - '[id^="comment-edit-submit-"], [id^="comment-edit-preview-link-"]' - ); - - if (btn) { - const textareas = document.querySelectorAll('textarea'); - if (textareas.length > 0) { - textareas.forEach(textarea => { - textarea.value = reconstruct(textarea.value); - if (btn.id.includes('preview')) { - setTimeout(() => applySimplify(textarea), 1000); - } - }); - } - } - }, true); - - setInterval(() => { - if (document.hidden) return; - const textareas = document.querySelectorAll('textarea'); - if (textareas.length === 0) return; - - textareas.forEach(textarea => { - if (textarea.offsetParent !== null) { - applySimplify(textarea); - } - }); - }, 2500); - - cleanupOldEntries(); -})(); diff --git a/quickphoto/quickphoto.php b/quickphoto/quickphoto.php deleted file mode 100644 index 185665a6..00000000 --- a/quickphoto/quickphoto.php +++ /dev/null @@ -1,28 +0,0 @@ - - */ - -use Friendica\Core\Hook; -use Friendica\DI; - -function quickphoto_install() { - Hook::register('page_header', 'addon/quickphoto/quickphoto.php', 'quickphoto_header'); - Hook::register('post_post', 'addon/quickphoto/quickphoto.php', 'quickphoto_post_hook'); -} - -function quickphoto_header(&$header) { - $desc_label = DI::l10n()->t('Image description'); - - $js_label = addslashes($desc_label); - - $header .= "\n" . ''; - $header .= "\n" . '' . "\n"; -} - -function quickphoto_post_hook(&$item) { - // Placeholder -} \ No newline at end of file diff --git a/randplace/lang/bg/messages.po b/randplace/lang/bg/messages.po deleted file mode 100644 index 3fad2546..00000000 --- a/randplace/lang/bg/messages.po +++ /dev/null @@ -1,27 +0,0 @@ -# ADDON randplace -# Copyright (C) -# This file is distributed under the same license as the Friendica randplace addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:16-0500\n" -"PO-Revision-Date: 2014-06-23 12:34+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: randplace.php:161 -msgid "Enable Randplace Addon" -msgstr "" - -#: randplace.php:166 -msgid "Randplace Settings" -msgstr "" diff --git a/randplace/lang/bg/strings.php b/randplace/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/randplace/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: randplace.php:161 -msgid "Enable Randplace Addon" -msgstr "" - -#: randplace.php:166 -msgid "Randplace Settings" -msgstr "" diff --git a/randplace/lang/ca/strings.php b/randplace/lang/ca/strings.php index d34874f6..120fab8c 100644 --- a/randplace/lang/ca/strings.php +++ b/randplace/lang/ca/strings.php @@ -1,7 +1,5 @@ -strings["Randplace Settings"] = "Configuració de Randplace"; +$a->strings["Enable Randplace Addon"] = "Habilitar el Addon de Randplace"; +$a->strings["Submit"] = "Enviar"; diff --git a/randplace/lang/de/messages.po b/randplace/lang/de/messages.po index abbaefd8..f2d1fb54 100644 --- a/randplace/lang/de/messages.po +++ b/randplace/lang/de/messages.po @@ -12,9 +12,9 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-11-21 19:16-0500\n" -"PO-Revision-Date: 2014-06-23 12:34+0000\n" -"Last-Translator: Steffen K9, 2021\n" -"Language-Team: German (http://app.transifex.com/Friendica/friendica/language/de/)\n" +"PO-Revision-Date: 2021-12-22 17:21+0000\n" +"Last-Translator: Transifex Bot <>\n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/randplace/lang/eo/messages.po b/randplace/lang/eo/messages.po deleted file mode 100644 index 7ed15c2b..00000000 --- a/randplace/lang/eo/messages.po +++ /dev/null @@ -1,27 +0,0 @@ -# ADDON randplace -# Copyright (C) -# This file is distributed under the same license as the Friendica randplace addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:16-0500\n" -"PO-Revision-Date: 2014-06-23 12:34+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: randplace.php:161 -msgid "Enable Randplace Addon" -msgstr "" - -#: randplace.php:166 -msgid "Randplace Settings" -msgstr "" diff --git a/randplace/lang/eo/strings.php b/randplace/lang/eo/strings.php index 68e8a64c..38e6ebfa 100644 --- a/randplace/lang/eo/strings.php +++ b/randplace/lang/eo/strings.php @@ -1,7 +1,5 @@ -strings["Randplace Settings"] = "Randplace agordoj."; +$a->strings["Enable Randplace Addon"] = "Aktivigi la Randplace kromprogramon."; +$a->strings["Submit"] = "Sendi"; diff --git a/randplace/lang/et/messages.po b/randplace/lang/et/messages.po deleted file mode 100644 index ad70f2e6..00000000 --- a/randplace/lang/et/messages.po +++ /dev/null @@ -1,28 +0,0 @@ -# ADDON randplace -# Copyright (C) -# This file is distributed under the same license as the Friendica randplace addon package. -# -# -# Translators: -# Rain Hawk, 2020 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:16-0500\n" -"PO-Revision-Date: 2014-06-23 12:34+0000\n" -"Last-Translator: Rain Hawk, 2020\n" -"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: et\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: randplace.php:161 -msgid "Enable Randplace Addon" -msgstr "" - -#: randplace.php:166 -msgid "Randplace Settings" -msgstr "" diff --git a/randplace/lang/et/strings.php b/randplace/lang/et/strings.php deleted file mode 100644 index dfe78358..00000000 --- a/randplace/lang/et/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: is\n" -"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" - -#: randplace.php:161 -msgid "Enable Randplace Addon" -msgstr "" - -#: randplace.php:166 -msgid "Randplace Settings" -msgstr "" diff --git a/randplace/lang/is/strings.php b/randplace/lang/is/strings.php index 975c341e..85e49238 100644 --- a/randplace/lang/is/strings.php +++ b/randplace/lang/is/strings.php @@ -1,7 +1,5 @@ -strings["Randplace Settings"] = "Stilla Randplace"; +$a->strings["Enable Randplace Addon"] = "Kveikja á Randplace einingu"; +$a->strings["Submit"] = "Senda inn"; diff --git a/randplace/lang/it/messages.po b/randplace/lang/it/messages.po index 673d0f6f..708a60ac 100644 --- a/randplace/lang/it/messages.po +++ b/randplace/lang/it/messages.po @@ -10,20 +10,24 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:16-0500\n" -"PO-Revision-Date: 2014-06-23 12:34+0000\n" -"Last-Translator: Sylke Vicious , 2021\n" -"Language-Team: Italian (http://app.transifex.com/Friendica/friendica/language/it/)\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" +"PO-Revision-Date: 2021-02-16 12:57+0000\n" +"Last-Translator: Sylke Vicious \n" +"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" - -#: randplace.php:161 -msgid "Enable Randplace Addon" -msgstr "Abilita il componente aggiuntivo Posizione Casuale" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: randplace.php:166 msgid "Randplace Settings" msgstr "Impostazioni \"Posizione casuale\"" + +#: randplace.php:168 +msgid "Enable Randplace Addon" +msgstr "Abilita il componente aggiuntivo Posizione Casuale" + +#: randplace.php:174 +msgid "Save Settings" +msgstr "Salva Impostazioni" diff --git a/randplace/lang/it/strings.php b/randplace/lang/it/strings.php index 5d71eba3..7b4a9947 100644 --- a/randplace/lang/it/strings.php +++ b/randplace/lang/it/strings.php @@ -3,7 +3,8 @@ if(! function_exists("string_plural_select_it")) { function string_plural_select_it($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} -$a->strings['Enable Randplace Addon'] = 'Abilita il componente aggiuntivo Posizione Casuale'; $a->strings['Randplace Settings'] = 'Impostazioni "Posizione casuale"'; +$a->strings['Enable Randplace Addon'] = 'Abilita il componente aggiuntivo Posizione Casuale'; +$a->strings['Save Settings'] = 'Salva Impostazioni'; diff --git a/randplace/lang/ru/messages.po b/randplace/lang/ru/messages.po deleted file mode 100644 index 31b44e86..00000000 --- a/randplace/lang/ru/messages.po +++ /dev/null @@ -1,27 +0,0 @@ -# ADDON randplace -# Copyright (C) -# This file is distributed under the same license as the Friendica randplace addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:16-0500\n" -"PO-Revision-Date: 2014-06-23 12:34+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Russian (http://app.transifex.com/Friendica/friendica/language/ru/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" - -#: randplace.php:161 -msgid "Enable Randplace Addon" -msgstr "" - -#: randplace.php:166 -msgid "Randplace Settings" -msgstr "" diff --git a/randplace/lang/ru/strings.php b/randplace/lang/ru/strings.php index 0579fc21..46733dc6 100644 --- a/randplace/lang/ru/strings.php +++ b/randplace/lang/ru/strings.php @@ -1,7 +1,5 @@ -=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; } -}} +strings["Randplace Settings"] = "Настройки Случайного места"; +$a->strings["Enable Randplace Addon"] = "Включить Randplace плагин"; +$a->strings["Submit"] = "Подтвердить"; diff --git a/randplace/randplace.php b/randplace/randplace.php index 89a75f98..34f48c6c 100644 --- a/randplace/randplace.php +++ b/randplace/randplace.php @@ -19,7 +19,9 @@ * */ +use Friendica\App; use Friendica\Core\Hook; +use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; @@ -39,7 +41,7 @@ function randplace_install() Hook::register('addon_settings', 'addon/randplace/randplace.php', 'randplace_settings'); Hook::register('addon_settings_post', 'addon/randplace/randplace.php', 'randplace_settings_post'); - DI::logger()->notice("installed randplace"); + Logger::notice("installed randplace"); } function randplace_uninstall() @@ -49,7 +51,7 @@ function randplace_uninstall() * * Except hooks, they are all unregistered automatically and don't need to be unregistered manually. */ - DI::logger()->notice("removed randplace"); + Logger::notice("removed randplace"); } function randplace_post_hook(&$item) @@ -60,7 +62,7 @@ function randplace_post_hook(&$item) * - A status post by a profile owner * - The profile owner must have allowed our addon */ - DI::logger()->notice('randplace invoked'); + Logger::notice('randplace invoked'); if (!DI::userSession()->getLocalUserId()) { /* non-zero if this is a logged in user of this system */ diff --git a/ratioed/RatioedPanel.php b/ratioed/RatioedPanel.php deleted file mode 100644 index 37e692a5..00000000 --- a/ratioed/RatioedPanel.php +++ /dev/null @@ -1,323 +0,0 @@ -getArgv()[1]) and DI::args()->getArgv()[1] === 'help') { - $template = Renderer::getMarkupTemplate('/help.tpl', 'addon/ratioed/'); - return Renderer::replaceMacros($template, array('$config' => DI::baseUrl() . '/settings/addon')); - } - - $uid = $this->parameters['uid'] ?? 0; - $user = []; - - if ($uid) { - $user = User::getById($uid, ['username', 'blocked']); - if (!$user) { - $this->systemMessages->addNotice($this->t('User not found')); - $this->baseUrl->redirect('ratioed'); - } - } - - $pager = new Pager($this->l10n, $this->args->getQueryString(), 100); - - $valid_orders = [ - 'name', - 'email', - 'register_date', - 'last-activity', - 'last-item', - 'page-flags', - ]; - - $order = 'last-item'; - $order_direction = '-'; - if (!empty($_REQUEST['o'])) { - $new_order = $_REQUEST['o']; - if ($new_order[0] !== '-') { - $order_direction = '+'; - $new_order = substr($new_order, 1); - } - - if (in_array($new_order, $valid_orders)) { - $order = $new_order; - } - } - - $users = User::getList($pager->getStart(), $pager->getItemsPerPage(), 'active', $order, ($order_direction == '-')); - - $users = array_map($this->setupUserCallback(), $users); - - $header_titles = [ - $this->t('Name'), - $this->t('Email'), - $this->t('Register date'), - $this->t('Last login'), - $this->t('Last public item'), - $this->t('Type'), - $this->t('Blocked by'), - $this->t('Comments last 24h'), - $this->t('Reactions last 24h'), - $this->t('Ratio last 24h'), - $this->t('Replies last month'), - $this->t('Reply likes'), - $this->t('Respondee likes'), - $this->t('OP likes'), - $this->t('Reply guy score'), - ]; - $field_names = [ - 'name', - 'email', - 'register_date', - 'login_date', - 'lastitem_date', - 'page_flags', - 'blocked_by', - 'comments', - 'reactions', - 'ratio', - 'reply_count', - 'reply_likes', - 'reply_respondee_likes', - 'reply_op_likes', - 'reply_guy_score', - ]; - $th_users = array_map(null, $header_titles, $valid_orders, $field_names); - - $count = $this->database->count('user', ["`verified` AND NOT `blocked` AND NOT `account_removed` AND NOT `account_expired` AND `uid` != ?", 0]); - - $t = Renderer::getMarkupTemplate('ratioed.tpl', 'addon/ratioed'); - return self::getTabsHTML('ratioed') . Renderer::replaceMacros($t, [ - // strings // - '$title' => $this->t('Moderation'), - '$help_url' => $this->baseUrl . '/ratioed/help', - '$page' => $this->t('Behaviour'), - '$select_all' => $this->t('select all'), - '$delete' => $this->t('Delete'), - '$block' => $this->t('Block'), - '$blocked' => $this->t('User blocked'), - '$siteadmin' => $this->t('Site admin'), - '$accountexpired' => $this->t('Account expired'), - '$h_newuser' => $this->t('Create a new user'), - - '$th_users' => $th_users, - '$order_users' => $order, - '$order_direction_users' => $order_direction, - - '$confirm_delete_multi' => $this->t('Selected users will be deleted!\n\nEverything these users had posted on this site will be permanently deleted!\n\nAre you sure?'), - '$confirm_delete' => $this->t('The user {0} will be deleted!\n\nEverything this user has posted on this site will be permanently deleted!\n\nAre you sure?'), - - '$form_security_token' => self::getFormSecurityToken('moderation_users_active'), - - // values // - '$baseurl' => $this->baseUrl, - '$query_string' => $this->args->getQueryString(), - - '$users' => $users, - '$count' => $count, - '$pager' => $pager->renderFull($count), - ]); - } - - protected function getReplyGuyRow($contact_uid) - { - $like_vid = Verb::getID(Activity::LIKE); - $post_vid = Verb::getID(Activity::POST); - - /* - * This is a complicated query. - * - * The innermost select retrieves a chain of four posts: an - * original post, a target comment (possibly deep down in the - * thread), a reply from our user, and a like for that reply. - * If there's no like, we still want to count the reply, so we - * use an outer join. - * - * The second select adds "points" for different kinds of - * likes. The outermost select then counts up these points, - * and the number of distinct replies. - */ - $reply_guy_result = DBA::p(' -SELECT - COUNT(distinct reply_id) AS replies_total, - SUM(like_point) AS like_total, - SUM(target_like_point) AS target_like_total, - SUM(original_like_point) AS original_like_total -FROM ( - SELECT - reply_id, - like_date, - like_date IS NOT NULL AS like_point, - like_author = target_author AS target_like_point, - like_author = original_author AS original_like_point - FROM ( - SELECT - original_post.`uri-id` AS original_id, - original_post.`author-id` AS original_author, - original_post.created AS original_date, - target_post.`uri-id` AS target_id, - target_post.`author-id` AS target_author, - target_post.created AS target_date, - reply_post.`uri-id` AS reply_id, - reply_post.`author-id` AS reply_author, - reply_post.created AS reply_date, - like_post.`uri-id` AS like_id, - like_post.`author-id` AS like_author, - like_post.created AS like_date - FROM - post AS original_post - JOIN - post AS target_post - ON - original_post.`uri-id` = target_post.`parent-uri-id` - JOIN - post AS reply_post - ON - target_post.`uri-id` = reply_post.`thr-parent-id` AND - reply_post.`author-id` = ? AND - reply_post.`author-id` != target_post.`author-id` AND - reply_post.`author-id` != original_post.`author-id` AND - reply_post.`uri-id` != reply_post.`thr-parent-id` AND - reply_post.vid = ? AND - reply_post.created > CURDATE() - INTERVAL 1 MONTH - LEFT OUTER JOIN - post AS like_post - ON - reply_post.`uri-id` = like_post.`thr-parent-id` AND - like_post.vid = ? AND - like_post.`author-id` != reply_post.`author-id` - ) AS post_meta -) AS reply_counts -', $contact_uid, $post_vid, $like_vid); - return $reply_guy_result; - } - - // https://stackoverflow.com/a/48283297/235936 - protected function sigFig($value, $digits) - { - if ($value == 0) { - $decimalPlaces = $digits - 1; - } elseif ($value < 0) { - $decimalPlaces = $digits - floor(log10($value * -1)) - 1; - } else { - $decimalPlaces = $digits - floor(log10($value)) - 1; - } - - $answer = ($decimalPlaces > 0) ? - number_format($value, $decimalPlaces) : round($value, $decimalPlaces); - return $answer; - } - - protected function fillReplyGuyData(&$user) - { - $reply_guy_result = $this->getReplyGuyRow($user['user_contact_uid']); - if (DBA::isResult($reply_guy_result)) { - $reply_guy_result_row = DBA::fetch($reply_guy_result); - $user['reply_count'] = (int) $reply_guy_result_row['replies_total'] ?? 0; - $user['reply_likes'] = (int) $reply_guy_result_row['like_total'] ?? 0; - $user['reply_respondee_likes'] = (int) $reply_guy_result_row['target_like_total'] ?? 0; - $user['reply_op_likes'] = (int) $reply_guy_result_row['original_like_total'] ?? 0; - - $denominator = $user['reply_likes'] + $user['reply_respondee_likes'] + $user['reply_op_likes']; - if ($user['reply_count'] === 0) { - $user['reply_guy'] = false; - $user['reply_guy_score'] = 0; - } elseif ($denominator == 0) { - $user['reply_guy'] = true; - $user['reply_guy_score'] = '∞'; - } else { - $reply_guy_score = $user['reply_count'] / $denominator; - $user['reply_guy'] = $reply_guy_score >= 1.0; - $user['reply_guy_score'] = $this->sigFig($reply_guy_score, 2); - } - } else { - $user['reply_count'] = "error"; - $user['reply_likes'] = "error"; - $user['reply_respondee_likes'] = "error"; - $user['reply_op_likes'] = "error"; - $user['reply_guy'] = false; - $user['reply_guy_score'] = 0; - } - } - - protected function setupUserCallback(): \Closure - { - DI::logger()->debug("ratioed: setupUserCallback"); - $parentCallback = parent::setupUserCallback(); - return function ($user) use ($parentCallback) { - $blocked_count = DBA::count('user-contact', ['uid' => $user['uid'], 'is-blocked' => 1]); - $user['blocked_by'] = $blocked_count; - - $self_contact_result = DBA::p('SELECT admin_contact.id AS user_contact_uid FROM contact AS admin_contact JOIN contact AS user_contact ON admin_contact.`uri-id` = user_contact.`uri-id` AND admin_contact.self = 0 AND user_contact.self = 1 WHERE user_contact.uid = ?', $user['uid']); - if (DBA::isResult($self_contact_result)) { - $self_contact_result_row = DBA::fetch($self_contact_result); - $user['user_contact_uid'] = $self_contact_result_row['user_contact_uid']; - } else { - $user['user_contact_uid'] = null; - } - - if ($user['user_contact_uid']) { - $post_engagement_result = DBA::p('SELECT SUM(`comments`) AS `comment_count`, SUM(`activities`) AS `activities_count` FROM `post-engagement` WHERE `post-engagement`.created > DATE_SUB(now(), INTERVAL 1 DAY) AND `post-engagement`.`owner-id` = ?', $user['user_contact_uid']); - if (DBA::isResult($post_engagement_result)) { - $post_engagement_result_row = DBA::fetch($post_engagement_result); - $user['comments'] = $post_engagement_result_row['comment_count']; - $user['reactions'] = $post_engagement_result_row['activities_count']; - if ($user['reactions'] > 0) { - $user['ratio'] = number_format($user['comments'] / $user['reactions'], 1, '.', ''); - $user['ratioed'] = (float)($user['ratio']) >= 2.0; - } else { - $user['reactions'] = 0; - if ($user['comments'] == 0) { - $user['comments'] = 0; - $user['ratio'] = 0; - $user['ratioed'] = false; - } else { - $user['ratio'] = '∞'; - $user['ratioed'] = false; - } - } - } else { - $user['comments'] = 'error'; - $user['reactions'] = 'error'; - $user['ratio'] = 'error'; - $user['ratioed'] = false; - } - } else { - $user['comments'] = 'error'; - $user['reactions'] = 'error'; - $user['ratio'] = 'error'; - $user['ratioed'] = false; - } - - $this->fillReplyGuyData($user); - - $user = $parentCallback($user); - DI::logger()->debug("ratioed: setupUserCallback", [ - 'uid' => $user['uid'], - 'blocked_by' => $user['blocked_by'], - 'comments' => $user['comments'], - 'reactions' => $user['reactions'], - 'ratio' => $user['ratio'], - 'ratioed' => $user['ratioed'], - ]); - return $user; - }; - } -} diff --git a/ratioed/lang/C/messages.po b/ratioed/lang/C/messages.po deleted file mode 100644 index 58e61175..00000000 --- a/ratioed/lang/C/messages.po +++ /dev/null @@ -1,130 +0,0 @@ -# ADDON ratioed -# Copyright (C) -# This file is distributed under the same license as the Friendica ratioed addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-11-08 13:50+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: RatioedPanel.php:34 -msgid "User not found" -msgstr "" - -#: RatioedPanel.php:69 -msgid "Name" -msgstr "" - -#: RatioedPanel.php:70 -msgid "Email" -msgstr "" - -#: RatioedPanel.php:71 -msgid "Register date" -msgstr "" - -#: RatioedPanel.php:72 -msgid "Last login" -msgstr "" - -#: RatioedPanel.php:73 -msgid "Last public item" -msgstr "" - -#: RatioedPanel.php:74 -msgid "Type" -msgstr "" - -#: RatioedPanel.php:75 -msgid "Blocked by" -msgstr "" - -#: RatioedPanel.php:76 -msgid "Comments last 24h" -msgstr "" - -#: RatioedPanel.php:77 -msgid "Reactions last 24h" -msgstr "" - -#: RatioedPanel.php:78 -msgid "Ratio last 24h" -msgstr "" - -#: RatioedPanel.php:79 -msgid "Replies last month" -msgstr "" - -#: RatioedPanel.php:80 -msgid "Reply likes" -msgstr "" - -#: RatioedPanel.php:81 -msgid "Respondee likes" -msgstr "" - -#: RatioedPanel.php:82 -msgid "OP likes" -msgstr "" - -#: RatioedPanel.php:83 -msgid "Reply guy score" -msgstr "" - -#: RatioedPanel.php:109 -msgid "Moderation" -msgstr "" - -#: RatioedPanel.php:111 ratioed.php:39 -msgid "Behaviour" -msgstr "" - -#: RatioedPanel.php:112 -msgid "select all" -msgstr "" - -#: RatioedPanel.php:113 -msgid "Delete" -msgstr "" - -#: RatioedPanel.php:114 -msgid "Block" -msgstr "" - -#: RatioedPanel.php:115 -msgid "User blocked" -msgstr "" - -#: RatioedPanel.php:116 -msgid "Site admin" -msgstr "" - -#: RatioedPanel.php:117 -msgid "Account expired" -msgstr "" - -#: RatioedPanel.php:118 -msgid "Create a new user" -msgstr "" - -#: RatioedPanel.php:124 -msgid "Selected users will be deleted!\\n\\nEverything these users had posted on this site will be permanently deleted!\\n\\nAre you sure?" -msgstr "" - -#: RatioedPanel.php:125 -msgid "The user {0} will be deleted!\\n\\nEverything this user has posted on this site will be permanently deleted!\\n\\nAre you sure?" -msgstr "" - -#: ratioed.php:42 -msgid "Statistics about users behaviour" -msgstr "" diff --git a/ratioed/ratioed.php b/ratioed/ratioed.php deleted file mode 100644 index 5cc6d539..00000000 --- a/ratioed/ratioed.php +++ /dev/null @@ -1,57 +0,0 @@ - - */ - -use Friendica\Addon\ratioed\RatioedPanel; -use Friendica\Core\Hook; -use Friendica\DI; - -/** - * Sets up the addon hooks and updates data in the database if needed - */ -function ratioed_install() -{ - Hook::register('moderation_users_tabs', 'addon/ratioed/ratioed.php', 'ratioed_users_tabs'); - - DI::logger()->info("ratioed: installed"); -} - -/** - * This is a statement rather than an actual function definition. The simple - * existence of this method is checked to figure out if the addon offers a - * module. - */ -function ratioed_module() {} - -/** - * @brief Adds additional users tab to the moderation panel - * - * @param array $arr Parameters, including "tabs" which is the list to modify, and "selectedTab", which is the currently selected tab ID - */ -function ratioed_users_tabs(array &$arr) { - DI::logger()->debug("ratioed: users tabs"); - - array_push($arr['tabs'], [ - 'label' => DI::l10n()->t('Behaviour'), - 'url' => 'ratioed', - 'sel' => $arr['selectedTab'] == 'ratioed' ? 'active' : '', - 'title' => DI::l10n()->t('Statistics about users behaviour'), - 'id' => 'admin-users-ratioed', - 'accesskey' => 'r', - ]); -} - -/** - * @brief Displays the ratioed tab in the moderation panel - */ -function ratioed_content() { - DI::logger()->debug("ratioed: content"); - - $ratioed = DI::getDice()->create(RatioedPanel::class, [$_SERVER]); - $httpException = DI::getDice()->create(Friendica\Module\Special\HTTPException::class); - $ratioed->run($httpException); -} diff --git a/ratioed/templates/help.tpl b/ratioed/templates/help.tpl deleted file mode 100644 index 0d012ca7..00000000 --- a/ratioed/templates/help.tpl +++ /dev/null @@ -1,145 +0,0 @@ -
-
-

Ratioed Plugin Help

-

- This plugin provides moderators with additional statistics about - the behaviour of users. These may be useful as early warning signs - that warrant more carefully watching the behaviour of a user. They - are not suitable as a trigger for instantly blocking, - muting, or reporting a user, since they lack context. -

-

- The name of the plugin comes - from "The - Ratio", a well-known quick rule of thumb: -

-
- If the Replies:RT ratio is greater than 2:1, you done messed up. -
-

- To "get ratioed" is to receive a large number of comments in a short - space of time, with relatively few likes or boosts. If commenters - were enthusiastic about the posts, they would also have liked or - boosted them. Receiving many comments without such likes or boosts - indicates the comments were probably angry. This anger may or may - not be justified, but either way this is probably something - moderators should be aware of. -

-

- This plugin allows viewing of an actual ratio, calculated over the - last 24 hours. This is a useful timeframe for sudden dogpiling - events that moderators might not otherwise notice. The plugin - also calculates other statistics. -

-

Explanation of Statistics

-

Blocked by

-

- This summarises the number of users on remote servers that have - blocked this user. -

-

- Note that the ActivityPub spec expressly says that - implementations "SHOULD NOT" forward such block messages to - remote servers. Nevertheless some implementations do this - anyway, notably Mastodon. This statistic can only count block - messages from servers that do this, as well as blocks from local - users. As such, it is usually an undercount. -

-

- The reason the spec recommends against forwarding these messages - is that they can lead to retaliation. For this reason, this - plugin deliberately does not provide any way to investigate - exactly who blocked the user. -

-

Comments last 24h

-

- This gives the number of comments made on the top-level posts that - this user made within the last 24 hours. -

-

Reactions last 24h

-

- This collects the number of likes, boosts, or other "one-click" - interactions made on the user's top-level posts within the last 24 - hours. -

-

Ratio last 24h

-

- This is the ratio between "Comments last 24h" and "Reactions last - 24h". It is intended to approximate the traditional ratio as - understood on Twitter. -

-

Replies last month

-

- This is the number of times the user posted a reply to someone - else, on a thread the user did not start, any time in the last - month. -

-

Reply likes

-

- This is the number of likes received by the user on their - replies to other people's posts in the last month. Replies that - receive likes can be assumed to be more of a valuable - contribution than replies that do not. -

-

Respondee likes

-

- The number of times in the last month the user replied to - someone else's comment and that person then liked the reply. - Likes to replies are not necessarily a positive thing, but if - the person you're replying to approves the reply, that's a very - good sign. Of course it's also common in a debate for neither - side to like the other side's comments without that indicating - an unhealthy interaction, so interpret this statistic cautiously. -

-

OP likes

-

- The number of times in the last month the user replied on a - thread and the original poster that started the thread liked the - reply. While there is no formal concept of "ownership" of a - thread, conventionally the original poster is assumed to have - started the thread for a reason, and making replies that do not - fulfil that purpose are bad etiquette. Getting approval from - the original poster therefore is a good sign that the user is - posting replies that are wanted. -

-

Reply guy score

-

- A "reply - guy" is a common Internet phenomenon of people - (disproportionately male) posting unwanted comments on other - (disproportionately female) people's threads, derailing the - conversation. This score loosely quantifies this phenomenon, - as the ratio betwen the number of replies and the sum of likes, - respondee likes, and OP likes. This formula gives extra weight - to particularly relevant likes: a reply to a top-level post that - is liked by the original poster scores the maximum of 3 - "points". A score above 1.0 might indicate cause for concern - for moderators. -

-

- Since this is indicative of long-term behaviour, the score is - calculated over a month instead of 24 hours. -

-

-

Performance

-

- The statistics are computed from scratch each time the page loads. - It's possible that this might put a heavy load on the database, and - the page may take a long time to load. -

-

Extending

-

- Suggestions for additional statistics are welcome, especially from - moderators. This plugin should be considered a sandbox for - experimentation, so it is not necessary to prove that any statistic - is correlated with unwanted behaviour. -

-

- However, this plugin does deal with potentially sensitive - information. Even if moderators do in principle have access to all - information, it should not necessarily be highlighted. Statistics - should be kept anonymous and neutral. Also, they should be - presented only to moderators, not to the users themselves. -

-
-
diff --git a/ratioed/templates/ratioed.tpl b/ratioed/templates/ratioed.tpl deleted file mode 100644 index 2413ed9d..00000000 --- a/ratioed/templates/ratioed.tpl +++ /dev/null @@ -1,131 +0,0 @@ - - - -
-

- {{$title}} - {{$page}} ({{$count}}) - -

-
- -
@@ -322,7 +323,7 @@ $o .= <<< EOT - + @@ -344,13 +345,13 @@ $o .= <<< EOT - +
diff --git a/catavatar/catavatar.php b/catavatar/catavatar.php index 7b5f05c0..69f71ef6 100644 --- a/catavatar/catavatar.php +++ b/catavatar/catavatar.php @@ -6,8 +6,11 @@ * Author: Fabio */ +use Friendica\App; use Friendica\Core\Hook; +use Friendica\Core\Logger; use Friendica\Core\Renderer; +use Friendica\Core\Worker; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Contact; @@ -26,7 +29,7 @@ function catavatar_install() Hook::register('addon_settings', __FILE__, 'catavatar_addon_settings'); Hook::register('addon_settings_post', __FILE__, 'catavatar_addon_settings_post'); - DI::logger()->notice('registered catavatar'); + Logger::notice('registered catavatar'); } /** @@ -67,7 +70,7 @@ function catavatar_addon_settings_post(&$s) } if (!empty($_POST['catavatar-usecat'])) { - $url = DI::baseUrl() . '/catavatar/' . DI::userSession()->getLocalUserId() . '?ts=' . time(); + $url = DI::baseUrl()->get() . '/catavatar/' . DI::userSession()->getLocalUserId() . '?ts=' . time(); $self = DBA::selectFirst('contact', ['id'], ['uid' => DI::userSession()->getLocalUserId(), 'self' => true]); if (!DBA::isResult($self)) { @@ -118,9 +121,9 @@ function catavatar_lookup(array &$b) { $user = DBA::selectFirst('user', ['uid'], ['email' => $b['email']]); if (DBA::isResult($user)) { - $url = DI::baseUrl() . '/catavatar/' . $user['uid']; + $url = DI::baseUrl()->get() . '/catavatar/' . $user['uid']; } else { - $url = DI::baseUrl() . '/catavatar/' . md5(trim(strtolower($b['email']))); + $url = DI::baseUrl()->get() . '/catavatar/' . md5(trim(strtolower($b['email']))); } switch($b['size']) { diff --git a/catavatar/lang/bg/messages.po b/catavatar/lang/bg/messages.po deleted file mode 100644 index 027fc971..00000000 --- a/catavatar/lang/bg/messages.po +++ /dev/null @@ -1,54 +0,0 @@ -# ADDON catavatar -# Copyright (C) -# This file is distributed under the same license as the Friendica catavatar addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2018-04-07 05:23+0000\n" -"Language-Team: Bulgarian (https://app.transifex.com/Friendica/teams/12172/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: catavatar.php:48 -msgid "Set default profile avatar or randomize the cat." -msgstr "" - -#: catavatar.php:53 -msgid "Cat Avatar Settings" -msgstr "" - -#: catavatar.php:56 -msgid "Use Cat as Avatar" -msgstr "" - -#: catavatar.php:57 -msgid "Another random Cat!" -msgstr "" - -#: catavatar.php:58 -msgid "Reset to email Cat" -msgstr "" - -#: catavatar.php:77 -msgid "The cat hadn't found itself." -msgstr "" - -#: catavatar.php:86 -msgid "There was an error, the cat ran away." -msgstr "" - -#: catavatar.php:92 -msgid "Profile Photos" -msgstr "" - -#: catavatar.php:102 -msgid "Meow!" -msgstr "" diff --git a/catavatar/lang/bg/strings.php b/catavatar/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/catavatar/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -, 2022\n" -"Language-Team: German (https://app.transifex.com/Friendica/teams/12172/de/)\n" +"Language-Team: German (https://www.transifex.com/Friendica/teams/12172/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/catavatar/lang/eo/messages.po b/catavatar/lang/eo/messages.po deleted file mode 100644 index df7d9d00..00000000 --- a/catavatar/lang/eo/messages.po +++ /dev/null @@ -1,54 +0,0 @@ -# ADDON catavatar -# Copyright (C) -# This file is distributed under the same license as the Friendica catavatar addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2018-04-07 05:23+0000\n" -"Language-Team: Esperanto (https://app.transifex.com/Friendica/teams/12172/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: catavatar.php:48 -msgid "Set default profile avatar or randomize the cat." -msgstr "" - -#: catavatar.php:53 -msgid "Cat Avatar Settings" -msgstr "" - -#: catavatar.php:56 -msgid "Use Cat as Avatar" -msgstr "" - -#: catavatar.php:57 -msgid "Another random Cat!" -msgstr "" - -#: catavatar.php:58 -msgid "Reset to email Cat" -msgstr "" - -#: catavatar.php:77 -msgid "The cat hadn't found itself." -msgstr "" - -#: catavatar.php:86 -msgid "There was an error, the cat ran away." -msgstr "" - -#: catavatar.php:92 -msgid "Profile Photos" -msgstr "" - -#: catavatar.php:102 -msgid "Meow!" -msgstr "" diff --git a/catavatar/lang/eo/strings.php b/catavatar/lang/eo/strings.php deleted file mode 100644 index 68e8a64c..00000000 --- a/catavatar/lang/eo/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -, 2019 -# Florent C., 2023 +# Walter Bulbazor, 2021 +# Hypolite Petovan , 2022 # #, fuzzy msgid "" @@ -14,8 +15,8 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-11-21 19:14-0500\n" "PO-Revision-Date: 2018-04-07 05:23+0000\n" -"Last-Translator: Florent C., 2023\n" -"Language-Team: French (https://app.transifex.com/Friendica/teams/12172/fr/)\n" +"Last-Translator: Hypolite Petovan , 2022\n" +"Language-Team: French (https://www.transifex.com/Friendica/teams/12172/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -24,7 +25,7 @@ msgstr "" #: catavatar.php:48 msgid "Set default profile avatar or randomize the cat." -msgstr "Mettre l'avatar par défaut ou tirer au sort le chat." +msgstr "Mettre l'avatar par défaut ou tirer au sort le Chat." #: catavatar.php:53 msgid "Cat Avatar Settings" @@ -32,15 +33,15 @@ msgstr "Paramètres de Chat avatar" #: catavatar.php:56 msgid "Use Cat as Avatar" -msgstr "Utiliser ce Chat" +msgstr "Utiliser Chat comme avatar" #: catavatar.php:57 msgid "Another random Cat!" -msgstr "Un autre Chat aléatoire !" +msgstr "Un autre chat aléatoire !" #: catavatar.php:58 msgid "Reset to email Cat" -msgstr "Revenir au Chat par défaut" +msgstr "Réinitialiser à Chat courriel" #: catavatar.php:77 msgid "The cat hadn't found itself." diff --git a/catavatar/lang/fr/strings.php b/catavatar/lang/fr/strings.php index b68b9d45..5d8a10a3 100644 --- a/catavatar/lang/fr/strings.php +++ b/catavatar/lang/fr/strings.php @@ -5,11 +5,11 @@ function string_plural_select_fr($n){ $n = intval($n); if (($n == 0 || $n == 1)) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } }} -$a->strings['Set default profile avatar or randomize the cat.'] = 'Mettre l\'avatar par défaut ou tirer au sort le chat.'; +$a->strings['Set default profile avatar or randomize the cat.'] = 'Mettre l\'avatar par défaut ou tirer au sort le Chat.'; $a->strings['Cat Avatar Settings'] = 'Paramètres de Chat avatar'; -$a->strings['Use Cat as Avatar'] = 'Utiliser ce Chat'; -$a->strings['Another random Cat!'] = 'Un autre Chat aléatoire !'; -$a->strings['Reset to email Cat'] = 'Revenir au Chat par défaut'; +$a->strings['Use Cat as Avatar'] = 'Utiliser Chat comme avatar'; +$a->strings['Another random Cat!'] = 'Un autre chat aléatoire !'; +$a->strings['Reset to email Cat'] = 'Réinitialiser à Chat courriel'; $a->strings['The cat hadn\'t found itself.'] = 'Le Chat ne s\'y est pas retrouvé'; $a->strings['There was an error, the cat ran away.'] = 'Il y a eu une erreur et le chat s\'est enfui'; $a->strings['Profile Photos'] = 'Photos de profil'; diff --git a/catavatar/lang/gd/messages.po b/catavatar/lang/gd/messages.po deleted file mode 100644 index b86ca6f1..00000000 --- a/catavatar/lang/gd/messages.po +++ /dev/null @@ -1,54 +0,0 @@ -# ADDON catavatar -# Copyright (C) -# This file is distributed under the same license as the Friendica catavatar addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2018-04-07 05:23+0000\n" -"Language-Team: Gaelic, Scottish (https://app.transifex.com/Friendica/teams/12172/gd/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gd\n" -"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" - -#: catavatar.php:48 -msgid "Set default profile avatar or randomize the cat." -msgstr "" - -#: catavatar.php:53 -msgid "Cat Avatar Settings" -msgstr "" - -#: catavatar.php:56 -msgid "Use Cat as Avatar" -msgstr "" - -#: catavatar.php:57 -msgid "Another random Cat!" -msgstr "" - -#: catavatar.php:58 -msgid "Reset to email Cat" -msgstr "" - -#: catavatar.php:77 -msgid "The cat hadn't found itself." -msgstr "" - -#: catavatar.php:86 -msgid "There was an error, the cat ran away." -msgstr "" - -#: catavatar.php:92 -msgid "Profile Photos" -msgstr "" - -#: catavatar.php:102 -msgid "Meow!" -msgstr "" diff --git a/catavatar/lang/gd/strings.php b/catavatar/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/catavatar/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/catavatar/lang/it/messages.po b/catavatar/lang/it/messages.po index 9155bb48..e05bd277 100644 --- a/catavatar/lang/it/messages.po +++ b/catavatar/lang/it/messages.po @@ -6,55 +6,55 @@ # Translators: # fabrixxm , 2018 # Davide Pesenti , 2018 -# Sylke Vicious , 2023 +# Sylke Vicious , 2021 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" +"POT-Creation-Date: 2020-12-29 00:53+0000\n" "PO-Revision-Date: 2018-04-07 05:23+0000\n" -"Last-Translator: Sylke Vicious , 2023\n" -"Language-Team: Italian (https://app.transifex.com/Friendica/teams/12172/it/)\n" +"Last-Translator: Sylke Vicious , 2021\n" +"Language-Team: Italian (https://www.transifex.com/Friendica/teams/12172/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: catavatar.php:48 -msgid "Set default profile avatar or randomize the cat." -msgstr "Imposta l'immagine di profilo predefinita o crea un gatto casuale." - -#: catavatar.php:53 -msgid "Cat Avatar Settings" -msgstr "Impostazioni Avatar Gatto" - -#: catavatar.php:56 msgid "Use Cat as Avatar" msgstr "Usa il Gatto come avatar" -#: catavatar.php:57 -msgid "Another random Cat!" -msgstr "Un altro Gatto casuale!" +#: catavatar.php:49 +msgid "More Random Cat!" +msgstr "Altro Gatto a caso!" -#: catavatar.php:58 +#: catavatar.php:50 msgid "Reset to email Cat" msgstr "Reimposta Gatto" -#: catavatar.php:77 +#: catavatar.php:52 +msgid "Cat Avatar Settings" +msgstr "Impostazioni Avatar Gatto" + +#: catavatar.php:53 +msgid "Set default profile avatar or randomize the cat." +msgstr "Imposta l'immagine di profilo predefinita o crea un gatto casuale." + +#: catavatar.php:78 msgid "The cat hadn't found itself." msgstr "Il gatto non ha trovato sé stesso." -#: catavatar.php:86 +#: catavatar.php:87 msgid "There was an error, the cat ran away." msgstr "Si è verificato un errore, il gatto è scappato." -#: catavatar.php:92 +#: catavatar.php:93 msgid "Profile Photos" msgstr "Foto del profilo" -#: catavatar.php:102 +#: catavatar.php:108 msgid "Meow!" msgstr "Miao!" diff --git a/catavatar/lang/it/strings.php b/catavatar/lang/it/strings.php index 8f78b3fe..3a33374a 100644 --- a/catavatar/lang/it/strings.php +++ b/catavatar/lang/it/strings.php @@ -3,13 +3,13 @@ if(! function_exists("string_plural_select_it")) { function string_plural_select_it($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} -$a->strings['Set default profile avatar or randomize the cat.'] = 'Imposta l\'immagine di profilo predefinita o crea un gatto casuale.'; -$a->strings['Cat Avatar Settings'] = 'Impostazioni Avatar Gatto'; $a->strings['Use Cat as Avatar'] = 'Usa il Gatto come avatar'; -$a->strings['Another random Cat!'] = 'Un altro Gatto casuale!'; +$a->strings['More Random Cat!'] = 'Altro Gatto a caso!'; $a->strings['Reset to email Cat'] = 'Reimposta Gatto'; +$a->strings['Cat Avatar Settings'] = 'Impostazioni Avatar Gatto'; +$a->strings['Set default profile avatar or randomize the cat.'] = 'Imposta l\'immagine di profilo predefinita o crea un gatto casuale.'; $a->strings['The cat hadn\'t found itself.'] = 'Il gatto non ha trovato sé stesso.'; $a->strings['There was an error, the cat ran away.'] = 'Si è verificato un errore, il gatto è scappato.'; $a->strings['Profile Photos'] = 'Foto del profilo'; diff --git a/circle_text/group_text.php b/circle_text/group_text.php deleted file mode 100644 index b52cbc19..00000000 --- a/circle_text/group_text.php +++ /dev/null @@ -1,64 +0,0 @@ - - */ - -use Friendica\Core\Hook; -use Friendica\Core\Renderer; -use Friendica\DI; - -function circle_text_install() -{ - Hook::register('addon_settings', __FILE__, 'circle_text_settings'); - Hook::register('addon_settings_post', __FILE__, 'circle_text_settings_post'); -} - -/** - * - * Callback from the settings post function. - * $post contains the $_POST array. - * We will make sure we've got a valid user account - * and if so set our configuration setting for this person. - * - */ - -function circle_text_settings_post(array $post) -{ - if (!DI::userSession()->getLocalUserId() || empty($post['circle_text-submit'])) { - return; - } - - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'circle_edit_image_limit', intval($post['circle_text'])); -} - - -/** - * - * Called from the Addon Setting form. - * Add our own settings info to the page. - * - */ - -function circle_text_settings(array &$data) -{ - if (!DI::userSession()->getLocalUserId()) { - return; - } - - $enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'circle_edit_image_limit') ?? - DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'groupedit_image_limit'); - - $t = Renderer::getMarkupTemplate('settings.tpl', 'addon/circle_text/'); - $html = Renderer::replaceMacros($t, [ - '$enabled' => ['circle_text', DI::l10n()->t('Use a text only (non-image) circle selector in the "circle edit" menu'), $enabled], - ]); - - $data = [ - 'addon' => 'circle_text', - 'title' => DI::l10n()->t('Circle Text'), - 'html' => $html, - ]; -} diff --git a/circle_text/lang/C/messages.po b/circle_text/lang/C/messages.po deleted file mode 100644 index 27c0e60e..00000000 --- a/circle_text/lang/C/messages.po +++ /dev/null @@ -1,26 +0,0 @@ -# ADDON circle_text -# Copyright (C) -# This file is distributed under the same license as the Friendica circle_text addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:48-0400\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: group_text.php:56 -msgid "Use a text only (non-image) circle selector in the \"circle edit\" menu" -msgstr "" - -#: group_text.php:61 -msgid "Circle Text" -msgstr "" diff --git a/circle_text/lang/ar/messages.po b/circle_text/lang/ar/messages.po deleted file mode 100644 index cfe9bb63..00000000 --- a/circle_text/lang/ar/messages.po +++ /dev/null @@ -1,32 +0,0 @@ -# ADDON group_text -# Copyright (C) -# This file is distributed under the same license as the Friendica group_text addon package. -# -# -# Translators: -# Farida Khalaf , 2021 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2021-02-21 02:59+0000\n" -"Last-Translator: Farida Khalaf \n" -"Language-Team: Arabic (http://www.transifex.com/Friendica/friendica/language/ar/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ar\n" -"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" - -#: group_text.php:62 -msgid "Group Text" -msgstr "نص المجموعة:" - -#: group_text.php:64 -msgid "Use a text only (non-image) group selector in the \"group edit\" menu" -msgstr "استخدم محدد نصي للمجموعة فقط (غير مصور) في قائمة \"تعديل المجموعة\"" - -#: group_text.php:70 -msgid "Save Settings" -msgstr "حفظ الإعدادات" diff --git a/circle_text/lang/ar/strings.php b/circle_text/lang/ar/strings.php deleted file mode 100644 index 20e8496a..00000000 --- a/circle_text/lang/ar/strings.php +++ /dev/null @@ -1,10 +0,0 @@ -=3 && $n%100<=10) { return 3; } else if ($n%100>=11 && $n%100<=99) { return 4; } else { return 5; } -}} -$a->strings['Group Text'] = 'نص المجموعة:'; -$a->strings['Use a text only (non-image) group selector in the "group edit" menu'] = 'استخدم محدد نصي للمجموعة فقط (غير مصور) في قائمة "تعديل المجموعة"'; -$a->strings['Save Settings'] = 'حفظ الإعدادات'; diff --git a/circle_text/lang/ca/messages.po b/circle_text/lang/ca/messages.po deleted file mode 100644 index 7081c0d7..00000000 --- a/circle_text/lang/ca/messages.po +++ /dev/null @@ -1,36 +0,0 @@ -# ADDON group_text -# Copyright (C) -# This file is distributed under the same license as the Friendica group_text addon package. -# -# -# Translators: -# Joan Bar , 2019 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2019-10-14 00:45+0000\n" -"Last-Translator: Joan Bar \n" -"Language-Team: Catalan (http://www.transifex.com/Friendica/friendica/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: group_text.php:46 -msgid "Group Text settings updated." -msgstr "La configuració del text del grup s'ha actualitzat." - -#: group_text.php:76 -msgid "Group Text" -msgstr "Missatge del grup" - -#: group_text.php:78 -msgid "Use a text only (non-image) group selector in the \"group edit\" menu" -msgstr "Utilitzeu un selector de grup de només text (que no sigui una imatge) al menú 'Edita grup'" - -#: group_text.php:84 -msgid "Submit" -msgstr "sotmetre's" diff --git a/circle_text/lang/ca/strings.php b/circle_text/lang/ca/strings.php deleted file mode 100644 index b28db322..00000000 --- a/circle_text/lang/ca/strings.php +++ /dev/null @@ -1,11 +0,0 @@ -strings['Group Text settings updated.'] = 'La configuració del text del grup s\'ha actualitzat.'; -$a->strings['Group Text'] = 'Missatge del grup'; -$a->strings['Use a text only (non-image) group selector in the "group edit" menu'] = 'Utilitzeu un selector de grup de només text (que no sigui una imatge) al menú \'Edita grup\''; -$a->strings['Submit'] = 'sotmetre\'s'; diff --git a/circle_text/lang/cs/messages.po b/circle_text/lang/cs/messages.po deleted file mode 100644 index 8b56b630..00000000 --- a/circle_text/lang/cs/messages.po +++ /dev/null @@ -1,37 +0,0 @@ -# ADDON group_text -# Copyright (C) -# This file is distributed under the same license as the Friendica group_text addon package. -# -# -# Translators: -# Aditoo, 2018 -# michal_s , 2014-2015 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2018-09-12 09:47+0000\n" -"Last-Translator: Aditoo\n" -"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: cs\n" -"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" - -#: group_text.php:46 -msgid "Group Text settings updated." -msgstr "Nastavení Group Text aktualizována." - -#: group_text.php:76 -msgid "Group Text" -msgstr "Skupinový text" - -#: group_text.php:78 -msgid "Use a text only (non-image) group selector in the \"group edit\" menu" -msgstr "Použijte pouze textový (bezobrázkový) výběr skupiny v menu úpravy skupin." - -#: group_text.php:84 -msgid "Submit" -msgstr "Odeslat" diff --git a/circle_text/lang/cs/strings.php b/circle_text/lang/cs/strings.php deleted file mode 100644 index 510453af..00000000 --- a/circle_text/lang/cs/strings.php +++ /dev/null @@ -1,11 +0,0 @@ -= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; } -}} -$a->strings['Group Text settings updated.'] = 'Nastavení Group Text aktualizována.'; -$a->strings['Group Text'] = 'Skupinový text'; -$a->strings['Use a text only (non-image) group selector in the "group edit" menu'] = 'Použijte pouze textový (bezobrázkový) výběr skupiny v menu úpravy skupin.'; -$a->strings['Submit'] = 'Odeslat'; diff --git a/circle_text/lang/da-dk/messages.po b/circle_text/lang/da-dk/messages.po deleted file mode 100644 index 9f1fbefa..00000000 --- a/circle_text/lang/da-dk/messages.po +++ /dev/null @@ -1,28 +0,0 @@ -# ADDON group_text -# Copyright (C) -# This file is distributed under the same license as the Friendica group_text addon package. -# -# -# Translators: -# Anton , 2022 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2014-06-23 08:35+0000\n" -"Last-Translator: Anton , 2022\n" -"Language-Team: Danish (Denmark) (http://www.transifex.com/Friendica/friendica/language/da_DK/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: da_DK\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: group_text.php:58 -msgid "Use a text only (non-image) group selector in the \"group edit\" menu" -msgstr "Brug en kun-tekst (intet billede) gruppevælger i grupperedigeringsmenuen" - -#: group_text.php:63 -msgid "Group Text" -msgstr "Gruppebesked" diff --git a/circle_text/lang/da-dk/strings.php b/circle_text/lang/da-dk/strings.php deleted file mode 100644 index 4306b769..00000000 --- a/circle_text/lang/da-dk/strings.php +++ /dev/null @@ -1,9 +0,0 @@ -strings['Use a text only (non-image) group selector in the "group edit" menu'] = 'Brug en kun-tekst (intet billede) gruppevælger i grupperedigeringsmenuen'; -$a->strings['Group Text'] = 'Gruppebesked'; diff --git a/circle_text/lang/de/messages.po b/circle_text/lang/de/messages.po deleted file mode 100644 index e4e5d782..00000000 --- a/circle_text/lang/de/messages.po +++ /dev/null @@ -1,31 +0,0 @@ -# ADDON group_text -# Copyright (C) -# This file is distributed under the same license as the Friendica group_text addon package. -# -# -# Translators: -# Andreas H., 2014 -# Tobias Diekershoff , 2014 -# Tobias Diekershoff , 2021 -# Ulf Rompe , 2019 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2014-06-23 08:35+0000\n" -"Last-Translator: Tobias Diekershoff , 2021\n" -"Language-Team: German (http://app.transifex.com/Friendica/friendica/language/de/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: de\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: group_text.php:58 -msgid "Use a text only (non-image) group selector in the \"group edit\" menu" -msgstr "Beim Bearbeiten von Gruppen Text statt Bilder anzeigen" - -#: group_text.php:63 -msgid "Group Text" -msgstr "Gruppen als Text" diff --git a/circle_text/lang/de/strings.php b/circle_text/lang/de/strings.php deleted file mode 100644 index 7a75b54d..00000000 --- a/circle_text/lang/de/strings.php +++ /dev/null @@ -1,9 +0,0 @@ -strings['Use a text only (non-image) group selector in the "group edit" menu'] = 'Beim Bearbeiten von Gruppen Text statt Bilder anzeigen'; -$a->strings['Group Text'] = 'Gruppen als Text'; diff --git a/circle_text/lang/eo/strings.php b/circle_text/lang/eo/strings.php deleted file mode 100644 index 4e220fb0..00000000 --- a/circle_text/lang/eo/strings.php +++ /dev/null @@ -1,5 +0,0 @@ -strings["Group Text"] = ""; -$a->strings["Use a text only (non-image) group selector in the \"group edit\" menu"] = ""; -$a->strings["Submit"] = "Sendi"; diff --git a/circle_text/lang/es/messages.po b/circle_text/lang/es/messages.po deleted file mode 100644 index 5d6d4107..00000000 --- a/circle_text/lang/es/messages.po +++ /dev/null @@ -1,33 +0,0 @@ -# ADDON group_text -# Copyright (C) -# This file is distributed under the same license as the Friendica group_text addon package. -# -# -# Translators: -# Albert, 2016 -# Senex Petrovic , 2021 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2021-04-01 09:56+0000\n" -"Last-Translator: Senex Petrovic \n" -"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: es\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: group_text.php:62 -msgid "Group Text" -msgstr "Grupo de Texto" - -#: group_text.php:64 -msgid "Use a text only (non-image) group selector in the \"group edit\" menu" -msgstr "Utilice sólo el selector de grupo de texto (no imagen) en el menú \"edición de grupo\"" - -#: group_text.php:70 -msgid "Save Settings" -msgstr "Guardar Ajustes" diff --git a/circle_text/lang/es/strings.php b/circle_text/lang/es/strings.php deleted file mode 100644 index 632130fd..00000000 --- a/circle_text/lang/es/strings.php +++ /dev/null @@ -1,10 +0,0 @@ -strings['Group Text'] = 'Grupo de Texto'; -$a->strings['Use a text only (non-image) group selector in the "group edit" menu'] = 'Utilice sólo el selector de grupo de texto (no imagen) en el menú "edición de grupo"'; -$a->strings['Save Settings'] = 'Guardar Ajustes'; diff --git a/circle_text/lang/fi-fi/messages.po b/circle_text/lang/fi-fi/messages.po deleted file mode 100644 index 2e3782fd..00000000 --- a/circle_text/lang/fi-fi/messages.po +++ /dev/null @@ -1,37 +0,0 @@ -# ADDON group_text -# Copyright (C) -# This file is distributed under the same license as the Friendica group_text addon package. -# -# -# Translators: -# Kris, 2018 -# Kris, 2018 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2018-04-08 15:51+0000\n" -"Last-Translator: Kris\n" -"Language-Team: Finnish (Finland) (http://www.transifex.com/Friendica/friendica/language/fi_FI/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: fi_FI\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: group_text.php:46 -msgid "Group Text settings updated." -msgstr "Group Text -asetukset päivitetty." - -#: group_text.php:76 -msgid "Group Text" -msgstr "Group Text" - -#: group_text.php:78 -msgid "Use a text only (non-image) group selector in the \"group edit\" menu" -msgstr "" - -#: group_text.php:84 -msgid "Submit" -msgstr "Lähetä" diff --git a/circle_text/lang/fi-fi/strings.php b/circle_text/lang/fi-fi/strings.php deleted file mode 100644 index 5bcd0ddc..00000000 --- a/circle_text/lang/fi-fi/strings.php +++ /dev/null @@ -1,10 +0,0 @@ -strings['Group Text settings updated.'] = 'Group Text -asetukset päivitetty.'; -$a->strings['Group Text'] = 'Group Text'; -$a->strings['Submit'] = 'Lähetä'; diff --git a/circle_text/lang/fr/messages.po b/circle_text/lang/fr/messages.po deleted file mode 100644 index c076d697..00000000 --- a/circle_text/lang/fr/messages.po +++ /dev/null @@ -1,29 +0,0 @@ -# ADDON group_text -# Copyright (C) -# This file is distributed under the same license as the Friendica group_text addon package. -# -# -# Translators: -# bob lebonche , 2021 -# Hypolite Petovan , 2016 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2014-06-23 08:35+0000\n" -"Last-Translator: bob lebonche , 2021\n" -"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: fr\n" -"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" - -#: group_text.php:58 -msgid "Use a text only (non-image) group selector in the \"group edit\" menu" -msgstr "Utiliser uniquement un groupe de texte (pas d'image) dans le menu \"groupedit\"" - -#: group_text.php:63 -msgid "Group Text" -msgstr "Groupe de texte" diff --git a/circle_text/lang/fr/strings.php b/circle_text/lang/fr/strings.php deleted file mode 100644 index 657d7657..00000000 --- a/circle_text/lang/fr/strings.php +++ /dev/null @@ -1,9 +0,0 @@ -strings['Use a text only (non-image) group selector in the "group edit" menu'] = 'Utiliser uniquement un groupe de texte (pas d\'image) dans le menu "groupedit"'; -$a->strings['Group Text'] = 'Groupe de texte'; diff --git a/circle_text/lang/hu/messages.po b/circle_text/lang/hu/messages.po deleted file mode 100644 index 2c4f19c9..00000000 --- a/circle_text/lang/hu/messages.po +++ /dev/null @@ -1,28 +0,0 @@ -# ADDON group_text -# Copyright (C) -# This file is distributed under the same license as the Friendica group_text addon package. -# -# -# Translators: -# Balázs Úr, 2020-2021 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2014-06-23 08:35+0000\n" -"Last-Translator: Balázs Úr, 2020-2021\n" -"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/language/hu/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: hu\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: group_text.php:58 -msgid "Use a text only (non-image) group selector in the \"group edit\" menu" -msgstr "Csak szöveges (kép nélküli) csoportválasztó használata a „csoportszerkesztés” menüben" - -#: group_text.php:63 -msgid "Group Text" -msgstr "Csoportszöveg" diff --git a/circle_text/lang/hu/strings.php b/circle_text/lang/hu/strings.php deleted file mode 100644 index ac72f9e0..00000000 --- a/circle_text/lang/hu/strings.php +++ /dev/null @@ -1,9 +0,0 @@ -strings['Use a text only (non-image) group selector in the "group edit" menu'] = 'Csak szöveges (kép nélküli) csoportválasztó használata a „csoportszerkesztés” menüben'; -$a->strings['Group Text'] = 'Csoportszöveg'; diff --git a/circle_text/lang/is/strings.php b/circle_text/lang/is/strings.php deleted file mode 100644 index d331b2f9..00000000 --- a/circle_text/lang/is/strings.php +++ /dev/null @@ -1,5 +0,0 @@ -strings["Group Text"] = ""; -$a->strings["Use a text only (non-image) group selector in the \"group edit\" menu"] = ""; -$a->strings["Submit"] = "Senda inn"; diff --git a/circle_text/lang/it/messages.po b/circle_text/lang/it/messages.po deleted file mode 100644 index daab3fb6..00000000 --- a/circle_text/lang/it/messages.po +++ /dev/null @@ -1,33 +0,0 @@ -# ADDON group_text -# Copyright (C) -# This file is distributed under the same license as the Friendica group_text addon package. -# -# -# Translators: -# fabrixxm , 2014-2015 -# Sylke Vicious , 2021 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2021-02-16 12:48+0000\n" -"Last-Translator: Sylke Vicious \n" -"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: it\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: group_text.php:62 -msgid "Group Text" -msgstr "Editor Gruppi Testuale" - -#: group_text.php:64 -msgid "Use a text only (non-image) group selector in the \"group edit\" menu" -msgstr "Usa un selettore testuale (senza immagini) nella pagina \"modifica gruppo\"" - -#: group_text.php:70 -msgid "Save Settings" -msgstr "Salva Impostazioni" diff --git a/circle_text/lang/it/strings.php b/circle_text/lang/it/strings.php deleted file mode 100644 index e52683e9..00000000 --- a/circle_text/lang/it/strings.php +++ /dev/null @@ -1,10 +0,0 @@ -strings['Group Text'] = 'Editor Gruppi Testuale'; -$a->strings['Use a text only (non-image) group selector in the "group edit" menu'] = 'Usa un selettore testuale (senza immagini) nella pagina "modifica gruppo"'; -$a->strings['Save Settings'] = 'Salva Impostazioni'; diff --git a/circle_text/lang/nb-no/strings.php b/circle_text/lang/nb-no/strings.php deleted file mode 100644 index cd9bebd4..00000000 --- a/circle_text/lang/nb-no/strings.php +++ /dev/null @@ -1,5 +0,0 @@ -strings["Group Text"] = ""; -$a->strings["Use a text only (non-image) group selector in the \"group edit\" menu"] = ""; -$a->strings["Submit"] = "Lagre"; diff --git a/circle_text/lang/nl/messages.po b/circle_text/lang/nl/messages.po deleted file mode 100644 index 56b5aae0..00000000 --- a/circle_text/lang/nl/messages.po +++ /dev/null @@ -1,36 +0,0 @@ -# ADDON group_text -# Copyright (C) -# This file is distributed under the same license as the Friendica group_text addon package. -# -# -# Translators: -# Jeroen De Meerleer , 2018 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2018-08-24 13:48+0000\n" -"Last-Translator: Jeroen De Meerleer \n" -"Language-Team: Dutch (http://www.transifex.com/Friendica/friendica/language/nl/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: nl\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: group_text.php:46 -msgid "Group Text settings updated." -msgstr "Groupsberichten instellingen opgeslagen" - -#: group_text.php:76 -msgid "Group Text" -msgstr "Groepsbericht" - -#: group_text.php:78 -msgid "Use a text only (non-image) group selector in the \"group edit\" menu" -msgstr "" - -#: group_text.php:84 -msgid "Submit" -msgstr "" diff --git a/circle_text/lang/nl/strings.php b/circle_text/lang/nl/strings.php deleted file mode 100644 index ba3cb3ec..00000000 --- a/circle_text/lang/nl/strings.php +++ /dev/null @@ -1,9 +0,0 @@ -strings['Group Text settings updated.'] = 'Groupsberichten instellingen opgeslagen'; -$a->strings['Group Text'] = 'Groepsbericht'; diff --git a/circle_text/lang/pl/messages.po b/circle_text/lang/pl/messages.po deleted file mode 100644 index a1d6a3c8..00000000 --- a/circle_text/lang/pl/messages.po +++ /dev/null @@ -1,28 +0,0 @@ -# ADDON group_text -# Copyright (C) -# This file is distributed under the same license as the Friendica group_text addon package. -# -# -# Translators: -# Waldemar Stoczkowski, 2018 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2014-06-23 08:35+0000\n" -"Last-Translator: Waldemar Stoczkowski, 2018\n" -"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: pl\n" -"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" - -#: group_text.php:58 -msgid "Use a text only (non-image) group selector in the \"group edit\" menu" -msgstr "Użyj tylko tekst (bez obrazu) selektor grupy w menu \"Edycja grupy\"" - -#: group_text.php:63 -msgid "Group Text" -msgstr "Grupuj tekst" diff --git a/circle_text/lang/pl/strings.php b/circle_text/lang/pl/strings.php deleted file mode 100644 index 96157c99..00000000 --- a/circle_text/lang/pl/strings.php +++ /dev/null @@ -1,9 +0,0 @@ -=2 && $n%10<=4) && ($n%100<12 || $n%100>14)) { return 1; } else if ($n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14)) { return 2; } else { return 3; } -}} -$a->strings['Use a text only (non-image) group selector in the "group edit" menu'] = 'Użyj tylko tekst (bez obrazu) selektor grupy w menu "Edycja grupy"'; -$a->strings['Group Text'] = 'Grupuj tekst'; diff --git a/circle_text/lang/pt-br/strings.php b/circle_text/lang/pt-br/strings.php deleted file mode 100644 index 4579a5b1..00000000 --- a/circle_text/lang/pt-br/strings.php +++ /dev/null @@ -1,5 +0,0 @@ -strings["Group Text"] = ""; -$a->strings["Use a text only (non-image) group selector in the \"group edit\" menu"] = ""; -$a->strings["Submit"] = "Enviar"; diff --git a/circle_text/lang/ro/messages.po b/circle_text/lang/ro/messages.po deleted file mode 100644 index c912f113..00000000 --- a/circle_text/lang/ro/messages.po +++ /dev/null @@ -1,36 +0,0 @@ -# ADDON group_text -# Copyright (C) -# This file is distributed under the same license as the Friendica group_text addon package. -# -# -# Translators: -# Doru DEACONU , 2014 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2014-11-27 14:15+0000\n" -"Last-Translator: Doru DEACONU \n" -"Language-Team: Romanian (Romania) (http://www.transifex.com/projects/p/friendica/language/ro_RO/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ro_RO\n" -"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" - -#: group_text.php:46 -msgid "Group Text settings updated." -msgstr "Configurările Text Grup, au fost actualizate." - -#: group_text.php:76 -msgid "Group Text" -msgstr "Text Grup" - -#: group_text.php:78 -msgid "Use a text only (non-image) group selector in the \"group edit\" menu" -msgstr "Folosiți în meniul \"editare grup\" un selector de grup strict textual (fără-imagine)" - -#: group_text.php:84 -msgid "Submit" -msgstr "Trimite" diff --git a/circle_text/lang/ro/strings.php b/circle_text/lang/ro/strings.php deleted file mode 100644 index 892ffc68..00000000 --- a/circle_text/lang/ro/strings.php +++ /dev/null @@ -1,11 +0,0 @@ -19)||(($n%100==0)&&($n!=0)))) { return 2; } else { return 1; } -}} -$a->strings['Group Text settings updated.'] = 'Configurările Text Grup, au fost actualizate.'; -$a->strings['Group Text'] = 'Text Grup'; -$a->strings['Use a text only (non-image) group selector in the "group edit" menu'] = 'Folosiți în meniul "editare grup" un selector de grup strict textual (fără-imagine)'; -$a->strings['Submit'] = 'Trimite'; diff --git a/circle_text/lang/ru/messages.po b/circle_text/lang/ru/messages.po deleted file mode 100644 index 05a25367..00000000 --- a/circle_text/lang/ru/messages.po +++ /dev/null @@ -1,36 +0,0 @@ -# ADDON group_text -# Copyright (C) -# This file is distributed under the same license as the Friendica group_text addon package. -# -# -# Translators: -# Stanislav N. , 2017 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2017-04-08 17:26+0000\n" -"Last-Translator: Stanislav N. \n" -"Language-Team: Russian (http://www.transifex.com/Friendica/friendica/language/ru/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" - -#: group_text.php:46 -msgid "Group Text settings updated." -msgstr "Настройки Group Text обновлены." - -#: group_text.php:76 -msgid "Group Text" -msgstr "Group Text" - -#: group_text.php:78 -msgid "Use a text only (non-image) group selector in the \"group edit\" menu" -msgstr "Используйте текстовый (не изображение) селектор группы в режиме редактирования группы" - -#: group_text.php:84 -msgid "Submit" -msgstr "Добавить" diff --git a/circle_text/lang/ru/strings.php b/circle_text/lang/ru/strings.php deleted file mode 100644 index 0f74e7ca..00000000 --- a/circle_text/lang/ru/strings.php +++ /dev/null @@ -1,11 +0,0 @@ -=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; } -}} -$a->strings['Group Text settings updated.'] = 'Настройки Group Text обновлены.'; -$a->strings['Group Text'] = 'Group Text'; -$a->strings['Use a text only (non-image) group selector in the "group edit" menu'] = 'Используйте текстовый (не изображение) селектор группы в режиме редактирования группы'; -$a->strings['Submit'] = 'Добавить'; diff --git a/circle_text/lang/sv/messages.po b/circle_text/lang/sv/messages.po deleted file mode 100644 index 8ddc1806..00000000 --- a/circle_text/lang/sv/messages.po +++ /dev/null @@ -1,28 +0,0 @@ -# ADDON group_text -# Copyright (C) -# This file is distributed under the same license as the Friendica group_text addon package. -# -# -# Translators: -# Kristoffer Grundström , 2022 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2022-01-16 00:35+0000\n" -"Last-Translator: Kristoffer Grundström \n" -"Language-Team: Swedish (http://www.transifex.com/Friendica/friendica/language/sv/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: sv\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: group_text.php:58 -msgid "Use a text only (non-image) group selector in the \"group edit\" menu" -msgstr "" - -#: group_text.php:63 -msgid "Group Text" -msgstr "Grupptext" diff --git a/circle_text/lang/sv/strings.php b/circle_text/lang/sv/strings.php deleted file mode 100644 index 5d5e98db..00000000 --- a/circle_text/lang/sv/strings.php +++ /dev/null @@ -1,8 +0,0 @@ -strings['Group Text'] = 'Grupptext'; diff --git a/circle_text/lang/zh-cn/strings.php b/circle_text/lang/zh-cn/strings.php deleted file mode 100644 index a7b37bf2..00000000 --- a/circle_text/lang/zh-cn/strings.php +++ /dev/null @@ -1,6 +0,0 @@ -strings["Group Text settings updated."] = "组正文设置更新了。"; -$a->strings["Group Text"] = "组正文"; -$a->strings["Use a text only (non-image) group selector in the \"group edit\" menu"] = "用光正文(无图片)组选择器在「组编辑」单"; -$a->strings["Submit"] = "提交"; diff --git a/circle_text/templates/settings.tpl b/circle_text/templates/settings.tpl deleted file mode 100644 index 2f3f4ce7..00000000 --- a/circle_text/templates/settings.tpl +++ /dev/null @@ -1 +0,0 @@ -{{include file="field_checkbox.tpl" field=$enabled}} diff --git a/cld/README.md b/cld/README.md deleted file mode 100644 index 933dbcee..00000000 --- a/cld/README.md +++ /dev/null @@ -1,85 +0,0 @@ -Compact Language Detector -=== -CLD2 is an advanced language dectection library with a high reliability. - -This addon depends on the CLD PHP module which is not included in any Linux distribution. -It needs to be built and installed by hand, which is not totally straightforward. - -Prerequisite ---- -To be able to build the extension, you need the CLD module and the files for the PHP module development. -On Debian you install the packages php-dev, libcld2-dev and libcld2-0. -Make sure to have installed the correct PHP version. -Means: When you have got both PHP 8.0 and 8.2 on your system, you have to install php8.0-dev as well. - -Installation ---- -The original PHP extension is https://github.com/fntlnz/cld2-php-ext. -However, it doesn't support PHP8. -So https://github.com/hiteule/cld2-php-ext/tree/support-php8 has to be used. - -Download the source code: -``` -wget https://github.com/hiteule/cld2-php-ext/archive/refs/heads/support-php8.zip -``` - -Unzip it: -``` -unzip support-php8.zip -``` - -Change into the folder: -``` -cd cld2-php-ext-support-php8/ -``` - -Configure for the PHP Api version: -``` -phpize -``` -(if you have got several PHP versions on your system, execute the command with the version that you run Friendica with, e.g. `phpize8.0`) - -Create the Makefile: -``` -./configure --with-cld2=/usr/include/cld2 -``` - -Have a look at the line `checking for PHP includes`. -When the output (for example `/usr/include/php/20220829` doesn't match the API version that you got from `phpize`, then you have to change all the version codes in your `Makefile` afterwards) - -Create the module: -``` -make -j -``` - -Install it: -``` -sudo make install -``` - -Change to the folder with the available modules. When you use PHP 8.2 on Debian it is: -``` -cd /etc/php/8.2/mods-available -``` - -Create the file `cld2.ini` with this content: -``` -; configuration for php cld2 module -; priority=20 -extension=cld2.so -``` - -Enable the module for all versions and all sapi: -``` -phpenmod -v ALL -s ALL cld2 -``` - -Then restart the apache or fpm (or whatever you use) to load the changed configuration. - -Call `/admin/phpinfo` on your webserver. -You then see the PHP Info. -Search for "cld2". -The module is installed, when you find it here. -**Only proceed when the module is installed** - -Now you can enable the addon. \ No newline at end of file diff --git a/cld/cld.php b/cld/cld.php deleted file mode 100644 index d4fef6c5..00000000 --- a/cld/cld.php +++ /dev/null @@ -1,80 +0,0 @@ - - */ - -use Friendica\Core\Hook; -use Friendica\DI; - -function cld_install() -{ - Hook::register('detect_languages', __FILE__, 'cld_detect_languages'); -} - -function cld_detect_languages(array &$data) -{ - if (!in_array('cld2', get_loaded_extensions())) { - DI::logger()->warning('CLD2 is not installed.'); - return; - } - - if (!class_exists('CLD2Detector')) { - DI::logger()->warning('CLD2Detector class does not exist.'); - return; - } - - if (!class_exists('CLD2Encoding')) { - DI::logger()->warning('CLD2Encoding class does not exist.'); - return; - } - - $cld2 = new \CLD2Detector(); - - $cld2->setEncodingHint(CLD2Encoding::UTF8); // optional, hints about text encoding - $cld2->setPlainText(true); - - $result = $cld2->detect($data['text']); - - if ($data['detected']) { - $original = array_key_first($data['detected']); - } else { - $original = ''; - } - - $detected = DI::l10n()->toISO6391($result['language_code']); - - // languages that aren't supported via the base language detection or tend to false detections - if ((strlen($detected) == 3) || in_array($detected, ['ht', 'kk', 'ku', 'ky', 'lg', 'mg', 'mk', 'mt', 'ny', 'rw', 'st', 'su', 'tg', 'ts', 'xx'])) { - return; - } - - if (!$result['is_reliable']) { - DI::logger()->debug('Unreliable detection', ['uri-id' => $data['uri-id'], 'original' => $original, 'detected' => $detected, 'name' => $result['language_name'], 'probability' => $result['language_probability'], 'text' => $data['text']]); - if (($original == $detected) && ($data['detected'][$original] < $result['language_probability'] / 100)) { - $data['detected'][$original] = $result['language_probability'] / 100; - } - return; - } - - $available = array_keys(DI::l10n()->getLanguageCodes()); - - if (!in_array($detected, $available)) { - DI::logger()->debug('Unsupported language', ['uri-id' => $data['uri-id'], 'original' => $original, 'detected' => $detected, 'name' => $result['language_name'], 'probability' => $result['language_probability'], 'text' => $data['text']]); - return; - } - - if ($original != $detected) { - DI::logger()->debug('Detected different language', ['uri-id' => $data['uri-id'], 'original' => $original, 'detected' => $detected, 'name' => $result['language_name'], 'probability' => $result['language_probability'], 'text' => $data['text']]); - } - - $length = count($data['detected']); - if ($length > 0) { - unset($data['detected'][$detected]); - $data['detected'] = array_merge([$detected => $result['language_probability'] / 100], array_slice($data['detected'], 0, $length - 1)); - } else { - $data['detected'] = [$detected => $result['language_probability'] / 100]; - } -} diff --git a/convert/UnitConvertor.php b/convert/UnitConvertor.php index a3650e9b..d7933a8f 100644 --- a/convert/UnitConvertor.php +++ b/convert/UnitConvertor.php @@ -169,6 +169,7 @@ class UnitConvertor * @param string name of the source unit from which to convert * @param string name of the target unit to which we are converting * @param integer double precision of the end result + * @return void * @access public */ function convert($value, $from_unit, $to_unit, $precision) @@ -279,4 +280,4 @@ class UnitConvertor } // end func getConvSpecs } // end class UnitConvertor -?> +?> \ No newline at end of file diff --git a/convert/convert.php b/convert/convert.php index 2545974c..57ce6ea8 100644 --- a/convert/convert.php +++ b/convert/convert.php @@ -6,6 +6,7 @@ * Author: Mike Macgirvin */ +use Friendica\App; use Friendica\Core\Hook; function convert_install() { @@ -25,7 +26,7 @@ function convert_content() { // @TODO Let's one day rewrite this to a modern composer package include 'UnitConvertor.php'; - $conv = new class('en') extends UnitConvertor + class TP_Converter extends UnitConvertor { public function __construct(string $lang = 'en') { @@ -42,7 +43,7 @@ function convert_content() { private function findBaseUnit($from, $to) { - foreach ($this->bases as $skey => $sval) { + while (list($skey, $sval) = each($this->bases)) { if ($skey == $from || $to == $skey || in_array($to, $sval) || in_array($from, $sval)) { return $skey; } @@ -62,7 +63,7 @@ function convert_content() { $cells[] = $cell; // We now have the base unit and value now lets produce the table; - foreach ($this->bases[$base_unit] as $val) { + while (list($key, $val) = each($this->bases[$base_unit])) { $cell ['value'] = $this->convert($value, $from_unit, $val, $precision) . ' ' . $val; $cell ['class'] = ($val == $from_unit || $val == $to_unit) ? 'framedred' : ''; $cells[] = $cell; @@ -85,7 +86,9 @@ function convert_content() { return $string; } - }; + } + + $conv = new TP_Converter('en'); $conversions = [ 'Temperature' => ['base' => 'Celsius', @@ -173,15 +176,15 @@ function convert_content() { ] ]; - foreach ($conversions as $key => $val) { + while (list($key, $val) = each($conversions)) { $conv->addConversion($val['base'], $val['conv']); $list[$key][] = $val['base']; - foreach ($val['conv'] as $ukey => $uval) { + while (list($ukey, $uval) = each($val['conv'])) { $list[$key][] = $ukey; } } - $o = '

Unit Conversions

'; + $o .= '

Unit Conversions

'; if (isset($_POST['from_unit']) && isset($_POST['value'])) { $o .= ($conv->getTable(intval($_POST['value']), $_POST['from_unit'], $_POST['to_unit'], 5)) . '

'; @@ -199,9 +202,10 @@ function convert_content() { $o .= ''; $o .= ' diff --git a/invidious/templates/settings.tpl b/invidious/templates/settings.tpl deleted file mode 100644 index 387286ef..00000000 --- a/invidious/templates/settings.tpl +++ /dev/null @@ -1,2 +0,0 @@ -{{include file="field_checkbox.tpl" field=$enabled}} -{{include file="field_input.tpl" field=$server}} diff --git a/irc/irc.php b/irc/irc.php index a0cb899e..8bd05fb7 100644 --- a/irc/irc.php +++ b/irc/irc.php @@ -7,6 +7,7 @@ * Author: Tobias Diekershoff */ +use Friendica\App; use Friendica\Core\Hook; use Friendica\Core\Renderer; use Friendica\DI; @@ -72,9 +73,8 @@ function irc_module() {} function irc_content() { - $baseurl = DI::baseUrl() . '/addon/irc'; + $baseurl = DI::baseUrl()->get() . '/addon/irc'; $o = ''; - $usernick = ''; /* set the list of popular channels */ if (DI::userSession()->getLocalUserId()) { @@ -82,7 +82,6 @@ function irc_content() if (!$sitechats) { $sitechats = DI::config()->get('irc', 'sitechats'); } - $usernick = "nick=" . DI::userSession()->getLocalUserNickname() . "&"; } else { $sitechats = DI::config()->get('irc','sitechats'); } @@ -96,7 +95,7 @@ function irc_content() DI::page()['aside'] .= '

' . DI::l10n()->t('Popular Channels') . '

'; @@ -119,7 +118,7 @@ function irc_content() $o .= <<< EOT

IRC chat

A beginner's guide to using IRC. [en]

- + EOT; return $o; diff --git a/irc/lang/bg/messages.po b/irc/lang/bg/messages.po deleted file mode 100644 index 6c227e4c..00000000 --- a/irc/lang/bg/messages.po +++ /dev/null @@ -1,62 +0,0 @@ -# ADDON irc -# Copyright (C) -# This file is distributed under the same license as the Friendica irc addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2014-06-23 08:41+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: irc.php:32 -msgid "" -"Here you can change the system wide settings for the channels to " -"automatically join and access via the side bar. Note the changes you do " -"here, only effect the channel selection if you are logged in." -msgstr "" - -#: irc.php:33 irc.php:133 -msgid "Channel(s) to auto connect (comma separated)" -msgstr "" - -#: irc.php:33 irc.php:133 -msgid "" -"List of channels that shall automatically connected to when the app is " -"launched." -msgstr "" - -#: irc.php:34 irc.php:134 -msgid "Popular Channels (comma separated)" -msgstr "" - -#: irc.php:34 irc.php:134 -msgid "" -"List of popular channels, will be displayed at the side and hotlinked for " -"easy joining." -msgstr "" - -#: irc.php:39 -msgid "IRC Settings" -msgstr "" - -#: irc.php:60 -msgid "IRC Chatroom" -msgstr "" - -#: irc.php:88 -msgid "Popular Channels" -msgstr "" - -#: irc.php:132 -msgid "Save Settings" -msgstr "" diff --git a/irc/lang/bg/strings.php b/irc/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/irc/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: irc.php:32 -msgid "" -"Here you can change the system wide settings for the channels to " -"automatically join and access via the side bar. Note the changes you do " -"here, only effect the channel selection if you are logged in." -msgstr "" - -#: irc.php:33 irc.php:133 -msgid "Channel(s) to auto connect (comma separated)" -msgstr "" - -#: irc.php:33 irc.php:133 -msgid "" -"List of channels that shall automatically connected to when the app is " -"launched." -msgstr "" - -#: irc.php:34 irc.php:134 -msgid "Popular Channels (comma separated)" -msgstr "" - -#: irc.php:34 irc.php:134 -msgid "" -"List of popular channels, will be displayed at the side and hotlinked for " -"easy joining." -msgstr "" - -#: irc.php:39 -msgid "IRC Settings" -msgstr "" - -#: irc.php:60 -msgid "IRC Chatroom" -msgstr "" - -#: irc.php:88 -msgid "Popular Channels" -msgstr "" - -#: irc.php:132 -msgid "Save Settings" -msgstr "" diff --git a/irc/lang/ca/strings.php b/irc/lang/ca/strings.php index d34874f6..561e24c0 100644 --- a/irc/lang/ca/strings.php +++ b/irc/lang/ca/strings.php @@ -1,7 +1,9 @@ -strings["IRC Settings"] = "Ajustos de IRC"; +$a->strings["Channel(s) to auto connect (comma separated)"] = "Canal(s) per auto connectar (separats per comes)"; +$a->strings["Popular Channels (comma separated)"] = "Canals Populars (separats per comes)"; +$a->strings["Submit"] = "Enviar"; +$a->strings["IRC settings saved."] = "Ajustos del IRC guardats."; +$a->strings["IRC Chatroom"] = "IRC Chatroom"; +$a->strings["Popular Channels"] = "Canals Populars"; diff --git a/irc/lang/cs/messages.po b/irc/lang/cs/messages.po index 8f25d7ed..29d5fcea 100644 --- a/irc/lang/cs/messages.po +++ b/irc/lang/cs/messages.po @@ -11,55 +11,59 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2014-06-23 08:41+0000\n" -"Last-Translator: Aditoo, 2018\n" -"Language-Team: Czech (http://app.transifex.com/Friendica/friendica/language/cs/)\n" +"POT-Creation-Date: 2015-07-08 13:17+0200\n" +"PO-Revision-Date: 2018-06-14 14:36+0000\n" +"Last-Translator: Aditoo\n" +"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" "Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" -#: irc.php:32 +#: irc.php:37 +msgid "IRC Settings" +msgstr "Nastavení IRC" + +#: irc.php:38 msgid "" "Here you can change the system wide settings for the channels to " "automatically join and access via the side bar. Note the changes you do " "here, only effect the channel selection if you are logged in." -msgstr "Zde můžete změnit systémová nastavení pro kanály pro automatické spojení a přístup přes postranní lištu. Mějte na paměti, že změny, které zde provedete, ovlivní výběr kanálů pouze, pokud jste přihlášen/a." +msgstr "" -#: irc.php:33 irc.php:133 +#: irc.php:39 irc.php:136 +msgid "Save Settings" +msgstr "Uložit nastavení" + +#: irc.php:40 irc.php:137 msgid "Channel(s) to auto connect (comma separated)" msgstr "Kanál(y) pro automatické připojení (oddělené čárkami)" -#: irc.php:33 irc.php:133 +#: irc.php:40 irc.php:137 msgid "" "List of channels that shall automatically connected to when the app is " "launched." msgstr "Seznam kanálů, které budou při spuštění aplikace automaticky připojeny." -#: irc.php:34 irc.php:134 +#: irc.php:41 irc.php:138 msgid "Popular Channels (comma separated)" msgstr "Populární kanály (oddělené čárkami)" -#: irc.php:34 irc.php:134 +#: irc.php:41 irc.php:138 msgid "" "List of popular channels, will be displayed at the side and hotlinked for " "easy joining." msgstr "Seznam populárních kanálů, bude zobrazen na straně a bude obsahovat odkazy pro snadné připojení." -#: irc.php:39 -msgid "IRC Settings" -msgstr "Nastavení IRC" +#: irc.php:57 irc.php:128 +msgid "IRC settings saved." +msgstr "IRC Nastavení uloženo." -#: irc.php:60 +#: irc.php:62 msgid "IRC Chatroom" msgstr "IRC Místnost" -#: irc.php:88 +#: irc.php:90 msgid "Popular Channels" msgstr "Populární kanály" - -#: irc.php:132 -msgid "Save Settings" -msgstr "Uložit nastavení" diff --git a/irc/lang/cs/strings.php b/irc/lang/cs/strings.php index 6c6d5aea..89431a1c 100644 --- a/irc/lang/cs/strings.php +++ b/irc/lang/cs/strings.php @@ -5,12 +5,12 @@ function string_plural_select_cs($n){ $n = intval($n); if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; } }} -$a->strings['Here you can change the system wide settings for the channels to automatically join and access via the side bar. Note the changes you do here, only effect the channel selection if you are logged in.'] = 'Zde můžete změnit systémová nastavení pro kanály pro automatické spojení a přístup přes postranní lištu. Mějte na paměti, že změny, které zde provedete, ovlivní výběr kanálů pouze, pokud jste přihlášen/a.'; +$a->strings['IRC Settings'] = 'Nastavení IRC'; +$a->strings['Save Settings'] = 'Uložit nastavení'; $a->strings['Channel(s) to auto connect (comma separated)'] = 'Kanál(y) pro automatické připojení (oddělené čárkami)'; $a->strings['List of channels that shall automatically connected to when the app is launched.'] = 'Seznam kanálů, které budou při spuštění aplikace automaticky připojeny.'; $a->strings['Popular Channels (comma separated)'] = 'Populární kanály (oddělené čárkami)'; $a->strings['List of popular channels, will be displayed at the side and hotlinked for easy joining.'] = 'Seznam populárních kanálů, bude zobrazen na straně a bude obsahovat odkazy pro snadné připojení.'; -$a->strings['IRC Settings'] = 'Nastavení IRC'; +$a->strings['IRC settings saved.'] = 'IRC Nastavení uloženo.'; $a->strings['IRC Chatroom'] = 'IRC Místnost'; $a->strings['Popular Channels'] = 'Populární kanály'; -$a->strings['Save Settings'] = 'Uložit nastavení'; diff --git a/irc/lang/de/messages.po b/irc/lang/de/messages.po index 84c95f4a..4b47999b 100644 --- a/irc/lang/de/messages.po +++ b/irc/lang/de/messages.po @@ -12,9 +12,9 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2014-06-23 08:41+0000\n" -"Last-Translator: Ulf Rompe , 2019\n" -"Language-Team: German (http://app.transifex.com/Friendica/friendica/language/de/)\n" +"PO-Revision-Date: 2021-02-01 18:19+0000\n" +"Last-Translator: Transifex Bot <>\n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/irc/lang/eo/messages.po b/irc/lang/eo/messages.po deleted file mode 100644 index 45888b62..00000000 --- a/irc/lang/eo/messages.po +++ /dev/null @@ -1,62 +0,0 @@ -# ADDON irc -# Copyright (C) -# This file is distributed under the same license as the Friendica irc addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2014-06-23 08:41+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: irc.php:32 -msgid "" -"Here you can change the system wide settings for the channels to " -"automatically join and access via the side bar. Note the changes you do " -"here, only effect the channel selection if you are logged in." -msgstr "" - -#: irc.php:33 irc.php:133 -msgid "Channel(s) to auto connect (comma separated)" -msgstr "" - -#: irc.php:33 irc.php:133 -msgid "" -"List of channels that shall automatically connected to when the app is " -"launched." -msgstr "" - -#: irc.php:34 irc.php:134 -msgid "Popular Channels (comma separated)" -msgstr "" - -#: irc.php:34 irc.php:134 -msgid "" -"List of popular channels, will be displayed at the side and hotlinked for " -"easy joining." -msgstr "" - -#: irc.php:39 -msgid "IRC Settings" -msgstr "" - -#: irc.php:60 -msgid "IRC Chatroom" -msgstr "" - -#: irc.php:88 -msgid "Popular Channels" -msgstr "" - -#: irc.php:132 -msgid "Save Settings" -msgstr "" diff --git a/irc/lang/eo/strings.php b/irc/lang/eo/strings.php index 68e8a64c..92dee9e1 100644 --- a/irc/lang/eo/strings.php +++ b/irc/lang/eo/strings.php @@ -1,7 +1,9 @@ -strings["IRC Settings"] = "IRC Agordoj"; +$a->strings["Channel(s) to auto connect (comma separated)"] = "Aŭtomate konektiĝi al la kanalo(j) (disigita per komo)"; +$a->strings["Popular Channels (comma separated)"] = "Popularaj kanaloj (disigita per komo)"; +$a->strings["Submit"] = "Sendi"; +$a->strings["IRC settings saved."] = "IRC agordoj konservitaj."; +$a->strings["IRC Chatroom"] = "IRC babilejo"; +$a->strings["Popular Channels"] = "Popularaj Kanaloj"; diff --git a/irc/lang/et/messages.po b/irc/lang/et/messages.po deleted file mode 100644 index 216ecdb2..00000000 --- a/irc/lang/et/messages.po +++ /dev/null @@ -1,62 +0,0 @@ -# ADDON irc -# Copyright (C) -# This file is distributed under the same license as the Friendica irc addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2014-06-23 08:41+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: et\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: irc.php:32 -msgid "" -"Here you can change the system wide settings for the channels to " -"automatically join and access via the side bar. Note the changes you do " -"here, only effect the channel selection if you are logged in." -msgstr "" - -#: irc.php:33 irc.php:133 -msgid "Channel(s) to auto connect (comma separated)" -msgstr "" - -#: irc.php:33 irc.php:133 -msgid "" -"List of channels that shall automatically connected to when the app is " -"launched." -msgstr "" - -#: irc.php:34 irc.php:134 -msgid "Popular Channels (comma separated)" -msgstr "" - -#: irc.php:34 irc.php:134 -msgid "" -"List of popular channels, will be displayed at the side and hotlinked for " -"easy joining." -msgstr "" - -#: irc.php:39 -msgid "IRC Settings" -msgstr "" - -#: irc.php:60 -msgid "IRC Chatroom" -msgstr "" - -#: irc.php:88 -msgid "Popular Channels" -msgstr "" - -#: irc.php:132 -msgid "Save Settings" -msgstr "" diff --git a/irc/lang/et/strings.php b/irc/lang/et/strings.php deleted file mode 100644 index dfe78358..00000000 --- a/irc/lang/et/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gd\n" -"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" - -#: irc.php:32 -msgid "" -"Here you can change the system wide settings for the channels to " -"automatically join and access via the side bar. Note the changes you do " -"here, only effect the channel selection if you are logged in." -msgstr "" - -#: irc.php:33 irc.php:133 -msgid "Channel(s) to auto connect (comma separated)" -msgstr "" - -#: irc.php:33 irc.php:133 -msgid "" -"List of channels that shall automatically connected to when the app is " -"launched." -msgstr "" - -#: irc.php:34 irc.php:134 -msgid "Popular Channels (comma separated)" -msgstr "" - -#: irc.php:34 irc.php:134 -msgid "" -"List of popular channels, will be displayed at the side and hotlinked for " -"easy joining." -msgstr "" - -#: irc.php:39 -msgid "IRC Settings" -msgstr "" - -#: irc.php:60 -msgid "IRC Chatroom" -msgstr "" - -#: irc.php:88 -msgid "Popular Channels" -msgstr "" - -#: irc.php:132 -msgid "Save Settings" -msgstr "" diff --git a/irc/lang/gd/strings.php b/irc/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/irc/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/irc/lang/is/messages.po b/irc/lang/is/messages.po deleted file mode 100644 index 3b28f0d0..00000000 --- a/irc/lang/is/messages.po +++ /dev/null @@ -1,62 +0,0 @@ -# ADDON irc -# Copyright (C) -# This file is distributed under the same license as the Friendica irc addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2014-06-23 08:41+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: is\n" -"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" - -#: irc.php:32 -msgid "" -"Here you can change the system wide settings for the channels to " -"automatically join and access via the side bar. Note the changes you do " -"here, only effect the channel selection if you are logged in." -msgstr "" - -#: irc.php:33 irc.php:133 -msgid "Channel(s) to auto connect (comma separated)" -msgstr "" - -#: irc.php:33 irc.php:133 -msgid "" -"List of channels that shall automatically connected to when the app is " -"launched." -msgstr "" - -#: irc.php:34 irc.php:134 -msgid "Popular Channels (comma separated)" -msgstr "" - -#: irc.php:34 irc.php:134 -msgid "" -"List of popular channels, will be displayed at the side and hotlinked for " -"easy joining." -msgstr "" - -#: irc.php:39 -msgid "IRC Settings" -msgstr "" - -#: irc.php:60 -msgid "IRC Chatroom" -msgstr "" - -#: irc.php:88 -msgid "Popular Channels" -msgstr "" - -#: irc.php:132 -msgid "Save Settings" -msgstr "" diff --git a/irc/lang/is/strings.php b/irc/lang/is/strings.php index 975c341e..d4fbd85d 100644 --- a/irc/lang/is/strings.php +++ b/irc/lang/is/strings.php @@ -1,7 +1,9 @@ -strings["IRC Settings"] = "IRC stillingar"; +$a->strings["Channel(s) to auto connect (comma separated)"] = "Tengjast rásum sjálfkrafa (komma á milli)"; +$a->strings["Popular Channels (comma separated)"] = "Vinsælar rásir (komma á milli)"; +$a->strings["Submit"] = "Senda inn"; +$a->strings["IRC settings saved."] = "IRC stillingum vistað"; +$a->strings["IRC Chatroom"] = ""; +$a->strings["Popular Channels"] = ""; diff --git a/irc/lang/it/messages.po b/irc/lang/it/messages.po index 8144342b..bbd199b8 100644 --- a/irc/lang/it/messages.po +++ b/irc/lang/it/messages.po @@ -10,55 +10,59 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2014-06-23 08:41+0000\n" -"Last-Translator: Sylke Vicious , 2020\n" -"Language-Team: Italian (http://app.transifex.com/Friendica/friendica/language/it/)\n" +"POT-Creation-Date: 2015-07-08 13:17+0200\n" +"PO-Revision-Date: 2020-09-17 11:40+0000\n" +"Last-Translator: Sylke Vicious \n" +"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: irc.php:32 +#: irc.php:37 +msgid "IRC Settings" +msgstr "Impostazioni IRC" + +#: irc.php:38 msgid "" "Here you can change the system wide settings for the channels to " "automatically join and access via the side bar. Note the changes you do " "here, only effect the channel selection if you are logged in." msgstr "Qui puoi modificare le impostazioni globali di sistema per i canali a cui accedere automaticamente attraverso la barra laterale. Nota che le modifiche che effetti qui hanno effetto sulla selezione di canali solo se sei loggato." -#: irc.php:33 irc.php:133 +#: irc.php:39 irc.php:136 +msgid "Save Settings" +msgstr "Salva Impostazioni" + +#: irc.php:40 irc.php:137 msgid "Channel(s) to auto connect (comma separated)" msgstr "Canale(i) a cui autocollegarsi (separati da virgola)" -#: irc.php:33 irc.php:133 +#: irc.php:40 irc.php:137 msgid "" "List of channels that shall automatically connected to when the app is " "launched." msgstr "Lista di canali che a cui connettersi automaticamente quando l'app è avviata." -#: irc.php:34 irc.php:134 +#: irc.php:41 irc.php:138 msgid "Popular Channels (comma separated)" msgstr "Canali popolari (separati da virgola)" -#: irc.php:34 irc.php:134 +#: irc.php:41 irc.php:138 msgid "" "List of popular channels, will be displayed at the side and hotlinked for " "easy joining." msgstr "Lista di canali popolari: sarà visualizzata a lato e provvista di collegamento per facilitare l'adesione." -#: irc.php:39 -msgid "IRC Settings" -msgstr "Impostazioni IRC" +#: irc.php:57 irc.php:128 +msgid "IRC settings saved." +msgstr "Impostazioni IRC salvate." -#: irc.php:60 +#: irc.php:62 msgid "IRC Chatroom" msgstr "Stanza IRC" -#: irc.php:88 +#: irc.php:90 msgid "Popular Channels" msgstr "Canali Popolari" - -#: irc.php:132 -msgid "Save Settings" -msgstr "Salva Impostazioni" diff --git a/irc/lang/it/strings.php b/irc/lang/it/strings.php index 09aafe6e..42cf7c0d 100644 --- a/irc/lang/it/strings.php +++ b/irc/lang/it/strings.php @@ -3,14 +3,15 @@ if(! function_exists("string_plural_select_it")) { function string_plural_select_it($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} +$a->strings['IRC Settings'] = 'Impostazioni IRC'; $a->strings['Here you can change the system wide settings for the channels to automatically join and access via the side bar. Note the changes you do here, only effect the channel selection if you are logged in.'] = 'Qui puoi modificare le impostazioni globali di sistema per i canali a cui accedere automaticamente attraverso la barra laterale. Nota che le modifiche che effetti qui hanno effetto sulla selezione di canali solo se sei loggato.'; +$a->strings['Save Settings'] = 'Salva Impostazioni'; $a->strings['Channel(s) to auto connect (comma separated)'] = 'Canale(i) a cui autocollegarsi (separati da virgola)'; $a->strings['List of channels that shall automatically connected to when the app is launched.'] = 'Lista di canali che a cui connettersi automaticamente quando l\'app è avviata.'; $a->strings['Popular Channels (comma separated)'] = 'Canali popolari (separati da virgola)'; $a->strings['List of popular channels, will be displayed at the side and hotlinked for easy joining.'] = 'Lista di canali popolari: sarà visualizzata a lato e provvista di collegamento per facilitare l\'adesione.'; -$a->strings['IRC Settings'] = 'Impostazioni IRC'; +$a->strings['IRC settings saved.'] = 'Impostazioni IRC salvate.'; $a->strings['IRC Chatroom'] = 'Stanza IRC'; $a->strings['Popular Channels'] = 'Canali Popolari'; -$a->strings['Save Settings'] = 'Salva Impostazioni'; diff --git a/irc/lang/ru/messages.po b/irc/lang/ru/messages.po deleted file mode 100644 index 318fdbd2..00000000 --- a/irc/lang/ru/messages.po +++ /dev/null @@ -1,62 +0,0 @@ -# ADDON irc -# Copyright (C) -# This file is distributed under the same license as the Friendica irc addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2014-06-23 08:41+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Russian (http://app.transifex.com/Friendica/friendica/language/ru/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" - -#: irc.php:32 -msgid "" -"Here you can change the system wide settings for the channels to " -"automatically join and access via the side bar. Note the changes you do " -"here, only effect the channel selection if you are logged in." -msgstr "" - -#: irc.php:33 irc.php:133 -msgid "Channel(s) to auto connect (comma separated)" -msgstr "" - -#: irc.php:33 irc.php:133 -msgid "" -"List of channels that shall automatically connected to when the app is " -"launched." -msgstr "" - -#: irc.php:34 irc.php:134 -msgid "Popular Channels (comma separated)" -msgstr "" - -#: irc.php:34 irc.php:134 -msgid "" -"List of popular channels, will be displayed at the side and hotlinked for " -"easy joining." -msgstr "" - -#: irc.php:39 -msgid "IRC Settings" -msgstr "" - -#: irc.php:60 -msgid "IRC Chatroom" -msgstr "" - -#: irc.php:88 -msgid "Popular Channels" -msgstr "" - -#: irc.php:132 -msgid "Save Settings" -msgstr "" diff --git a/irc/lang/ru/strings.php b/irc/lang/ru/strings.php index 0579fc21..84131f0b 100644 --- a/irc/lang/ru/strings.php +++ b/irc/lang/ru/strings.php @@ -1,7 +1,9 @@ -=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; } -}} +strings["IRC Settings"] = ""; +$a->strings["Channel(s) to auto connect (comma separated)"] = ""; +$a->strings["Popular Channels (comma separated)"] = ""; +$a->strings["Submit"] = "Подтвердить"; +$a->strings["IRC settings saved."] = ""; +$a->strings["IRC Chatroom"] = ""; +$a->strings["Popular Channels"] = ""; diff --git a/js_upload/file-uploader/server/php.php b/js_upload/file-uploader/server/php.php index ff485dec..2248c8f0 100644 --- a/js_upload/file-uploader/server/php.php +++ b/js_upload/file-uploader/server/php.php @@ -77,10 +77,10 @@ class qqFileUploader { public function __construct(array $allowedExtensions = [], $sizeLimit = 10485760) { $allowedExtensions = array_map('strtolower', $allowedExtensions); - + $this->allowedExtensions = $allowedExtensions; $this->sizeLimit = $sizeLimit; - + $this->checkServerSettings(); if (isset($_GET['qqfile'])) { @@ -88,7 +88,7 @@ class qqFileUploader { } elseif (isset($_FILES['qqfile'])) { $this->file = new qqUploadedFileForm(); } else { - $this->file = false; + $this->file = false; } } @@ -105,7 +105,7 @@ class qqFileUploader { private function toBytes(string $str): int { - $val = (int) trim($str); + $val = trim($str); $last = strtolower($str[strlen($str) - 1]); switch($last) { diff --git a/js_upload/file-uploader/tests/action-acceptance.php b/js_upload/file-uploader/tests/action-acceptance.php index 172b8857..fc9583f2 100644 --- a/js_upload/file-uploader/tests/action-acceptance.php +++ b/js_upload/file-uploader/tests/action-acceptance.php @@ -2,12 +2,12 @@ usleep(100000); -$fileName = ''; -$fileSize = 0;; +$fileName; +$fileSize; if (isset($_GET['qqfile'])){ $fileName = $_GET['qqfile']; - + // xhr request $headers = apache_request_headers(); $fileSize = (int)$headers['Content-Length']; @@ -34,13 +34,13 @@ if ($fileSize > 9 * 1024){ die ('{error: "server-error file size is bigger than 9kB"}'); } -if (count($_GET)){ +if (count($_GET)){ array_merge($_GET, array('fileName'=>$fileName)); - + $response = array_merge($_GET, array('success'=>true, 'fileName'=>$fileName)); - - // to pass data through iframe you will need to encode all html tags - echo htmlspecialchars(json_encode($response), ENT_NOQUOTES); + + // to pass data through iframe you will need to encode all html tags + echo htmlspecialchars(json_encode($response), ENT_NOQUOTES); } else { die ('{error: "server-error query params not passed"}'); } diff --git a/js_upload/file-uploader/tests/action-handler-queue-test.php b/js_upload/file-uploader/tests/action-handler-queue-test.php index 78760d64..ff13576d 100644 --- a/js_upload/file-uploader/tests/action-handler-queue-test.php +++ b/js_upload/file-uploader/tests/action-handler-queue-test.php @@ -2,11 +2,11 @@ sleep(4); -$fileName = ''; +$fileName; if (isset($_GET['qqfile'])){ $fileName = $_GET['qqfile']; - + // xhr request $headers = apache_request_headers(); if ((int)$headers['Content-Length'] == 0){ @@ -14,7 +14,7 @@ if (isset($_GET['qqfile'])){ } } elseif (isset($_FILES['qqfile'])){ $fileName = basename($_FILES['qqfile']['name']); - + // form request if ($_FILES['qqfile']['size'] == 0){ die ('{error: "file size is zero"}'); @@ -25,7 +25,7 @@ if (isset($_GET['qqfile'])){ if (count($_GET)){ $_GET['success'] = true; - echo json_encode(array_merge($_GET)); + echo json_encode(array_merge($_GET)); } else { die ('{error: "query params not passed"}'); } diff --git a/js_upload/file-uploader/tests/action-handler-test.php b/js_upload/file-uploader/tests/action-handler-test.php index 9fa72023..24466b12 100644 --- a/js_upload/file-uploader/tests/action-handler-test.php +++ b/js_upload/file-uploader/tests/action-handler-test.php @@ -2,11 +2,11 @@ usleep(300); -$fileName = ''; +$fileName; if (isset($_GET['qqfile'])){ $fileName = $_GET['qqfile']; - + // xhr request $headers = apache_request_headers(); if ((int)$headers['Content-Length'] == 0){ @@ -14,7 +14,7 @@ if (isset($_GET['qqfile'])){ } } elseif (isset($_FILES['qqfile'])){ $fileName = basename($_FILES['qqfile']['name']); - + // form request if ($_FILES['qqfile']['size'] == 0){ die ('{error: "file size is zero"}'); @@ -25,7 +25,7 @@ if (isset($_GET['qqfile'])){ if (count($_GET)){ //return query params - echo json_encode(array_merge($_GET, array('fileName'=>$fileName))); + echo json_encode(array_merge($_GET, array('fileName'=>$fileName))); } else { die ('{error: "query params not passed"}'); } diff --git a/js_upload/js_upload.php b/js_upload/js_upload.php index 4bf91de1..089cb7e2 100644 --- a/js_upload/js_upload.php +++ b/js_upload/js_upload.php @@ -7,10 +7,11 @@ * Maintainer: Hypolite Petovan */ +use Friendica\App; use Friendica\Core\Hook; +use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; -use Friendica\Util\Images; use Friendica\Util\Strings; global $js_upload_jsonresponse; @@ -19,9 +20,9 @@ global $js_upload_result; function js_upload_install() { Hook::register('photo_upload_form', __FILE__, 'js_upload_form'); - Hook::register('photo_post_init', __FILE__, 'js_upload_post_init'); - Hook::register('photo_post_file', __FILE__, 'js_upload_post_file'); - Hook::register('photo_post_end', __FILE__, 'js_upload_post_end'); + Hook::register('photo_post_init', __FILE__, 'js_upload_post_init'); + Hook::register('photo_post_file', __FILE__, 'js_upload_post_file'); + Hook::register('photo_post_end', __FILE__, 'js_upload_post_end'); } function js_upload_form(array &$b) @@ -33,11 +34,11 @@ function js_upload_form(array &$b) $tpl = Renderer::getMarkupTemplate('js_upload.tpl', 'addon/js_upload'); $b['addon_text'] .= Renderer::replaceMacros($tpl, [ - '$upload_msg' => DI::l10n()->t('Select files for upload'), - '$drop_msg' => DI::l10n()->t('Drop files here to upload'), - '$cancel' => DI::l10n()->t('Cancel'), - '$failed' => DI::l10n()->t('Failed'), - '$post_url' => $b['post_url'], + '$upload_msg' => DI::l10n()->t('Select files for upload'), + '$drop_msg' => DI::l10n()->t('Drop files here to upload'), + '$cancel' => DI::l10n()->t('Cancel'), + '$failed' => DI::l10n()->t('Failed'), + '$post_url' => $b['post_url'], '$maximagesize' => Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')), ]); } @@ -47,19 +48,12 @@ function js_upload_post_init(array &$b) global $js_upload_result, $js_upload_jsonresponse; // list of valid extensions - $allowedExtensions = []; - foreach (Images::IMAGETYPES as $type) { - $extension = image_type_to_extension($type, false); - if ($extension == 'jpeg') { - $allowedExtensions[] = 'jpg'; - } - $allowedExtensions[] = $extension; - } + $allowedExtensions = ['jpeg', 'gif', 'png', 'jpg']; // max file size in bytes $sizeLimit = Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')); - $uploader = new js_upload_qqFileUploader($allowedExtensions, $sizeLimit); + $uploader = new qqFileUploader($allowedExtensions, $sizeLimit); $result = $uploader->handleUpload(); @@ -67,7 +61,7 @@ function js_upload_post_init(array &$b) $js_upload_jsonresponse = htmlspecialchars(json_encode($result), ENT_NOQUOTES); if (isset($result['error'])) { - DI::logger()->info('mod/photos.php: photos_post(): error uploading photo: ' . $result['error']); + Logger::info('mod/photos.php: photos_post(): error uploading photo: ' . $result['error']); echo json_encode($result); exit(); } @@ -81,16 +75,17 @@ function js_upload_post_file(array &$b) $result = $js_upload_result; - $b['src'] = $result['path']; + $b['src'] = $result['path']; $b['filename'] = $result['filename']; $b['filesize'] = filesize($b['src']); + } function js_upload_post_end(int &$b) { global $js_upload_jsonresponse; - DI::logger()->notice('upload_post_end'); + Logger::notice('upload_post_end'); if (!empty($js_upload_jsonresponse)) { echo $js_upload_jsonresponse; exit(); @@ -100,7 +95,7 @@ function js_upload_post_end(int &$b) /** * Handle file uploads via XMLHttpRequest */ -class js_upload_qqUploadedFileXhr +class qqUploadedFileXhr { private $pathnm = ''; @@ -154,7 +149,7 @@ class js_upload_qqUploadedFileXhr /** * Handle file uploads via regular form post (uses the $_FILES array) */ -class js_upload_qqUploadedFileForm +class qqUploadedFileForm { /** * Save the file to the specified path @@ -182,17 +177,13 @@ class js_upload_qqUploadedFileForm } } -class js_upload_qqFileUploader +class qqFileUploader { - private $allowedExtensions; - private $sizeLimit; - - /** - * @var js_upload_qqUploadedFileXhr|js_upload_qqUploadedFileForm|false - */ + private $allowedExtensions = []; + private $sizeLimit = 10485760; private $file; - function __construct(array $allowedExtensions = [], $sizeLimit) + function __construct(array $allowedExtensions = [], $sizeLimit = 10485760) { $allowedExtensions = array_map('strtolower', $allowedExtensions); @@ -200,12 +191,13 @@ class js_upload_qqFileUploader $this->sizeLimit = $sizeLimit; if (isset($_GET['qqfile'])) { - $this->file = new js_upload_qqUploadedFileXhr(); + $this->file = new qqUploadedFileXhr(); } elseif (isset($_FILES['qqfile'])) { - $this->file = new js_upload_qqUploadedFileForm(); + $this->file = new qqUploadedFileForm(); } else { $this->file = false; } + } /** @@ -223,9 +215,11 @@ class js_upload_qqFileUploader return ['error' => DI::l10n()->t('Uploaded file is empty')]; } - // if ($size > $this->sizeLimit) { - // return array('error' => DI::l10n()->t('Uploaded file is too large')); - // } +// if ($size > $this->sizeLimit) { + +// return array('error' => DI::l10n()->t('Uploaded file is too large')); +// } + $maximagesize = Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')); @@ -237,7 +231,7 @@ class js_upload_qqFileUploader $filename = $pathinfo['filename']; if (!isset($pathinfo['extension'])) { - DI::logger()->warning('extension isn\'t set.', ['filename' => $filename]); + Logger::warning('extension isn\'t set.', ['filename' => $filename]); } $ext = $pathinfo['extension'] ?? ''; @@ -247,14 +241,14 @@ class js_upload_qqFileUploader if ($this->file->save()) { return [ - 'success' => true, - 'path' => $this->file->getPath(), + 'success' => true, + 'path' => $this->file->getPath(), 'filename' => $filename . '.' . $ext ]; } else { return [ - 'error' => DI::l10n()->t('Upload was cancelled, or server error encountered'), - 'path' => $this->file->getPath(), + 'error' => DI::l10n()->t('Upload was cancelled, or server error encountered'), + 'path' => $this->file->getPath(), 'filename' => $filename . '.' . $ext ]; } diff --git a/js_upload/lang/C/messages.po b/js_upload/lang/C/messages.po index 0d607bd5..4d16fe17 100644 --- a/js_upload/lang/C/messages.po +++ b/js_upload/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:49-0400\n" +"POT-Creation-Date: 2021-03-23 23:53-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,40 +17,40 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: js_upload.php:37 +#: js_upload.php:34 msgid "Select files for upload" msgstr "" -#: js_upload.php:38 +#: js_upload.php:35 msgid "Drop files here to upload" msgstr "" -#: js_upload.php:39 +#: js_upload.php:36 msgid "Cancel" msgstr "" -#: js_upload.php:40 +#: js_upload.php:37 msgid "Failed" msgstr "" -#: js_upload.php:209 +#: js_upload.php:215 msgid "No files were uploaded." msgstr "" -#: js_upload.php:215 +#: js_upload.php:221 msgid "Uploaded file is empty" msgstr "" -#: js_upload.php:227 +#: js_upload.php:233 #, php-format msgid "Image exceeds size limit of %s" msgstr "" -#: js_upload.php:239 +#: js_upload.php:245 #, php-format msgid "File has an invalid extension, it should be one of %s." msgstr "" -#: js_upload.php:250 +#: js_upload.php:256 msgid "Upload was cancelled, or server error encountered" msgstr "" diff --git a/js_upload/lang/bg/messages.po b/js_upload/lang/bg/messages.po deleted file mode 100644 index 65274d18..00000000 --- a/js_upload/lang/bg/messages.po +++ /dev/null @@ -1,57 +0,0 @@ -# ADDON js_upload -# Copyright (C) -# This file is distributed under the same license as the Friendica js_upload addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:49-0400\n" -"PO-Revision-Date: 2014-06-23 08:46+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: js_upload.php:37 -msgid "Select files for upload" -msgstr "" - -#: js_upload.php:38 -msgid "Drop files here to upload" -msgstr "" - -#: js_upload.php:39 -msgid "Cancel" -msgstr "" - -#: js_upload.php:40 -msgid "Failed" -msgstr "" - -#: js_upload.php:209 -msgid "No files were uploaded." -msgstr "" - -#: js_upload.php:215 -msgid "Uploaded file is empty" -msgstr "" - -#: js_upload.php:227 -#, php-format -msgid "Image exceeds size limit of %s" -msgstr "" - -#: js_upload.php:239 -#, php-format -msgid "File has an invalid extension, it should be one of %s." -msgstr "" - -#: js_upload.php:250 -msgid "Upload was cancelled, or server error encountered" -msgstr "" diff --git a/js_upload/lang/bg/strings.php b/js_upload/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/js_upload/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: js_upload.php:37 -msgid "Select files for upload" -msgstr "" - -#: js_upload.php:38 -msgid "Drop files here to upload" -msgstr "" - -#: js_upload.php:39 -msgid "Cancel" -msgstr "" - -#: js_upload.php:40 -msgid "Failed" -msgstr "" - -#: js_upload.php:209 -msgid "No files were uploaded." -msgstr "" - -#: js_upload.php:215 -msgid "Uploaded file is empty" -msgstr "" - -#: js_upload.php:227 -#, php-format -msgid "Image exceeds size limit of %s" -msgstr "" - -#: js_upload.php:239 -#, php-format -msgid "File has an invalid extension, it should be one of %s." -msgstr "" - -#: js_upload.php:250 -msgid "Upload was cancelled, or server error encountered" -msgstr "" diff --git a/js_upload/lang/ca/strings.php b/js_upload/lang/ca/strings.php index d34874f6..85b403f9 100644 --- a/js_upload/lang/ca/strings.php +++ b/js_upload/lang/ca/strings.php @@ -1,7 +1,11 @@ -strings["Upload a file"] = "Carrega un arxiu"; +$a->strings["Drop files here to upload"] = "Deixa aquí el arxiu a carregar"; +$a->strings["Cancel"] = "Cancel·lar"; +$a->strings["Failed"] = "Fracassar"; +$a->strings["No files were uploaded."] = "No hi ha arxius carregats."; +$a->strings["Uploaded file is empty"] = "L'arxiu carregat està buit"; +$a->strings["Image exceeds size limit of "] = "La imatge excedeix el límit de "; +$a->strings["File has an invalid extension, it should be one of "] = "Arxiu té una extensió no vàlida, ha de ser una de"; +$a->strings["Upload was cancelled, or server error encountered"] = "La pujada va ser cancel.lada, o es va trobar un error de servidor"; diff --git a/js_upload/lang/cs/messages.po b/js_upload/lang/cs/messages.po index 1241523f..731d165c 100644 --- a/js_upload/lang/cs/messages.po +++ b/js_upload/lang/cs/messages.po @@ -4,56 +4,53 @@ # # # Translators: -# Aditoo, 2018 -# michal_s , 2014 +# Michal Šupler , 2014 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-23 23:53-0400\n" -"PO-Revision-Date: 2014-06-23 08:46+0000\n" -"Last-Translator: Aditoo, 2018\n" -"Language-Team: Czech (http://app.transifex.com/Friendica/friendica/language/cs/)\n" +"POT-Creation-Date: 2013-02-27 05:01-0500\n" +"PO-Revision-Date: 2014-07-07 19:13+0000\n" +"Last-Translator: Michal Šupler \n" +"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" -"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: js_upload.php:34 -msgid "Select files for upload" -msgstr "" +#: js_upload.php:43 +msgid "Upload a file" +msgstr "Nahrát soubor" -#: js_upload.php:35 +#: js_upload.php:44 msgid "Drop files here to upload" -msgstr "Přetáhněte sem soubory k nahrání" +msgstr "Přeneste sem soubory k nahrání" -#: js_upload.php:36 +#: js_upload.php:45 msgid "Cancel" msgstr "Zrušit" -#: js_upload.php:37 +#: js_upload.php:46 msgid "Failed" msgstr "Neúspěch" -#: js_upload.php:215 +#: js_upload.php:303 msgid "No files were uploaded." msgstr "Žádné soubory nebyly nahrány." -#: js_upload.php:221 +#: js_upload.php:309 msgid "Uploaded file is empty" msgstr "Nahraný soubor je prázdný" -#: js_upload.php:233 -#, php-format -msgid "Image exceeds size limit of %s" -msgstr "" +#: js_upload.php:321 +msgid "Image exceeds size limit of " +msgstr "Velikost obrázku překračuje limit velikosti" -#: js_upload.php:245 -#, php-format -msgid "File has an invalid extension, it should be one of %s." -msgstr "" +#: js_upload.php:332 +msgid "File has an invalid extension, it should be one of " +msgstr "Soubor má neplatnou příponu, ta by měla být jednou z" -#: js_upload.php:256 +#: js_upload.php:343 msgid "Upload was cancelled, or server error encountered" msgstr "Nahrávání bylo zrušeno nebo došlo k chybě na serveru" diff --git a/js_upload/lang/cs/strings.php b/js_upload/lang/cs/strings.php index 55ec72a2..e03aceb0 100644 --- a/js_upload/lang/cs/strings.php +++ b/js_upload/lang/cs/strings.php @@ -3,11 +3,14 @@ if(! function_exists("string_plural_select_cs")) { function string_plural_select_cs($n){ $n = intval($n); - if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; } + if (($n==1)) { return 0; } else if (($n>=2 && $n<=4)) { return 1; } else { return 2; } }} -$a->strings['Drop files here to upload'] = 'Přetáhněte sem soubory k nahrání'; +$a->strings['Upload a file'] = 'Nahrát soubor'; +$a->strings['Drop files here to upload'] = 'Přeneste sem soubory k nahrání'; $a->strings['Cancel'] = 'Zrušit'; $a->strings['Failed'] = 'Neúspěch'; $a->strings['No files were uploaded.'] = 'Žádné soubory nebyly nahrány.'; $a->strings['Uploaded file is empty'] = 'Nahraný soubor je prázdný'; +$a->strings['Image exceeds size limit of '] = 'Velikost obrázku překračuje limit velikosti'; +$a->strings['File has an invalid extension, it should be one of '] = 'Soubor má neplatnou příponu, ta by měla být jednou z'; $a->strings['Upload was cancelled, or server error encountered'] = 'Nahrávání bylo zrušeno nebo došlo k chybě na serveru'; diff --git a/js_upload/lang/de/messages.po b/js_upload/lang/de/messages.po index 010704c5..6cbf8445 100644 --- a/js_upload/lang/de/messages.po +++ b/js_upload/lang/de/messages.po @@ -12,9 +12,9 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-03-23 23:53-0400\n" -"PO-Revision-Date: 2014-06-23 08:46+0000\n" -"Last-Translator: Tobias Diekershoff , 2021\n" -"Language-Team: German (http://app.transifex.com/Friendica/friendica/language/de/)\n" +"PO-Revision-Date: 2021-12-05 08:34+0000\n" +"Last-Translator: Tobias Diekershoff \n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/js_upload/lang/eo/messages.po b/js_upload/lang/eo/messages.po deleted file mode 100644 index e2b0c0a5..00000000 --- a/js_upload/lang/eo/messages.po +++ /dev/null @@ -1,57 +0,0 @@ -# ADDON js_upload -# Copyright (C) -# This file is distributed under the same license as the Friendica js_upload addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:49-0400\n" -"PO-Revision-Date: 2014-06-23 08:46+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: js_upload.php:37 -msgid "Select files for upload" -msgstr "" - -#: js_upload.php:38 -msgid "Drop files here to upload" -msgstr "" - -#: js_upload.php:39 -msgid "Cancel" -msgstr "" - -#: js_upload.php:40 -msgid "Failed" -msgstr "" - -#: js_upload.php:209 -msgid "No files were uploaded." -msgstr "" - -#: js_upload.php:215 -msgid "Uploaded file is empty" -msgstr "" - -#: js_upload.php:227 -#, php-format -msgid "Image exceeds size limit of %s" -msgstr "" - -#: js_upload.php:239 -#, php-format -msgid "File has an invalid extension, it should be one of %s." -msgstr "" - -#: js_upload.php:250 -msgid "Upload was cancelled, or server error encountered" -msgstr "" diff --git a/js_upload/lang/eo/strings.php b/js_upload/lang/eo/strings.php index 68e8a64c..fd358ea8 100644 --- a/js_upload/lang/eo/strings.php +++ b/js_upload/lang/eo/strings.php @@ -1,7 +1,11 @@ -strings["Upload a file"] = "Alŝuti dosieron"; +$a->strings["Drop files here to upload"] = "Ŝovmeti dosierojn ĉi tie por alŝuti ilin."; +$a->strings["Cancel"] = "Nuligi"; +$a->strings["Failed"] = "Malsukcesi"; +$a->strings["No files were uploaded."] = "Neniom da dosieroj alŝutita."; +$a->strings["Uploaded file is empty"] = "Alŝutita dosiero estas malplena."; +$a->strings["Image exceeds size limit of "] = "Bildo estas pli granda ol la limito de"; +$a->strings["File has an invalid extension, it should be one of "] = "Dosiero havas nevalidan sufikson. Ĝi estu unu de "; +$a->strings["Upload was cancelled, or server error encountered"] = "Alŝutado estas nuligita aŭ okazis eraro sur la servilo"; diff --git a/js_upload/lang/es/messages.po b/js_upload/lang/es/messages.po index a105d93e..0b737806 100644 --- a/js_upload/lang/es/messages.po +++ b/js_upload/lang/es/messages.po @@ -5,55 +5,52 @@ # # Translators: # Albert, 2016 -# Senex Petrovic , 2021 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-23 23:53-0400\n" -"PO-Revision-Date: 2014-06-23 08:46+0000\n" -"Last-Translator: Senex Petrovic , 2021\n" -"Language-Team: Spanish (http://app.transifex.com/Friendica/friendica/language/es/)\n" +"POT-Creation-Date: 2013-02-27 05:01-0500\n" +"PO-Revision-Date: 2016-11-17 18:59+0000\n" +"Last-Translator: Albert\n" +"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: es\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: js_upload.php:34 -msgid "Select files for upload" -msgstr "Seleciona archivos a subir" +#: js_upload.php:43 +msgid "Upload a file" +msgstr "Subir un archivo" -#: js_upload.php:35 +#: js_upload.php:44 msgid "Drop files here to upload" msgstr "Soltar archivos aquí para subir" -#: js_upload.php:36 +#: js_upload.php:45 msgid "Cancel" msgstr "Cancelar" -#: js_upload.php:37 +#: js_upload.php:46 msgid "Failed" msgstr "Fallido" -#: js_upload.php:215 +#: js_upload.php:303 msgid "No files were uploaded." msgstr "No se subió ningún archivo." -#: js_upload.php:221 +#: js_upload.php:309 msgid "Uploaded file is empty" msgstr "El archivo subido está vacío" -#: js_upload.php:233 -#, php-format -msgid "Image exceeds size limit of %s" -msgstr "" +#: js_upload.php:321 +msgid "Image exceeds size limit of " +msgstr "La imagen excede el tamaño de" -#: js_upload.php:245 -#, php-format -msgid "File has an invalid extension, it should be one of %s." -msgstr "" +#: js_upload.php:332 +msgid "File has an invalid extension, it should be one of " +msgstr "El archivo tiene una extensión inválida, debería ser una de" -#: js_upload.php:256 +#: js_upload.php:343 msgid "Upload was cancelled, or server error encountered" msgstr "La subida fue cancelada, o el servidor tuvo un error" diff --git a/js_upload/lang/es/strings.php b/js_upload/lang/es/strings.php index 4c0dc66b..e15c1149 100644 --- a/js_upload/lang/es/strings.php +++ b/js_upload/lang/es/strings.php @@ -3,12 +3,14 @@ if(! function_exists("string_plural_select_es")) { function string_plural_select_es($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} -$a->strings['Select files for upload'] = 'Seleciona archivos a subir'; +$a->strings['Upload a file'] = 'Subir un archivo'; $a->strings['Drop files here to upload'] = 'Soltar archivos aquí para subir'; $a->strings['Cancel'] = 'Cancelar'; $a->strings['Failed'] = 'Fallido'; $a->strings['No files were uploaded.'] = 'No se subió ningún archivo.'; $a->strings['Uploaded file is empty'] = 'El archivo subido está vacío'; +$a->strings['Image exceeds size limit of '] = 'La imagen excede el tamaño de'; +$a->strings['File has an invalid extension, it should be one of '] = 'El archivo tiene una extensión inválida, debería ser una de'; $a->strings['Upload was cancelled, or server error encountered'] = 'La subida fue cancelada, o el servidor tuvo un error'; diff --git a/js_upload/lang/et/messages.po b/js_upload/lang/et/messages.po deleted file mode 100644 index 034fd248..00000000 --- a/js_upload/lang/et/messages.po +++ /dev/null @@ -1,57 +0,0 @@ -# ADDON js_upload -# Copyright (C) -# This file is distributed under the same license as the Friendica js_upload addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:49-0400\n" -"PO-Revision-Date: 2014-06-23 08:46+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: et\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: js_upload.php:37 -msgid "Select files for upload" -msgstr "" - -#: js_upload.php:38 -msgid "Drop files here to upload" -msgstr "" - -#: js_upload.php:39 -msgid "Cancel" -msgstr "" - -#: js_upload.php:40 -msgid "Failed" -msgstr "" - -#: js_upload.php:209 -msgid "No files were uploaded." -msgstr "" - -#: js_upload.php:215 -msgid "Uploaded file is empty" -msgstr "" - -#: js_upload.php:227 -#, php-format -msgid "Image exceeds size limit of %s" -msgstr "" - -#: js_upload.php:239 -#, php-format -msgid "File has an invalid extension, it should be one of %s." -msgstr "" - -#: js_upload.php:250 -msgid "Upload was cancelled, or server error encountered" -msgstr "" diff --git a/js_upload/lang/et/strings.php b/js_upload/lang/et/strings.php deleted file mode 100644 index dfe78358..00000000 --- a/js_upload/lang/et/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gd\n" -"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" - -#: js_upload.php:37 -msgid "Select files for upload" -msgstr "" - -#: js_upload.php:38 -msgid "Drop files here to upload" -msgstr "" - -#: js_upload.php:39 -msgid "Cancel" -msgstr "" - -#: js_upload.php:40 -msgid "Failed" -msgstr "" - -#: js_upload.php:209 -msgid "No files were uploaded." -msgstr "" - -#: js_upload.php:215 -msgid "Uploaded file is empty" -msgstr "" - -#: js_upload.php:227 -#, php-format -msgid "Image exceeds size limit of %s" -msgstr "" - -#: js_upload.php:239 -#, php-format -msgid "File has an invalid extension, it should be one of %s." -msgstr "" - -#: js_upload.php:250 -msgid "Upload was cancelled, or server error encountered" -msgstr "" diff --git a/js_upload/lang/gd/strings.php b/js_upload/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/js_upload/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/js_upload/lang/is/messages.po b/js_upload/lang/is/messages.po deleted file mode 100644 index 39528f2d..00000000 --- a/js_upload/lang/is/messages.po +++ /dev/null @@ -1,57 +0,0 @@ -# ADDON js_upload -# Copyright (C) -# This file is distributed under the same license as the Friendica js_upload addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:49-0400\n" -"PO-Revision-Date: 2014-06-23 08:46+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: is\n" -"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" - -#: js_upload.php:37 -msgid "Select files for upload" -msgstr "" - -#: js_upload.php:38 -msgid "Drop files here to upload" -msgstr "" - -#: js_upload.php:39 -msgid "Cancel" -msgstr "" - -#: js_upload.php:40 -msgid "Failed" -msgstr "" - -#: js_upload.php:209 -msgid "No files were uploaded." -msgstr "" - -#: js_upload.php:215 -msgid "Uploaded file is empty" -msgstr "" - -#: js_upload.php:227 -#, php-format -msgid "Image exceeds size limit of %s" -msgstr "" - -#: js_upload.php:239 -#, php-format -msgid "File has an invalid extension, it should be one of %s." -msgstr "" - -#: js_upload.php:250 -msgid "Upload was cancelled, or server error encountered" -msgstr "" diff --git a/js_upload/lang/is/strings.php b/js_upload/lang/is/strings.php index 975c341e..d09928c0 100644 --- a/js_upload/lang/is/strings.php +++ b/js_upload/lang/is/strings.php @@ -1,7 +1,11 @@ -strings["Upload a file"] = "Hlaða upp skrá"; +$a->strings["Drop files here to upload"] = "Slepptu skrám hér til að hala upp"; +$a->strings["Cancel"] = "Hætta við"; +$a->strings["Failed"] = "Mistókst"; +$a->strings["No files were uploaded."] = "Engum skráð hlaðið upp."; +$a->strings["Uploaded file is empty"] = "Skrá sem var hlaðið upp er tóm"; +$a->strings["Image exceeds size limit of "] = "Mynd er yfir stærðamörkum"; +$a->strings["File has an invalid extension, it should be one of "] = "Skrá hefur ógilda skránafnsendingu, ætti að vera eitt af"; +$a->strings["Upload was cancelled, or server error encountered"] = "Hætt var við upphal eða kerfisvilla kom upp"; diff --git a/js_upload/lang/it/messages.po b/js_upload/lang/it/messages.po index 172ee90d..271057cb 100644 --- a/js_upload/lang/it/messages.po +++ b/js_upload/lang/it/messages.po @@ -11,14 +11,14 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-03-23 23:53-0400\n" -"PO-Revision-Date: 2014-06-23 08:46+0000\n" -"Last-Translator: Sylke Vicious , 2021\n" -"Language-Team: Italian (http://app.transifex.com/Friendica/friendica/language/it/)\n" +"PO-Revision-Date: 2021-05-05 10:50+0000\n" +"Last-Translator: Sylke Vicious \n" +"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: js_upload.php:34 msgid "Select files for upload" diff --git a/js_upload/lang/it/strings.php b/js_upload/lang/it/strings.php index 5c961761..f2ebfe0b 100644 --- a/js_upload/lang/it/strings.php +++ b/js_upload/lang/it/strings.php @@ -3,7 +3,7 @@ if(! function_exists("string_plural_select_it")) { function string_plural_select_it($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} $a->strings['Select files for upload'] = 'Seleziona file per il caricamento'; $a->strings['Drop files here to upload'] = 'Trascina un file qui per caricarlo'; diff --git a/js_upload/lang/nl/messages.po b/js_upload/lang/nl/messages.po index 8b3179ff..713ba3a2 100644 --- a/js_upload/lang/nl/messages.po +++ b/js_upload/lang/nl/messages.po @@ -5,55 +5,52 @@ # # Translators: # Jeroen De Meerleer , 2018 -# Ruud Schilders , 2020 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-23 23:53-0400\n" -"PO-Revision-Date: 2014-06-23 08:46+0000\n" -"Last-Translator: Ruud Schilders , 2020\n" -"Language-Team: Dutch (http://app.transifex.com/Friendica/friendica/language/nl/)\n" +"POT-Creation-Date: 2013-02-27 05:01-0500\n" +"PO-Revision-Date: 2018-08-24 11:48+0000\n" +"Last-Translator: Jeroen De Meerleer \n" +"Language-Team: Dutch (http://www.transifex.com/Friendica/friendica/language/nl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: nl\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: js_upload.php:34 -msgid "Select files for upload" -msgstr "" +#: js_upload.php:43 +msgid "Upload a file" +msgstr "Upload een bestand" -#: js_upload.php:35 +#: js_upload.php:44 msgid "Drop files here to upload" msgstr "Sleep uw bestanden hier om ze te uploaden" -#: js_upload.php:36 +#: js_upload.php:45 msgid "Cancel" -msgstr "Afbreken" +msgstr "" -#: js_upload.php:37 +#: js_upload.php:46 msgid "Failed" -msgstr "Mislukt" +msgstr "" -#: js_upload.php:215 +#: js_upload.php:303 msgid "No files were uploaded." -msgstr "Er waren geen bestanden geüpload." +msgstr "" -#: js_upload.php:221 +#: js_upload.php:309 msgid "Uploaded file is empty" -msgstr "Het geüploade bestand is leeg" - -#: js_upload.php:233 -#, php-format -msgid "Image exceeds size limit of %s" msgstr "" -#: js_upload.php:245 -#, php-format -msgid "File has an invalid extension, it should be one of %s." +#: js_upload.php:321 +msgid "Image exceeds size limit of " msgstr "" -#: js_upload.php:256 +#: js_upload.php:332 +msgid "File has an invalid extension, it should be one of " +msgstr "" + +#: js_upload.php:343 msgid "Upload was cancelled, or server error encountered" msgstr "" diff --git a/js_upload/lang/nl/strings.php b/js_upload/lang/nl/strings.php index 4ba709a4..dcdf634a 100644 --- a/js_upload/lang/nl/strings.php +++ b/js_upload/lang/nl/strings.php @@ -5,8 +5,5 @@ function string_plural_select_nl($n){ $n = intval($n); return intval($n != 1); }} +$a->strings['Upload a file'] = 'Upload een bestand'; $a->strings['Drop files here to upload'] = 'Sleep uw bestanden hier om ze te uploaden'; -$a->strings['Cancel'] = 'Afbreken'; -$a->strings['Failed'] = 'Mislukt'; -$a->strings['No files were uploaded.'] = 'Er waren geen bestanden geüpload.'; -$a->strings['Uploaded file is empty'] = 'Het geüploade bestand is leeg'; diff --git a/js_upload/templates/js_upload.tpl b/js_upload/templates/js_upload.tpl index b482cd2b..f45b495c 100644 --- a/js_upload/templates/js_upload.tpl +++ b/js_upload/templates/js_upload.tpl @@ -35,18 +35,18 @@ let albumElm = document.getElementById('photos-upload-album-select'); let contact_allow = document.querySelector('[name="contact_allow"]:not(:disabled)'); - let circle_allow = document.querySelector('[name="circle_allow"]:not(:disabled)'); - let contact_deny = document.querySelector('[name="contact_deny"]:not(:disabled)'); - let circle_deny = document.querySelector('[name="circle_deny"]:not(:disabled)'); + let group_allow = document.querySelector('[name="group_allow"]:not(:disabled)'); + let contact_deny = document.querySelector('[name="contact_deny"]:not(:disabled)'); + let group_deny = document.querySelector('[name="group_deny"]:not(:disabled)'); uploader.setParams({ newalbum : newalbumElm ? newalbumElm.value : '', album : albumElm ? albumElm.value : '', not_visible : document.getElementById('photos-upload-noshare').checked, contact_allow : contact_allow ? contact_allow.value : '', - circle_allow : circle_allow ? circle_allow.value : '', + group_allow : group_allow ? group_allow.value : '', contact_deny : contact_deny ? contact_deny.value : '', - circle_deny : circle_deny ? circle_deny.value : '', + group_deny : group_deny ? group_deny.value : '', }); } }); diff --git a/keycloakpassword/keycloakpassword.php b/keycloakpassword/keycloakpassword.php index 11034ffe..bfff4ea4 100644 --- a/keycloakpassword/keycloakpassword.php +++ b/keycloakpassword/keycloakpassword.php @@ -6,7 +6,9 @@ * Author: Ryan */ +use Friendica\App; use Friendica\Core\Hook; +use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\Database\DBA; use Friendica\DI; @@ -36,7 +38,7 @@ function keycloakpassword_request($client_id, $secret, $url, $params = []) $res = curl_exec($ch); if (curl_errno($ch)) { - DI::logger()->error(curl_error($ch)); + Logger::error(curl_error($ch)); } curl_close($ch); @@ -90,7 +92,7 @@ function keycloakpassword_authenticate(array &$b) $client_id, $secret, $endpoint . '/logout', - [ 'refresh_token' => $res['refresh_token'] ] + [ 'refresh_token' => res['refresh_token'] ] ); } } diff --git a/krynn/krynn.php b/krynn/krynn.php index b57d827e..f7e77c26 100644 --- a/krynn/krynn.php +++ b/krynn/krynn.php @@ -10,7 +10,9 @@ *"My body was my sacrifice... for my magic. This damage is permanent." - Raistlin Majere */ +use Friendica\App; use Friendica\Core\Hook; +use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\DI; @@ -30,7 +32,7 @@ function krynn_install() Hook::register('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings'); Hook::register('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post'); - DI::logger()->notice("installed krynn"); + Logger::notice("installed krynn"); } function krynn_post_hook(&$item) diff --git a/krynn/lang/bg/messages.po b/krynn/lang/bg/messages.po deleted file mode 100644 index 608a0340..00000000 --- a/krynn/lang/bg/messages.po +++ /dev/null @@ -1,27 +0,0 @@ -# ADDON krynn -# Copyright (C) -# This file is distributed under the same license as the Friendica krynn addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2015-07-07 15:14+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: krynn.php:127 -msgid "Enable Krynn Addon" -msgstr "" - -#: krynn.php:132 -msgid "Krynn Settings" -msgstr "" diff --git a/krynn/lang/bg/strings.php b/krynn/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/krynn/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: krynn.php:127 -msgid "Enable Krynn Addon" -msgstr "" - -#: krynn.php:132 -msgid "Krynn Settings" -msgstr "" diff --git a/krynn/lang/ca/strings.php b/krynn/lang/ca/strings.php index d34874f6..d5e09e7e 100644 --- a/krynn/lang/ca/strings.php +++ b/krynn/lang/ca/strings.php @@ -1,7 +1,5 @@ -strings["Krynn Settings"] = "Ajustos de Krynn"; +$a->strings["Enable Krynn Addon"] = "Activa Addon de Krynn"; +$a->strings["Submit"] = "Enviar"; diff --git a/krynn/lang/de/messages.po b/krynn/lang/de/messages.po index 1159354b..5dfa7269 100644 --- a/krynn/lang/de/messages.po +++ b/krynn/lang/de/messages.po @@ -14,9 +14,9 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2015-07-07 15:14+0000\n" -"Last-Translator: Tobias Diekershoff , 2018,2021\n" -"Language-Team: German (http://app.transifex.com/Friendica/friendica/language/de/)\n" +"PO-Revision-Date: 2021-12-22 16:22+0000\n" +"Last-Translator: Transifex Bot <>\n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/krynn/lang/eo/messages.po b/krynn/lang/eo/messages.po deleted file mode 100644 index a58129a6..00000000 --- a/krynn/lang/eo/messages.po +++ /dev/null @@ -1,27 +0,0 @@ -# ADDON krynn -# Copyright (C) -# This file is distributed under the same license as the Friendica krynn addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2015-07-07 15:14+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: krynn.php:127 -msgid "Enable Krynn Addon" -msgstr "" - -#: krynn.php:132 -msgid "Krynn Settings" -msgstr "" diff --git a/krynn/lang/eo/strings.php b/krynn/lang/eo/strings.php index 68e8a64c..eae02345 100644 --- a/krynn/lang/eo/strings.php +++ b/krynn/lang/eo/strings.php @@ -1,7 +1,5 @@ -strings["Krynn Settings"] = "Agordo pri Krynn"; +$a->strings["Enable Krynn Addon"] = "Ŝalti la Krynn kromprogamon"; +$a->strings["Submit"] = "Sendi"; diff --git a/krynn/lang/et/messages.po b/krynn/lang/et/messages.po deleted file mode 100644 index 01c6ed86..00000000 --- a/krynn/lang/et/messages.po +++ /dev/null @@ -1,28 +0,0 @@ -# ADDON krynn -# Copyright (C) -# This file is distributed under the same license as the Friendica krynn addon package. -# -# -# Translators: -# Rain Hawk, 2020 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2015-07-07 15:14+0000\n" -"Last-Translator: Rain Hawk, 2020\n" -"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: et\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: krynn.php:127 -msgid "Enable Krynn Addon" -msgstr "" - -#: krynn.php:132 -msgid "Krynn Settings" -msgstr "" diff --git a/krynn/lang/et/strings.php b/krynn/lang/et/strings.php deleted file mode 100644 index dfe78358..00000000 --- a/krynn/lang/et/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -, 2021 -# cracrayol, 2024 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-11-21 19:14-0500\n" "PO-Revision-Date: 2015-07-07 15:14+0000\n" -"Last-Translator: cracrayol, 2024\n" -"Language-Team: French (http://app.transifex.com/Friendica/friendica/language/fr/)\n" +"Last-Translator: bob lebonche , 2021\n" +"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -22,7 +21,7 @@ msgstr "" #: krynn.php:127 msgid "Enable Krynn Addon" -msgstr "Activer l'extension Krynn" +msgstr "Activer l'application complémentaire Krynn" #: krynn.php:132 msgid "Krynn Settings" diff --git a/krynn/lang/fr/strings.php b/krynn/lang/fr/strings.php index 84293f79..3c3574d0 100644 --- a/krynn/lang/fr/strings.php +++ b/krynn/lang/fr/strings.php @@ -5,5 +5,5 @@ function string_plural_select_fr($n){ $n = intval($n); if (($n == 0 || $n == 1)) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } }} -$a->strings['Enable Krynn Addon'] = 'Activer l\'extension Krynn'; +$a->strings['Enable Krynn Addon'] = 'Activer l\'application complémentaire Krynn'; $a->strings['Krynn Settings'] = 'Paramètres de Krynn'; diff --git a/krynn/lang/gd/messages.po b/krynn/lang/gd/messages.po deleted file mode 100644 index 23f81bf9..00000000 --- a/krynn/lang/gd/messages.po +++ /dev/null @@ -1,27 +0,0 @@ -# ADDON krynn -# Copyright (C) -# This file is distributed under the same license as the Friendica krynn addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2015-07-07 15:14+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gd\n" -"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" - -#: krynn.php:127 -msgid "Enable Krynn Addon" -msgstr "" - -#: krynn.php:132 -msgid "Krynn Settings" -msgstr "" diff --git a/krynn/lang/gd/strings.php b/krynn/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/krynn/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/krynn/lang/is/messages.po b/krynn/lang/is/messages.po deleted file mode 100644 index bab3ab42..00000000 --- a/krynn/lang/is/messages.po +++ /dev/null @@ -1,27 +0,0 @@ -# ADDON krynn -# Copyright (C) -# This file is distributed under the same license as the Friendica krynn addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2015-07-07 15:14+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: is\n" -"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" - -#: krynn.php:127 -msgid "Enable Krynn Addon" -msgstr "" - -#: krynn.php:132 -msgid "Krynn Settings" -msgstr "" diff --git a/krynn/lang/is/strings.php b/krynn/lang/is/strings.php index 975c341e..11fd5b57 100644 --- a/krynn/lang/is/strings.php +++ b/krynn/lang/is/strings.php @@ -1,7 +1,5 @@ -strings["Krynn Settings"] = ""; +$a->strings["Enable Krynn Addon"] = ""; +$a->strings["Submit"] = "Senda inn"; diff --git a/krynn/lang/it/messages.po b/krynn/lang/it/messages.po index d9614ca1..c1bb0949 100644 --- a/krynn/lang/it/messages.po +++ b/krynn/lang/it/messages.po @@ -10,20 +10,28 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2015-07-07 15:14+0000\n" -"Last-Translator: Sylke Vicious , 2021\n" -"Language-Team: Italian (http://app.transifex.com/Friendica/friendica/language/it/)\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" +"PO-Revision-Date: 2021-04-19 11:11+0000\n" +"Last-Translator: Sylke Vicious \n" +"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: krynn.php:127 +#: krynn.php:132 krynn.php:136 +msgid "Krynn" +msgstr "Krynn" + +#: krynn.php:141 +msgid "Krynn Settings" +msgstr "Impostazioni Krynn" + +#: krynn.php:143 msgid "Enable Krynn Addon" msgstr "Abilita componente aggiuntivo Krynn" -#: krynn.php:132 -msgid "Krynn Settings" -msgstr "Impostazioni Krynn" +#: krynn.php:148 +msgid "Save Settings" +msgstr "Salva Impostazioni" diff --git a/krynn/lang/it/strings.php b/krynn/lang/it/strings.php index 727d2877..6322a0c2 100644 --- a/krynn/lang/it/strings.php +++ b/krynn/lang/it/strings.php @@ -3,7 +3,9 @@ if(! function_exists("string_plural_select_it")) { function string_plural_select_it($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} -$a->strings['Enable Krynn Addon'] = 'Abilita componente aggiuntivo Krynn'; +$a->strings['Krynn'] = 'Krynn'; $a->strings['Krynn Settings'] = 'Impostazioni Krynn'; +$a->strings['Enable Krynn Addon'] = 'Abilita componente aggiuntivo Krynn'; +$a->strings['Save Settings'] = 'Salva Impostazioni'; diff --git a/krynn/lang/ru/messages.po b/krynn/lang/ru/messages.po deleted file mode 100644 index b2846c2d..00000000 --- a/krynn/lang/ru/messages.po +++ /dev/null @@ -1,27 +0,0 @@ -# ADDON krynn -# Copyright (C) -# This file is distributed under the same license as the Friendica krynn addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:14-0500\n" -"PO-Revision-Date: 2015-07-07 15:14+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Russian (http://app.transifex.com/Friendica/friendica/language/ru/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" - -#: krynn.php:127 -msgid "Enable Krynn Addon" -msgstr "" - -#: krynn.php:132 -msgid "Krynn Settings" -msgstr "" diff --git a/krynn/lang/ru/strings.php b/krynn/lang/ru/strings.php index 0579fc21..88ba6719 100644 --- a/krynn/lang/ru/strings.php +++ b/krynn/lang/ru/strings.php @@ -1,7 +1,5 @@ -=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; } -}} +strings["Krynn Settings"] = ""; +$a->strings["Enable Krynn Addon"] = ""; +$a->strings["Submit"] = "Подтвердить"; diff --git a/langfilter/lang/ar/messages.po b/langfilter/lang/ar/messages.po index e68e49fb..6bcc67f9 100644 --- a/langfilter/lang/ar/messages.po +++ b/langfilter/lang/ar/messages.po @@ -4,74 +4,73 @@ # # # Translators: -# abidin toumi , 2021 # Farida Khalaf , 2021 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2015-07-25 08:05+0000\n" -"Last-Translator: abidin toumi , 2021\n" -"Language-Team: Arabic (http://app.transifex.com/Friendica/friendica/language/ar/)\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" +"PO-Revision-Date: 2021-04-26 09:14+0000\n" +"Last-Translator: Transifex Bot <>\n" +"Language-Team: Arabic (http://www.transifex.com/Friendica/friendica/language/ar/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: ar\n" "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" -#: langfilter.php:49 +#: langfilter.php:50 +msgid "Language Filter" +msgstr "اللغة" + +#: langfilter.php:51 msgid "" "This addon tries to identify the language posts are written in. If it does " "not match any language specified below, posts will be hidden by collapsing " "them." msgstr "" -#: langfilter.php:50 +#: langfilter.php:52 msgid "Use the language filter" msgstr "اختيار اللغة" -#: langfilter.php:51 +#: langfilter.php:53 msgid "Able to read" msgstr " قابل للقراءة" -#: langfilter.php:51 +#: langfilter.php:53 msgid "" "List of abbreviations (ISO 639-1 codes) for languages you speak, comma " "separated. For example \"de,it\"." msgstr "قائمة الرموز ( ISO 639-1) للغات ، مفصولة بفواصل. على سبيل المثال \"de، it\"" -#: langfilter.php:52 +#: langfilter.php:54 msgid "Minimum confidence in language detection" msgstr "الحد الأدنى من نسبة اكتشاف اللغة" -#: langfilter.php:52 +#: langfilter.php:54 msgid "" "Minimum confidence in language detection being correct, from 0 to 100. Posts" " will not be filtered when the confidence of language detection is below " "this percent value." msgstr "الحد الأدنى من صحة اكتشاف اللغة ، من 0 إلى 100. لن تتم فلترة المشاركات عندما تكون صحة اكتشاف اللغة أقل من هذه النسبة المئوية." -#: langfilter.php:53 +#: langfilter.php:55 msgid "Minimum length of message body" msgstr "الحد الأدنى لنص الرسالة" -#: langfilter.php:53 +#: langfilter.php:55 msgid "" "Minimum number of characters in message body for filter to be used. Posts " "shorter than this will not be filtered. Note: Language detection is " "unreliable for short content (<200 characters)." msgstr "الحد الأدنى لأحرف نص الرسالة لاستخدام الفلتر. لن يتم فلترة المشاركات الأقصر من هذا. ملاحظة: لا يمكن الاعتماد على اكتشاف اللغة للمحتوى القصير (<200 حرف)." -#: langfilter.php:58 -msgid "Language Filter" -msgstr "مرشح اللغة" - -#: langfilter.php:60 +#: langfilter.php:56 msgid "Save Settings" msgstr "حفظ الإعدادات" -#: langfilter.php:193 +#: langfilter.php:187 #, php-format msgid "Filtered language: %s" msgstr "اختيار اللغة: %s" diff --git a/langfilter/lang/ar/strings.php b/langfilter/lang/ar/strings.php index cf8a7632..0c07842c 100644 --- a/langfilter/lang/ar/strings.php +++ b/langfilter/lang/ar/strings.php @@ -5,6 +5,7 @@ function string_plural_select_ar($n){ $n = intval($n); if ($n==0) { return 0; } else if ($n==1) { return 1; } else if ($n==2) { return 2; } else if ($n%100>=3 && $n%100<=10) { return 3; } else if ($n%100>=11 && $n%100<=99) { return 4; } else { return 5; } }} +$a->strings['Language Filter'] = 'اللغة'; $a->strings['Use the language filter'] = 'اختيار اللغة'; $a->strings['Able to read'] = ' قابل للقراءة'; $a->strings['List of abbreviations (ISO 639-1 codes) for languages you speak, comma separated. For example "de,it".'] = 'قائمة الرموز ( ISO 639-1) للغات ، مفصولة بفواصل. على سبيل المثال "de، it"'; @@ -12,6 +13,5 @@ $a->strings['Minimum confidence in language detection'] = 'الحد الأدنى $a->strings['Minimum confidence in language detection being correct, from 0 to 100. Posts will not be filtered when the confidence of language detection is below this percent value.'] = 'الحد الأدنى من صحة اكتشاف اللغة ، من 0 إلى 100. لن تتم فلترة المشاركات عندما تكون صحة اكتشاف اللغة أقل من هذه النسبة المئوية.'; $a->strings['Minimum length of message body'] = 'الحد الأدنى لنص الرسالة'; $a->strings['Minimum number of characters in message body for filter to be used. Posts shorter than this will not be filtered. Note: Language detection is unreliable for short content (<200 characters).'] = 'الحد الأدنى لأحرف نص الرسالة لاستخدام الفلتر. لن يتم فلترة المشاركات الأقصر من هذا. ملاحظة: لا يمكن الاعتماد على اكتشاف اللغة للمحتوى القصير (<200 حرف).'; -$a->strings['Language Filter'] = 'مرشح اللغة'; $a->strings['Save Settings'] = 'حفظ الإعدادات'; $a->strings['Filtered language: %s'] = 'اختيار اللغة: %s'; diff --git a/langfilter/lang/bg/messages.po b/langfilter/lang/bg/messages.po deleted file mode 100644 index 92c40191..00000000 --- a/langfilter/lang/bg/messages.po +++ /dev/null @@ -1,75 +0,0 @@ -# ADDON langfilter -# Copyright (C) -# This file is distributed under the same license as the Friendica langfilter addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2015-07-25 08:05+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: langfilter.php:49 -msgid "" -"This addon tries to identify the language posts are written in. If it does " -"not match any language specified below, posts will be hidden by collapsing " -"them." -msgstr "" - -#: langfilter.php:50 -msgid "Use the language filter" -msgstr "" - -#: langfilter.php:51 -msgid "Able to read" -msgstr "" - -#: langfilter.php:51 -msgid "" -"List of abbreviations (ISO 639-1 codes) for languages you speak, comma " -"separated. For example \"de,it\"." -msgstr "" - -#: langfilter.php:52 -msgid "Minimum confidence in language detection" -msgstr "" - -#: langfilter.php:52 -msgid "" -"Minimum confidence in language detection being correct, from 0 to 100. Posts" -" will not be filtered when the confidence of language detection is below " -"this percent value." -msgstr "" - -#: langfilter.php:53 -msgid "Minimum length of message body" -msgstr "" - -#: langfilter.php:53 -msgid "" -"Minimum number of characters in message body for filter to be used. Posts " -"shorter than this will not be filtered. Note: Language detection is " -"unreliable for short content (<200 characters)." -msgstr "" - -#: langfilter.php:58 -msgid "Language Filter" -msgstr "" - -#: langfilter.php:60 -msgid "Save Settings" -msgstr "" - -#: langfilter.php:193 -#, php-format -msgid "Filtered language: %s" -msgstr "" diff --git a/langfilter/lang/bg/strings.php b/langfilter/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/langfilter/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -, 2018 +# Copiis Praeesse , 2018 # Ralf Thees , 2019 # Tobias Diekershoff , 2015 # Tobias Diekershoff , 2020-2021 @@ -15,9 +15,9 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2015-07-25 08:05+0000\n" -"Last-Translator: Tobias Diekershoff , 2020-2021\n" -"Language-Team: German (http://app.transifex.com/Friendica/friendica/language/de/)\n" +"PO-Revision-Date: 2021-10-19 18:08+0000\n" +"Last-Translator: Tobias Diekershoff \n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/langfilter/lang/eo/messages.po b/langfilter/lang/eo/messages.po deleted file mode 100644 index 2e4f654d..00000000 --- a/langfilter/lang/eo/messages.po +++ /dev/null @@ -1,75 +0,0 @@ -# ADDON langfilter -# Copyright (C) -# This file is distributed under the same license as the Friendica langfilter addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2015-07-25 08:05+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: langfilter.php:49 -msgid "" -"This addon tries to identify the language posts are written in. If it does " -"not match any language specified below, posts will be hidden by collapsing " -"them." -msgstr "" - -#: langfilter.php:50 -msgid "Use the language filter" -msgstr "" - -#: langfilter.php:51 -msgid "Able to read" -msgstr "" - -#: langfilter.php:51 -msgid "" -"List of abbreviations (ISO 639-1 codes) for languages you speak, comma " -"separated. For example \"de,it\"." -msgstr "" - -#: langfilter.php:52 -msgid "Minimum confidence in language detection" -msgstr "" - -#: langfilter.php:52 -msgid "" -"Minimum confidence in language detection being correct, from 0 to 100. Posts" -" will not be filtered when the confidence of language detection is below " -"this percent value." -msgstr "" - -#: langfilter.php:53 -msgid "Minimum length of message body" -msgstr "" - -#: langfilter.php:53 -msgid "" -"Minimum number of characters in message body for filter to be used. Posts " -"shorter than this will not be filtered. Note: Language detection is " -"unreliable for short content (<200 characters)." -msgstr "" - -#: langfilter.php:58 -msgid "Language Filter" -msgstr "" - -#: langfilter.php:60 -msgid "Save Settings" -msgstr "" - -#: langfilter.php:193 -#, php-format -msgid "Filtered language: %s" -msgstr "" diff --git a/langfilter/lang/eo/strings.php b/langfilter/lang/eo/strings.php deleted file mode 100644 index 68e8a64c..00000000 --- a/langfilter/lang/eo/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gd\n" -"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" - -#: langfilter.php:49 -msgid "" -"This addon tries to identify the language posts are written in. If it does " -"not match any language specified below, posts will be hidden by collapsing " -"them." -msgstr "" - -#: langfilter.php:50 -msgid "Use the language filter" -msgstr "" - -#: langfilter.php:51 -msgid "Able to read" -msgstr "" - -#: langfilter.php:51 -msgid "" -"List of abbreviations (ISO 639-1 codes) for languages you speak, comma " -"separated. For example \"de,it\"." -msgstr "" - -#: langfilter.php:52 -msgid "Minimum confidence in language detection" -msgstr "" - -#: langfilter.php:52 -msgid "" -"Minimum confidence in language detection being correct, from 0 to 100. Posts" -" will not be filtered when the confidence of language detection is below " -"this percent value." -msgstr "" - -#: langfilter.php:53 -msgid "Minimum length of message body" -msgstr "" - -#: langfilter.php:53 -msgid "" -"Minimum number of characters in message body for filter to be used. Posts " -"shorter than this will not be filtered. Note: Language detection is " -"unreliable for short content (<200 characters)." -msgstr "" - -#: langfilter.php:58 -msgid "Language Filter" -msgstr "" - -#: langfilter.php:60 -msgid "Save Settings" -msgstr "" - -#: langfilter.php:193 -#, php-format -msgid "Filtered language: %s" -msgstr "" diff --git a/langfilter/lang/gd/strings.php b/langfilter/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/langfilter/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/langfilter/lang/is/messages.po b/langfilter/lang/is/messages.po deleted file mode 100644 index 9734cfde..00000000 --- a/langfilter/lang/is/messages.po +++ /dev/null @@ -1,75 +0,0 @@ -# ADDON langfilter -# Copyright (C) -# This file is distributed under the same license as the Friendica langfilter addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2015-07-25 08:05+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: is\n" -"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" - -#: langfilter.php:49 -msgid "" -"This addon tries to identify the language posts are written in. If it does " -"not match any language specified below, posts will be hidden by collapsing " -"them." -msgstr "" - -#: langfilter.php:50 -msgid "Use the language filter" -msgstr "" - -#: langfilter.php:51 -msgid "Able to read" -msgstr "" - -#: langfilter.php:51 -msgid "" -"List of abbreviations (ISO 639-1 codes) for languages you speak, comma " -"separated. For example \"de,it\"." -msgstr "" - -#: langfilter.php:52 -msgid "Minimum confidence in language detection" -msgstr "" - -#: langfilter.php:52 -msgid "" -"Minimum confidence in language detection being correct, from 0 to 100. Posts" -" will not be filtered when the confidence of language detection is below " -"this percent value." -msgstr "" - -#: langfilter.php:53 -msgid "Minimum length of message body" -msgstr "" - -#: langfilter.php:53 -msgid "" -"Minimum number of characters in message body for filter to be used. Posts " -"shorter than this will not be filtered. Note: Language detection is " -"unreliable for short content (<200 characters)." -msgstr "" - -#: langfilter.php:58 -msgid "Language Filter" -msgstr "" - -#: langfilter.php:60 -msgid "Save Settings" -msgstr "" - -#: langfilter.php:193 -#, php-format -msgid "Filtered language: %s" -msgstr "" diff --git a/langfilter/lang/is/strings.php b/langfilter/lang/is/strings.php deleted file mode 100644 index 975c341e..00000000 --- a/langfilter/lang/is/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -, 2025 # fabrixxm , 2015,2018 # Sandro Santilli , 2015 # SickShark X, 2021 @@ -13,68 +12,68 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2015-07-25 08:05+0000\n" -"Last-Translator: Diego Beraldin , 2025\n" -"Language-Team: Italian (http://app.transifex.com/Friendica/friendica/language/it/)\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" +"PO-Revision-Date: 2021-10-17 21:25+0000\n" +"Last-Translator: SickShark X\n" +"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: langfilter.php:49 +#: langfilter.php:50 +msgid "Language Filter" +msgstr "Filtro Lingua" + +#: langfilter.php:51 msgid "" "This addon tries to identify the language posts are written in. If it does " "not match any language specified below, posts will be hidden by collapsing " "them." -msgstr "Questo componente aggiuntivo prova a identificare la lingua con cui sono stati scritti i messaggi. Se non corrisponde a nessuna delle lingue specificate qui sotto, i messaggi verranno nascosti." +msgstr "Questo plug-in prova a identificare la lingua con cui sono stati scritti i posts. Se non corrisponde a nessuna delle lingue specificate qui sotto, i post verranno nascosti." -#: langfilter.php:50 +#: langfilter.php:52 msgid "Use the language filter" msgstr "Usa il filtro lingua" -#: langfilter.php:51 +#: langfilter.php:53 msgid "Able to read" msgstr "In grado di leggere" -#: langfilter.php:51 +#: langfilter.php:53 msgid "" "List of abbreviations (ISO 639-1 codes) for languages you speak, comma " "separated. For example \"de,it\"." msgstr "Lista di abbreviazioni (codici ISO 639-1) per le lingue che parli, separate da virgola. Per esempio \"it,de\"." -#: langfilter.php:52 +#: langfilter.php:54 msgid "Minimum confidence in language detection" msgstr "Fiducia minima nel rilevamento della lingua" -#: langfilter.php:52 +#: langfilter.php:54 msgid "" "Minimum confidence in language detection being correct, from 0 to 100. Posts" " will not be filtered when the confidence of language detection is below " "this percent value." msgstr "Fiducia minima che il rilevamento della lingua sia corretto, da 0 a 100. I messaggi non saranno filtrati quando la fiducia nel rilevamento della lingua è sotto questo valore percentuale." -#: langfilter.php:53 +#: langfilter.php:55 msgid "Minimum length of message body" msgstr "Lunghezza minima del corpo del messaggio" -#: langfilter.php:53 +#: langfilter.php:55 msgid "" "Minimum number of characters in message body for filter to be used. Posts " "shorter than this will not be filtered. Note: Language detection is " "unreliable for short content (<200 characters)." msgstr "Numero di caratteri minimo perché il filtro venga usato. I messaggio più corti non saranno filtrati. Nota: la rilevazione della lingua non è affidabile con messaggi brevi (<200 caratteri)" -#: langfilter.php:58 -msgid "Language Filter" -msgstr "Filtro Lingua" - -#: langfilter.php:60 +#: langfilter.php:56 msgid "Save Settings" msgstr "Salva Impostazioni" -#: langfilter.php:193 +#: langfilter.php:187 #, php-format msgid "Filtered language: %s" msgstr "Lingua filtrata: %s" diff --git a/langfilter/lang/it/strings.php b/langfilter/lang/it/strings.php index cbce2841..f1afafad 100644 --- a/langfilter/lang/it/strings.php +++ b/langfilter/lang/it/strings.php @@ -3,9 +3,10 @@ if(! function_exists("string_plural_select_it")) { function string_plural_select_it($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} -$a->strings['This addon tries to identify the language posts are written in. If it does not match any language specified below, posts will be hidden by collapsing them.'] = 'Questo componente aggiuntivo prova a identificare la lingua con cui sono stati scritti i messaggi. Se non corrisponde a nessuna delle lingue specificate qui sotto, i messaggi verranno nascosti.'; +$a->strings['Language Filter'] = 'Filtro Lingua'; +$a->strings['This addon tries to identify the language posts are written in. If it does not match any language specified below, posts will be hidden by collapsing them.'] = 'Questo plug-in prova a identificare la lingua con cui sono stati scritti i posts. Se non corrisponde a nessuna delle lingue specificate qui sotto, i post verranno nascosti.'; $a->strings['Use the language filter'] = 'Usa il filtro lingua'; $a->strings['Able to read'] = 'In grado di leggere'; $a->strings['List of abbreviations (ISO 639-1 codes) for languages you speak, comma separated. For example "de,it".'] = 'Lista di abbreviazioni (codici ISO 639-1) per le lingue che parli, separate da virgola. Per esempio "it,de".'; @@ -13,6 +14,5 @@ $a->strings['Minimum confidence in language detection'] = 'Fiducia minima nel ri $a->strings['Minimum confidence in language detection being correct, from 0 to 100. Posts will not be filtered when the confidence of language detection is below this percent value.'] = 'Fiducia minima che il rilevamento della lingua sia corretto, da 0 a 100. I messaggi non saranno filtrati quando la fiducia nel rilevamento della lingua è sotto questo valore percentuale.'; $a->strings['Minimum length of message body'] = 'Lunghezza minima del corpo del messaggio'; $a->strings['Minimum number of characters in message body for filter to be used. Posts shorter than this will not be filtered. Note: Language detection is unreliable for short content (<200 characters).'] = 'Numero di caratteri minimo perché il filtro venga usato. I messaggio più corti non saranno filtrati. Nota: la rilevazione della lingua non è affidabile con messaggi brevi (<200 caratteri)'; -$a->strings['Language Filter'] = 'Filtro Lingua'; $a->strings['Save Settings'] = 'Salva Impostazioni'; $a->strings['Filtered language: %s'] = 'Lingua filtrata: %s'; diff --git a/langfilter/lang/ru/messages.po b/langfilter/lang/ru/messages.po index 45ad7b3d..e1fbc9e8 100644 --- a/langfilter/lang/ru/messages.po +++ b/langfilter/lang/ru/messages.po @@ -4,59 +4,63 @@ # # # Translators: -# Alexander An , 2020,2023 +# Alexander An , 2020 # Stanislav N. , 2018 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:15-0500\n" -"PO-Revision-Date: 2015-07-25 08:05+0000\n" -"Last-Translator: Alexander An , 2020,2023\n" -"Language-Team: Russian (http://app.transifex.com/Friendica/friendica/language/ru/)\n" +"POT-Creation-Date: 2020-10-03 22:02-0400\n" +"PO-Revision-Date: 2020-10-09 17:48+0000\n" +"Last-Translator: Alexander An \n" +"Language-Team: Russian (http://www.transifex.com/Friendica/friendica/language/ru/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: ru\n" "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" -#: langfilter.php:49 +#: langfilter.php:52 +msgid "Language Filter" +msgstr "Языковой фильтр" + +#: langfilter.php:53 msgid "" "This addon tries to identify the language posts are written in. If it does " "not match any language specified below, posts will be hidden by collapsing " "them." -msgstr "Это дополнение пытается идентифицировать язык, на котором сделаны записи. Если язык не соответствует ни одному, указанному ниже, то такие посты будут свёрнуты." +msgstr "Это дополнение пытается идентифицировать язык, на котором написаны посты. Если язык не соответствует ни одному, указанному ниже, то такие посты будут скрыты." -#: langfilter.php:50 +#: langfilter.php:54 msgid "Use the language filter" msgstr "Использовать языковой фильтр" -#: langfilter.php:51 +#: langfilter.php:55 msgid "Able to read" msgstr "Возможность читать" -#: langfilter.php:51 +#: langfilter.php:55 msgid "" "List of abbreviations (ISO 639-1 codes) for languages you speak, comma " "separated. For example \"de,it\"." msgstr "Список аббревиатур (кодов по ISO 639-1 ) для языков, на которых вы говорите. Например, \"ru,en\"." -#: langfilter.php:52 +#: langfilter.php:56 msgid "Minimum confidence in language detection" msgstr "Минимальная уверенность в определении языка" -#: langfilter.php:52 +#: langfilter.php:56 msgid "" "Minimum confidence in language detection being correct, from 0 to 100. Posts" " will not be filtered when the confidence of language detection is below " "this percent value." msgstr "Минимальная уверенность в правильном определении языка, от 0 до 100. Посты не будут скрыты, если уверенность в правильном определении языка в процентах ниже этого значения." -#: langfilter.php:53 +#: langfilter.php:57 msgid "Minimum length of message body" msgstr "Минимальная длина тела сообщения" -#: langfilter.php:53 +#: langfilter.php:57 msgid "" "Minimum number of characters in message body for filter to be used. Posts " "shorter than this will not be filtered. Note: Language detection is " @@ -64,14 +68,10 @@ msgid "" msgstr "Минимальное количество знаков в теле сообщения для применения фильтрации. Посты, длина которых меньше указанного значения, не будут отфильтрованы. Обратите внимание, что определение языка работает ненадежно для небольших постов (<200 символов)." #: langfilter.php:58 -msgid "Language Filter" -msgstr "Языковой фильтр" - -#: langfilter.php:60 msgid "Save Settings" msgstr "Сохранить настройки" -#: langfilter.php:193 +#: langfilter.php:189 #, php-format msgid "Filtered language: %s" msgstr "Отфильтрованный язык: %s" diff --git a/langfilter/lang/ru/strings.php b/langfilter/lang/ru/strings.php index 1f5619f7..0489bd4f 100644 --- a/langfilter/lang/ru/strings.php +++ b/langfilter/lang/ru/strings.php @@ -5,7 +5,8 @@ function string_plural_select_ru($n){ $n = intval($n); if ($n%10==1 && $n%100!=11) { return 0; } else if ($n%10>=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; } }} -$a->strings['This addon tries to identify the language posts are written in. If it does not match any language specified below, posts will be hidden by collapsing them.'] = 'Это дополнение пытается идентифицировать язык, на котором сделаны записи. Если язык не соответствует ни одному, указанному ниже, то такие посты будут свёрнуты.'; +$a->strings['Language Filter'] = 'Языковой фильтр'; +$a->strings['This addon tries to identify the language posts are written in. If it does not match any language specified below, posts will be hidden by collapsing them.'] = 'Это дополнение пытается идентифицировать язык, на котором написаны посты. Если язык не соответствует ни одному, указанному ниже, то такие посты будут скрыты.'; $a->strings['Use the language filter'] = 'Использовать языковой фильтр'; $a->strings['Able to read'] = 'Возможность читать'; $a->strings['List of abbreviations (ISO 639-1 codes) for languages you speak, comma separated. For example "de,it".'] = 'Список аббревиатур (кодов по ISO 639-1 ) для языков, на которых вы говорите. Например, "ru,en".'; @@ -13,6 +14,5 @@ $a->strings['Minimum confidence in language detection'] = 'Минимальна $a->strings['Minimum confidence in language detection being correct, from 0 to 100. Posts will not be filtered when the confidence of language detection is below this percent value.'] = 'Минимальная уверенность в правильном определении языка, от 0 до 100. Посты не будут скрыты, если уверенность в правильном определении языка в процентах ниже этого значения.'; $a->strings['Minimum length of message body'] = 'Минимальная длина тела сообщения'; $a->strings['Minimum number of characters in message body for filter to be used. Posts shorter than this will not be filtered. Note: Language detection is unreliable for short content (<200 characters).'] = 'Минимальное количество знаков в теле сообщения для применения фильтрации. Посты, длина которых меньше указанного значения, не будут отфильтрованы. Обратите внимание, что определение языка работает ненадежно для небольших постов (<200 символов).'; -$a->strings['Language Filter'] = 'Языковой фильтр'; $a->strings['Save Settings'] = 'Сохранить настройки'; $a->strings['Filtered language: %s'] = 'Отфильтрованный язык: %s'; diff --git a/langfilter/langfilter.php b/langfilter/langfilter.php index 3a202fcd..020a32df 100644 --- a/langfilter/langfilter.php +++ b/langfilter/langfilter.php @@ -7,6 +7,7 @@ * License: MIT */ +use Friendica\App; use Friendica\Content\Text\BBCode; use Friendica\Core\Hook; use Friendica\Core\Renderer; @@ -99,21 +100,21 @@ function langfilter_addon_settings_post(array &$b) function langfilter_prepare_body_content_filter(&$hook_data) { - $uid = $hook_data['uid'] ?? DI::userSession()->getLocalUserId(); - if (!$uid) { + $logged_user = DI::userSession()->getLocalUserId(); + if (!$logged_user) { return; } // Never filter own messages // TODO: find a better way to extract this - $logged_user_profile = DI::baseUrl() . '/profile/' . DI::userSession()->getLocalUserNickname(); + $logged_user_profile = DI::baseUrl()->get() . '/profile/' . DI::userSession()->getLocalUserNickname(); if ($logged_user_profile == $hook_data['item']['author-link']) { return; } // Don't filter if language filter is disabled - if (!DI::pConfig()->get($uid, 'langfilter', 'enable', - !DI::pConfig()->get($uid, 'langfilter', 'disable')) + if (!DI::pConfig()->get($logged_user, 'langfilter', 'enable', + !DI::pConfig()->get($logged_user, 'langfilter', 'disable')) ) { return; } @@ -121,13 +122,13 @@ function langfilter_prepare_body_content_filter(&$hook_data) $naked_body = strip_tags( $hook_data['item']['rendered-html'] ??''?: // Equivalent of !empty() - BBCode::convertForUriId($hook_data['item']['uri-id'], $hook_data['item']['body'], BBCode::ACTIVITYPUB) + BBCode::convert($hook_data['item']['body'], false, BBCode::ACTIVITYPUB, true) ); $naked_body = preg_replace('#\s+#', ' ', trim($naked_body)); // Don't filter if body lenght is below minimum - $minlen = DI::pConfig()->get($uid, 'langfilter', 'minlength', 32); + $minlen = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'langfilter', 'minlength', 32); if (!$minlen) { $minlen = 32; } @@ -136,8 +137,8 @@ function langfilter_prepare_body_content_filter(&$hook_data) return; } - $read_languages_string = DI::pConfig()->get($uid, 'langfilter', 'languages'); - $minconfidence = DI::pConfig()->get($uid, 'langfilter', 'minconfidence'); + $read_languages_string = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'langfilter', 'languages'); + $minconfidence = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'langfilter', 'minconfidence'); // Don't filter if no spoken languages are configured if (!$read_languages_string) { @@ -147,8 +148,6 @@ function langfilter_prepare_body_content_filter(&$hook_data) $iso639 = new Matriphe\ISO639\ISO639; - $confidence = null; - // Extract the language of the post if (!empty($hook_data['item']['language'])) { $languages = json_decode($hook_data['item']['language'], true); @@ -164,7 +163,7 @@ function langfilter_prepare_body_content_filter(&$hook_data) return; } - $lang = $iso639->languageByCode1(substr($iso2, 0, 2)); + $lang = $iso639->languageByCode1($iso2); } else { $opts = $hook_data['item']['postopts']; if (!$opts) { diff --git a/ldapauth/ldapauth.php b/ldapauth/ldapauth.php index b80c5226..38e2d6a1 100644 --- a/ldapauth/ldapauth.php +++ b/ldapauth/ldapauth.php @@ -29,7 +29,9 @@ * The configuration options for this module are described in the config/ldapauth.config.php file */ +use Friendica\App; use Friendica\Core\Hook; +use Friendica\Core\Logger; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\User; @@ -43,7 +45,7 @@ function ldapauth_install() function ldapauth_load_config(ConfigFileManager $loader) { - DI::appHelper()->getConfigCache()->load($loader->loadAddonConfig('ldapauth'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); + DI::app()->getConfigCache()->load($loader->loadAddonConfig('ldapauth'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC); } function ldapauth_hook_authenticate(array &$b) @@ -68,54 +70,54 @@ function ldapauth_authenticate($username, $password) $ldap_autocreateaccount_nameattribute = DI::config()->get('ldapauth', 'ldap_autocreateaccount_nameattribute'); if (!extension_loaded('ldap') || !strlen($ldap_server)) { - DI::logger()->error('Addon not configured or missing php-ldap extension', ['extension_loaded' => extension_loaded('ldap'), 'server' => $ldap_server]); + Logger::error('Addon not configured or missing php-ldap extension', ['extension_loaded' => extension_loaded('ldap'), 'server' => $ldap_server]); return false; } if (!strlen($password)) { - DI::logger()->error('Empty password disallowed', ['provided_password_length' => strlen($password)]); + Logger::error('Empty password disallowed', ['provided_password_length' => strlen($password)]); return false; } $connect = @ldap_connect($ldap_server); if ($connect === false) { - DI::logger()->warning('Could not connect to LDAP server', ['server' => $ldap_server]); + Logger::warning('Could not connect to LDAP server', ['server' => $ldap_server]); return false; } @ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3); @ldap_set_option($connect, LDAP_OPT_REFERRALS, 0); if ((@ldap_bind($connect, $ldap_binddn, $ldap_bindpw)) === false) { - DI::logger()->warning('Could not bind to LDAP server', ['server' => $ldap_server, 'binddn' => $ldap_binddn, 'errno' => ldap_errno($connect), 'error' => ldap_error($connect)]); + Logger::warning('Could not bind to LDAP server', ['server' => $ldap_server, 'binddn' => $ldap_binddn, 'errno' => ldap_errno($connect), 'error' => ldap_error($connect)]); return false; } $res = @ldap_search($connect, $ldap_searchdn, $ldap_userattr . '=' . $username); if (!$res) { - DI::logger()->notice('LDAP user not found.', ['searchdn' => $ldap_searchdn, 'userattr' => $ldap_userattr, 'username' => $username, 'errno' => ldap_errno($connect), 'error' => ldap_error($connect)]); + Logger::notice('LDAP user not found.', ['searchdn' => $ldap_searchdn, 'userattr' => $ldap_userattr, 'username' => $username, 'errno' => ldap_errno($connect), 'error' => ldap_error($connect)]); return false; } $id = @ldap_first_entry($connect, $res); if (!$id) { - DI::logger()->notice('Could not retrieve first LDAP entry.', ['searchdn' => $ldap_searchdn, 'userattr' => $ldap_userattr, 'username' => $username, 'errno' => ldap_errno($connect), 'error' => ldap_error($connect)]); + Logger::notice('Could not retrieve first LDAP entry.', ['searchdn' => $ldap_searchdn, 'userattr' => $ldap_userattr, 'username' => $username, 'errno' => ldap_errno($connect), 'error' => ldap_error($connect)]); return false; } $dn = @ldap_get_dn($connect, $id); if (!@ldap_bind($connect, $dn, $password)) { - DI::logger()->notice('Could not authenticate LDAP user with provided password', ['errno' => ldap_errno($connect), 'error' => ldap_error($connect)]); + Logger::notice('Could not authenticate LDAP user with provided password', ['errno' => ldap_errno($connect), 'error' => ldap_error($connect)]); return false; } if (strlen($ldap_group) && @ldap_compare($connect, $ldap_group, 'member', $dn) !== true) { $errno = @ldap_errno($connect); if ($errno === 32) { - DI::logger()->notice('LDAP Access Control Group does not exist', ['errno' => $errno, 'error' => ldap_error($connect)]); + Logger::notice('LDAP Access Control Group does not exist', ['errno' => $errno, 'error' => ldap_error($connect)]); } elseif ($errno === 16) { - DI::logger()->notice('LDAP membership attribute does not exist in access control group', ['errno' => $errno, 'error' => ldap_error($connect)]); + Logger::notice('LDAP membership attribute does not exist in access control group', ['errno' => $errno, 'error' => ldap_error($connect)]); } else { - DI::logger()->notice('LDAP user isn\'t part of the authorized group', ['dn' => $dn]); + Logger::notice('LDAP user isn\'t part of the authorized group', ['dn' => $dn]); } @ldap_close($connect); @@ -139,7 +141,7 @@ function ldapauth_authenticate($username, $password) $authentication = User::getAuthenticationInfo($username); return User::getById($authentication['uid']); } catch (Exception $e) { - DI::logger()->notice('LDAP authentication error: ' . $e->getMessage()); + Logger::notice('LDAP authentication error: ' . $e->getMessage()); return false; } } @@ -147,7 +149,7 @@ function ldapauth_authenticate($username, $password) function ldap_createaccount($username, $password, $email, $name) { if (!strlen($email) || !strlen($name)) { - DI::logger()->notice('Could not create local user from LDAP data, no email or nickname provided'); + Logger::notice('Could not create local user from LDAP data, no email or nickname provided'); return false; } @@ -159,10 +161,10 @@ function ldap_createaccount($username, $password, $email, $name) 'password' => $password, 'verified' => 1 ]); - DI::logger()->info('Local user created from LDAP data', ['username' => $username, 'name' => $name]); + Logger::info('Local user created from LDAP data', ['username' => $username, 'name' => $name]); return $user; } catch (Exception $ex) { - DI::logger()->error('Could not create local user from LDAP data', ['username' => $username, 'exception' => $ex->getMessage()]); + Logger::error('Could not create local user from LDAP data', ['username' => $username, 'exception' => $ex->getMessage()]); } return false; diff --git a/leistungsschutzrecht/leistungsschutzrecht.php b/leistungsschutzrecht/leistungsschutzrecht.php index 891cb6ca..f6c65399 100644 --- a/leistungsschutzrecht/leistungsschutzrecht.php +++ b/leistungsschutzrecht/leistungsschutzrecht.php @@ -6,7 +6,9 @@ * Author: Michael Vogel */ +use Friendica\App; use Friendica\Core\Hook; +use Friendica\Core\Logger; use Friendica\DI; function leistungsschutzrecht_install() @@ -147,7 +149,7 @@ function leistungsschutzrecht_is_member_site(string $url): bool $cleanedurlpart = explode('%', $urldata['host']); $hostname = explode('.', $cleanedurlpart[0]); - if ($hostname === false || $hostname === '') { + if (empty($hostname)) { return false; } @@ -167,7 +169,7 @@ function leistungsschutzrecht_cron($b) if ($last) { $next = $last + 86400; if ($next > time()) { - DI::logger()->notice('poll intervall not reached'); + Logger::notice('poll intervall not reached'); return; } } diff --git a/libertree/lang/C/messages.po b/libertree/lang/C/messages.po index 3162b6a7..6feeef8d 100644 --- a/libertree/lang/C/messages.po +++ b/libertree/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:49-0400\n" +"POT-Creation-Date: 2021-11-21 19:17-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -21,22 +21,22 @@ msgstr "" msgid "Post to libertree" msgstr "" -#: libertree.php:59 +#: libertree.php:60 msgid "Enable Libertree Post Addon" msgstr "" -#: libertree.php:60 +#: libertree.php:61 msgid "Libertree site URL" msgstr "" -#: libertree.php:61 +#: libertree.php:62 msgid "Libertree API token" msgstr "" -#: libertree.php:62 +#: libertree.php:63 msgid "Post to Libertree by default" msgstr "" -#: libertree.php:67 +#: libertree.php:68 msgid "Libertree Export" msgstr "" diff --git a/libertree/lang/bg/messages.po b/libertree/lang/bg/messages.po deleted file mode 100644 index c92eb2fc..00000000 --- a/libertree/lang/bg/messages.po +++ /dev/null @@ -1,43 +0,0 @@ -# ADDON libertree -# Copyright (C) -# This file is distributed under the same license as the Friendica libertree addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:49-0400\n" -"PO-Revision-Date: 2014-06-23 09:44+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: libertree.php:39 -msgid "Post to libertree" -msgstr "" - -#: libertree.php:59 -msgid "Enable Libertree Post Addon" -msgstr "" - -#: libertree.php:60 -msgid "Libertree site URL" -msgstr "" - -#: libertree.php:61 -msgid "Libertree API token" -msgstr "" - -#: libertree.php:62 -msgid "Post to Libertree by default" -msgstr "" - -#: libertree.php:67 -msgid "Libertree Export" -msgstr "" diff --git a/libertree/lang/bg/strings.php b/libertree/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/libertree/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: libertree.php:39 -msgid "Post to libertree" -msgstr "" - -#: libertree.php:59 -msgid "Enable Libertree Post Addon" -msgstr "" - -#: libertree.php:60 -msgid "Libertree site URL" -msgstr "" - -#: libertree.php:61 -msgid "Libertree API token" -msgstr "" - -#: libertree.php:62 -msgid "Post to Libertree by default" -msgstr "" - -#: libertree.php:67 -msgid "Libertree Export" -msgstr "" diff --git a/libertree/lang/ca/strings.php b/libertree/lang/ca/strings.php index d34874f6..02c7d22c 100644 --- a/libertree/lang/ca/strings.php +++ b/libertree/lang/ca/strings.php @@ -1,7 +1,9 @@ -strings["Post to libertree"] = "Enviament a libertree"; +$a->strings["libertree Post Settings"] = "Ajustos d'enviaments a libertree"; +$a->strings["Enable Libertree Post Addon"] = "Activa el addon d'enviaments a libertree"; +$a->strings["Libertree API token"] = "Libertree API token"; +$a->strings["Libertree site URL"] = "lloc URL libertree"; +$a->strings["Post to Libertree by default"] = "Enviar a libertree per defecte"; +$a->strings["Submit"] = "Enviar"; diff --git a/libertree/lang/cs/messages.po b/libertree/lang/cs/messages.po index 649fef00..b97b17ed 100644 --- a/libertree/lang/cs/messages.po +++ b/libertree/lang/cs/messages.po @@ -4,42 +4,45 @@ # # # Translators: -# Aditoo, 2018 -# michal_s , 2014-2015 +# Michal Šupler , 2014-2015 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-21 19:17-0500\n" -"PO-Revision-Date: 2014-06-23 09:44+0000\n" -"Last-Translator: Aditoo, 2018\n" -"Language-Team: Czech (http://app.transifex.com/Friendica/friendica/language/cs/)\n" +"POT-Creation-Date: 2013-02-27 05:01-0500\n" +"PO-Revision-Date: 2015-02-11 19:39+0000\n" +"Last-Translator: Michal Šupler \n" +"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" -"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: libertree.php:39 +#: libertree.php:36 msgid "Post to libertree" msgstr "Poslat na libertree" -#: libertree.php:60 +#: libertree.php:67 +msgid "libertree Post Settings" +msgstr "libertree nastavení příspěvků" + +#: libertree.php:69 msgid "Enable Libertree Post Addon" -msgstr "Povolit doplněk Libertree Post" +msgstr "Povolit Libertree Post rozšíření" -#: libertree.php:61 -msgid "Libertree site URL" -msgstr "URL adresa Libertree " - -#: libertree.php:62 +#: libertree.php:74 msgid "Libertree API token" msgstr "Libertree API token" -#: libertree.php:63 -msgid "Post to Libertree by default" -msgstr "Ve výchozím stavu posílat na Libertree" +#: libertree.php:79 +msgid "Libertree site URL" +msgstr "URL adresa Libertree " -#: libertree.php:68 -msgid "Libertree Export" -msgstr "" +#: libertree.php:84 +msgid "Post to Libertree by default" +msgstr "Defaultně poslat na Libertree" + +#: libertree.php:90 +msgid "Submit" +msgstr "Odeslat" diff --git a/libertree/lang/cs/strings.php b/libertree/lang/cs/strings.php index 49a3dd54..2bd6ed4d 100644 --- a/libertree/lang/cs/strings.php +++ b/libertree/lang/cs/strings.php @@ -3,10 +3,12 @@ if(! function_exists("string_plural_select_cs")) { function string_plural_select_cs($n){ $n = intval($n); - if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; } + if (($n==1)) { return 0; } else if (($n>=2 && $n<=4)) { return 1; } else { return 2; } }} $a->strings['Post to libertree'] = 'Poslat na libertree'; -$a->strings['Enable Libertree Post Addon'] = 'Povolit doplněk Libertree Post'; -$a->strings['Libertree site URL'] = 'URL adresa Libertree '; +$a->strings['libertree Post Settings'] = 'libertree nastavení příspěvků'; +$a->strings['Enable Libertree Post Addon'] = 'Povolit Libertree Post rozšíření'; $a->strings['Libertree API token'] = 'Libertree API token'; -$a->strings['Post to Libertree by default'] = 'Ve výchozím stavu posílat na Libertree'; +$a->strings['Libertree site URL'] = 'URL adresa Libertree '; +$a->strings['Post to Libertree by default'] = 'Defaultně poslat na Libertree'; +$a->strings['Submit'] = 'Odeslat'; diff --git a/libertree/lang/de/messages.po b/libertree/lang/de/messages.po index 434b64ab..ae86cb53 100644 --- a/libertree/lang/de/messages.po +++ b/libertree/lang/de/messages.po @@ -13,9 +13,9 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-11-21 19:17-0500\n" -"PO-Revision-Date: 2014-06-23 09:44+0000\n" -"Last-Translator: Tobias Diekershoff , 2018,2021-2022\n" -"Language-Team: German (http://app.transifex.com/Friendica/friendica/language/de/)\n" +"PO-Revision-Date: 2022-01-22 17:34+0000\n" +"Last-Translator: Tobias Diekershoff \n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/libertree/lang/eo/messages.po b/libertree/lang/eo/messages.po deleted file mode 100644 index ee003644..00000000 --- a/libertree/lang/eo/messages.po +++ /dev/null @@ -1,43 +0,0 @@ -# ADDON libertree -# Copyright (C) -# This file is distributed under the same license as the Friendica libertree addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:49-0400\n" -"PO-Revision-Date: 2014-06-23 09:44+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: libertree.php:39 -msgid "Post to libertree" -msgstr "" - -#: libertree.php:59 -msgid "Enable Libertree Post Addon" -msgstr "" - -#: libertree.php:60 -msgid "Libertree site URL" -msgstr "" - -#: libertree.php:61 -msgid "Libertree API token" -msgstr "" - -#: libertree.php:62 -msgid "Post to Libertree by default" -msgstr "" - -#: libertree.php:67 -msgid "Libertree Export" -msgstr "" diff --git a/libertree/lang/eo/strings.php b/libertree/lang/eo/strings.php index 68e8a64c..674972d0 100644 --- a/libertree/lang/eo/strings.php +++ b/libertree/lang/eo/strings.php @@ -1,7 +1,9 @@ -strings["Post to libertree"] = "Afiŝi al libertree"; +$a->strings["libertree Post Settings"] = "Agordoj por Afiŝoj ĉe libertree"; +$a->strings["Enable Libertree Post Addon"] = "Aktivigi Kromprogramon por Afiŝoj ĉe libertree"; +$a->strings["Libertree API token"] = "Libertree API ĵetono"; +$a->strings["Libertree site URL"] = "URL adreso de libertree retejo:"; +$a->strings["Post to Libertree by default"] = "Defaŭlte afiŝi ĉe Libertree"; +$a->strings["Submit"] = "Sendi"; diff --git a/libertree/lang/et/messages.po b/libertree/lang/et/messages.po deleted file mode 100644 index f9a7cca0..00000000 --- a/libertree/lang/et/messages.po +++ /dev/null @@ -1,44 +0,0 @@ -# ADDON libertree -# Copyright (C) -# This file is distributed under the same license as the Friendica libertree addon package. -# -# -# Translators: -# Rain Hawk, 2020 -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:49-0400\n" -"PO-Revision-Date: 2014-06-23 09:44+0000\n" -"Last-Translator: Rain Hawk, 2020\n" -"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: et\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: libertree.php:39 -msgid "Post to libertree" -msgstr "" - -#: libertree.php:59 -msgid "Enable Libertree Post Addon" -msgstr "" - -#: libertree.php:60 -msgid "Libertree site URL" -msgstr "" - -#: libertree.php:61 -msgid "Libertree API token" -msgstr "" - -#: libertree.php:62 -msgid "Post to Libertree by default" -msgstr "" - -#: libertree.php:67 -msgid "Libertree Export" -msgstr "" diff --git a/libertree/lang/et/strings.php b/libertree/lang/et/strings.php deleted file mode 100644 index dfe78358..00000000 --- a/libertree/lang/et/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gd\n" -"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" - -#: libertree.php:39 -msgid "Post to libertree" -msgstr "" - -#: libertree.php:59 -msgid "Enable Libertree Post Addon" -msgstr "" - -#: libertree.php:60 -msgid "Libertree site URL" -msgstr "" - -#: libertree.php:61 -msgid "Libertree API token" -msgstr "" - -#: libertree.php:62 -msgid "Post to Libertree by default" -msgstr "" - -#: libertree.php:67 -msgid "Libertree Export" -msgstr "" diff --git a/libertree/lang/gd/strings.php b/libertree/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/libertree/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/libertree/lang/is/messages.po b/libertree/lang/is/messages.po deleted file mode 100644 index bede59ec..00000000 --- a/libertree/lang/is/messages.po +++ /dev/null @@ -1,43 +0,0 @@ -# ADDON libertree -# Copyright (C) -# This file is distributed under the same license as the Friendica libertree addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:49-0400\n" -"PO-Revision-Date: 2014-06-23 09:44+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: is\n" -"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" - -#: libertree.php:39 -msgid "Post to libertree" -msgstr "" - -#: libertree.php:59 -msgid "Enable Libertree Post Addon" -msgstr "" - -#: libertree.php:60 -msgid "Libertree site URL" -msgstr "" - -#: libertree.php:61 -msgid "Libertree API token" -msgstr "" - -#: libertree.php:62 -msgid "Post to Libertree by default" -msgstr "" - -#: libertree.php:67 -msgid "Libertree Export" -msgstr "" diff --git a/libertree/lang/is/strings.php b/libertree/lang/is/strings.php index 975c341e..6256e21c 100644 --- a/libertree/lang/is/strings.php +++ b/libertree/lang/is/strings.php @@ -1,7 +1,9 @@ -strings["Post to libertree"] = ""; +$a->strings["libertree Post Settings"] = ""; +$a->strings["Enable Libertree Post Addon"] = ""; +$a->strings["Libertree API token"] = ""; +$a->strings["Libertree site URL"] = ""; +$a->strings["Post to Libertree by default"] = ""; +$a->strings["Submit"] = "Senda inn"; diff --git a/libertree/lang/it/messages.po b/libertree/lang/it/messages.po index cc890cc5..7c3bc1ec 100644 --- a/libertree/lang/it/messages.po +++ b/libertree/lang/it/messages.po @@ -5,41 +5,45 @@ # # Translators: # fabrixxm , 2014-2015,2018 -# Sylke Vicious , 2021,2023 +# Sylke Vicious , 2021 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-03 15:49-0400\n" -"PO-Revision-Date: 2014-06-23 09:44+0000\n" -"Last-Translator: Sylke Vicious , 2021,2023\n" -"Language-Team: Italian (http://app.transifex.com/Friendica/friendica/language/it/)\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" +"PO-Revision-Date: 2021-02-16 12:47+0000\n" +"Last-Translator: Sylke Vicious \n" +"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: libertree.php:39 +#: libertree.php:37 msgid "Post to libertree" msgstr "Invia a Libertree" -#: libertree.php:59 +#: libertree.php:71 libertree.php:75 +msgid "libertree Export" +msgstr "Esporta libertree" + +#: libertree.php:79 msgid "Enable Libertree Post Addon" msgstr "Abilita il componente aggiuntivo di invio a Libertree" -#: libertree.php:60 -msgid "Libertree site URL" -msgstr "Indirizzo sito Libertree" - -#: libertree.php:61 +#: libertree.php:84 msgid "Libertree API token" msgstr "Token API Libertree" -#: libertree.php:62 +#: libertree.php:89 +msgid "Libertree site URL" +msgstr "Indirizzo sito Libertree" + +#: libertree.php:94 msgid "Post to Libertree by default" msgstr "Invia sempre a Libertree" -#: libertree.php:67 -msgid "Libertree Export" -msgstr "Esporta Libertree" +#: libertree.php:100 +msgid "Save Settings" +msgstr "Salva Impostazioni" diff --git a/libertree/lang/it/strings.php b/libertree/lang/it/strings.php index 8abcfa2d..02d26542 100644 --- a/libertree/lang/it/strings.php +++ b/libertree/lang/it/strings.php @@ -3,11 +3,12 @@ if(! function_exists("string_plural_select_it")) { function string_plural_select_it($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} $a->strings['Post to libertree'] = 'Invia a Libertree'; +$a->strings['libertree Export'] = 'Esporta libertree'; $a->strings['Enable Libertree Post Addon'] = 'Abilita il componente aggiuntivo di invio a Libertree'; -$a->strings['Libertree site URL'] = 'Indirizzo sito Libertree'; $a->strings['Libertree API token'] = 'Token API Libertree'; +$a->strings['Libertree site URL'] = 'Indirizzo sito Libertree'; $a->strings['Post to Libertree by default'] = 'Invia sempre a Libertree'; -$a->strings['Libertree Export'] = 'Esporta Libertree'; +$a->strings['Save Settings'] = 'Salva Impostazioni'; diff --git a/libertree/libertree.php b/libertree/libertree.php index c1bb2a07..0a909f35 100644 --- a/libertree/libertree.php +++ b/libertree/libertree.php @@ -6,12 +6,13 @@ * Author: Tony Baldwin */ +use Friendica\App; use Friendica\Content\Text\BBCode; use Friendica\Core\Hook; +use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\Database\DBA; use Friendica\DI; -use Friendica\Model\Item; use Friendica\Model\Post; function libertree_install() @@ -73,11 +74,13 @@ function libertree_settings(array &$data) function libertree_settings_post(array &$b) { if (!empty($_POST['libertree-submit'])) { - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'libertree', 'post', intval($_POST['libertree'])); - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'libertree', 'post_by_default', intval($_POST['libertree_bydefault'])); - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'libertree', 'libertree_api_token', trim($_POST['libertree_api_token'])); - DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'libertree', 'libertree_url', trim($_POST['libertree_url'])); + DI::pConfig()->set(DI::userSession()->getLocalUserId(),'libertree','post',intval($_POST['libertree'])); + DI::pConfig()->set(DI::userSession()->getLocalUserId(),'libertree','post_by_default',intval($_POST['libertree_bydefault'])); + DI::pConfig()->set(DI::userSession()->getLocalUserId(),'libertree','libertree_api_token',trim($_POST['libertree_api_token'])); + DI::pConfig()->set(DI::userSession()->getLocalUserId(),'libertree','libertree_url',trim($_POST['libertree_url'])); + } + } function libertree_hook_fork(array &$b) @@ -88,10 +91,8 @@ function libertree_hook_fork(array &$b) $post = $b['data']; - if ( - $post['deleted'] || ($post['private'] == Item::PRIVATE) || ($post['created'] !== $post['edited']) || - !strstr($post['postopts'], 'libertree') || ($post['gravity'] != Item::GRAVITY_PARENT) - ) { + if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) || + !strstr($post['postopts'], 'libertree') || ($post['parent'] != $post['id'])) { $b['execute'] = false; return; } @@ -99,20 +100,26 @@ function libertree_hook_fork(array &$b) function libertree_post_local(array &$b) { + + // This can probably be changed to allow editing by pointing to a different API endpoint + + if ($b['edit']) { + return; + } + if (!DI::userSession()->getLocalUserId() || (DI::userSession()->getLocalUserId() != $b['uid'])) { return; } - // This can probably be changed to allow editing by pointing to a different API endpoint - if ($b['edit'] || ($b['private'] == Item::PRIVATE) || ($b['gravity'] != Item::GRAVITY_PARENT)) { + if ($b['private'] || $b['parent']) { return; } - $ltree_post = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'libertree', 'post')); + $ltree_post = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(),'libertree','post')); $ltree_enable = (($ltree_post && !empty($_REQUEST['libertree_enable'])) ? intval($_REQUEST['libertree_enable']) : 0); - if ($b['api_source'] && intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'libertree', 'post_by_default'))) { + if ($b['api_source'] && intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(),'libertree','post_by_default'))) { $ltree_enable = 1; } @@ -129,17 +136,13 @@ function libertree_post_local(array &$b) function libertree_send(array &$b) { - DI::logger()->notice('libertree_send: invoked'); + Logger::notice('libertree_send: invoked'); - if ($b['deleted'] || ($b['private'] == Item::PRIVATE) || ($b['created'] !== $b['edited'])) { + if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) { return; } - if (! strstr($b['postopts'], 'libertree')) { - return; - } - - if (Item::isGroupPost($b['uri-id'])) { + if (! strstr($b['postopts'],'libertree')) { return; } @@ -148,7 +151,7 @@ function libertree_send(array &$b) } // Dont't post if the post doesn't belong to us. - // This is a check for group postings + // This is a check for forum postings $self = DBA::selectFirst('contact', ['id'], ['uid' => $b['uid'], 'self' => true]); if ($b['contact-id'] != $self['id']) { return; @@ -156,15 +159,15 @@ function libertree_send(array &$b) $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], DI::contentItem()->addSharedPost($b)); - $ltree_api_token = DI::pConfig()->get($b['uid'], 'libertree', 'libertree_api_token'); - $ltree_url = DI::pConfig()->get($b['uid'], 'libertree', 'libertree_url'); + $ltree_api_token = DI::pConfig()->get($b['uid'],'libertree','libertree_api_token'); + $ltree_url = DI::pConfig()->get($b['uid'],'libertree','libertree_url'); $ltree_blog = "$ltree_url/api/v1/posts/create/?token=$ltree_api_token"; - $ltree_source = DI::baseUrl()->getHost(); + $ltree_source = DI::baseUrl()->getHostname(); if ($b['app'] != "") - $ltree_source .= " (" . $b['app'] . ")"; + $ltree_source .= " (".$b['app'].")"; - if ($ltree_url && $ltree_api_token && $ltree_blog && $ltree_source) { + if($ltree_url && $ltree_api_token && $ltree_blog && $ltree_source) { $title = $b['title']; $body = $b['body']; // Insert a newline before and after a quote @@ -174,7 +177,7 @@ function libertree_send(array &$b) // Removal of tags and mentions // #-tags $body = preg_replace('/#\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', '#$2', $body); - // @-mentions + // @-mentions $body = preg_replace('/@\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', '@$2', $body); // remove multiple newlines @@ -195,10 +198,10 @@ function libertree_send(array &$b) $params = [ 'text' => $body, 'source' => $ltree_source - // 'token' => $ltree_api_token + // 'token' => $ltree_api_token ]; - $result = DI::httpClient()->post($ltree_blog, $params)->getBodyString(); - DI::logger()->notice('libertree: ' . $result); + $result = DI::httpClient()->post($ltree_blog, $params)->getBody(); + Logger::notice('libertree: ' . $result); } } diff --git a/libravatar/Services/Libravatar.php b/libravatar/Services/Libravatar.php index 8b3dd493..18aa5c90 100644 --- a/libravatar/Services/Libravatar.php +++ b/libravatar/Services/Libravatar.php @@ -217,7 +217,7 @@ class Services_Libravatar * * @param array $options Array of options for getUrl() * - * @return array + * @return void * @throws Exception When an invalid option is used */ protected function checkOptionsArray($options) @@ -361,7 +361,7 @@ class Services_Libravatar protected function domainGet($identifier) { if ($identifier === null) { - return ''; + return null; } // What are we, email or openid? Split ourself up and get the @@ -401,8 +401,9 @@ class Services_Libravatar */ protected function srvGet($domain, $https = false) { + // Are we going secure? Set up a fallback too. - if ($https === true) { + if (isset($https) && $https === true) { $subdomain = '_avatars-sec._tcp.'; $fallback = 'seccdn.'; } else { @@ -425,7 +426,6 @@ class Services_Libravatar $top = $srv[0]; $sum = 0; - $pri = []; // Try to adhere to RFC2782's weighting algorithm, page 3 // "arrange all SRV RRs (that have not been ordered yet) in any order, @@ -462,8 +462,6 @@ class Services_Libravatar return $v['target']; } } - - return ''; } /** diff --git a/libravatar/lang/bg/messages.po b/libravatar/lang/bg/messages.po deleted file mode 100644 index 4b377dc3..00000000 --- a/libravatar/lang/bg/messages.po +++ /dev/null @@ -1,70 +0,0 @@ -# ADDON libravatar -# Copyright (C) -# This file is distributed under the same license as the Friendica libravatar addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 09:49+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: libravatar.php:68 -msgid "generic profile image" -msgstr "" - -#: libravatar.php:69 -msgid "random geometric pattern" -msgstr "" - -#: libravatar.php:70 -msgid "monster face" -msgstr "" - -#: libravatar.php:71 -msgid "computer generated face" -msgstr "" - -#: libravatar.php:72 -msgid "retro arcade style face" -msgstr "" - -#: libravatar.php:73 -msgid "roboter face" -msgstr "" - -#: libravatar.php:74 -msgid "retro adventure game character" -msgstr "" - -#: libravatar.php:78 -msgid "Information" -msgstr "" - -#: libravatar.php:78 -msgid "" -"Gravatar addon is installed. Please disable the Gravatar addon.
The " -"Libravatar addon will fall back to Gravatar if nothing was found at " -"Libravatar." -msgstr "" - -#: libravatar.php:83 -msgid "Save Settings" -msgstr "" - -#: libravatar.php:84 -msgid "Default avatar image" -msgstr "" - -#: libravatar.php:84 -msgid "Select default avatar image if none was found. See README" -msgstr "" diff --git a/libravatar/lang/bg/strings.php b/libravatar/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/libravatar/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: libravatar.php:68 -msgid "generic profile image" -msgstr "" - -#: libravatar.php:69 -msgid "random geometric pattern" -msgstr "" - -#: libravatar.php:70 -msgid "monster face" -msgstr "" - -#: libravatar.php:71 -msgid "computer generated face" -msgstr "" - -#: libravatar.php:72 -msgid "retro arcade style face" -msgstr "" - -#: libravatar.php:73 -msgid "roboter face" -msgstr "" - -#: libravatar.php:74 -msgid "retro adventure game character" -msgstr "" - -#: libravatar.php:78 -msgid "Information" -msgstr "" - -#: libravatar.php:78 -msgid "" -"Gravatar addon is installed. Please disable the Gravatar addon.
The " -"Libravatar addon will fall back to Gravatar if nothing was found at " -"Libravatar." -msgstr "" - -#: libravatar.php:83 -msgid "Save Settings" -msgstr "" - -#: libravatar.php:84 -msgid "Default avatar image" -msgstr "" - -#: libravatar.php:84 -msgid "Select default avatar image if none was found. See README" -msgstr "" diff --git a/libravatar/lang/ca/strings.php b/libravatar/lang/ca/strings.php index d34874f6..f921b9fd 100644 --- a/libravatar/lang/ca/strings.php +++ b/libravatar/lang/ca/strings.php @@ -1,7 +1,17 @@ -strings["Could NOT install Libravatar successfully.
It requires PHP >= 5.3"] = "No puc instal·lar Libravatar ,
requereix PHP>=5.3"; +$a->strings["generic profile image"] = "imatge de perfil genérica"; +$a->strings["random geometric pattern"] = "Patró geometric aleatori"; +$a->strings["monster face"] = "Cara monstruosa"; +$a->strings["computer generated face"] = "Cara monstruosa generada per ordinador"; +$a->strings["retro arcade style face"] = "Cara d'estil arcade retro"; +$a->strings["Warning"] = "Avís"; +$a->strings["Your PHP version %s is lower than the required PHP >= 5.3."] = "La teva versió de PHP %s es inferior a la requerida, PHP>=5.3"; +$a->strings["This addon is not functional on your server."] = "Aquest addon no es funcional al teu servidor."; +$a->strings["Information"] = "informació"; +$a->strings["Gravatar addon is installed. Please disable the Gravatar addon.
The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar."] = "el addon Gravatar està instal·lat. Si us plau, desactiva el addon Gravatar.
El addon Libravatar tornarà a Gravatar si no es trova res a Libravatar."; +$a->strings["Submit"] = "Enviar"; +$a->strings["Default avatar image"] = "Imatge d'avatar per defecte"; +$a->strings["Select default avatar image if none was found. See README"] = "seleccionada la imatge d'avatar per defecte si no es trova cap altre. Veure README"; +$a->strings["Libravatar settings updated."] = "Ajustos de Libravatar actualitzats."; diff --git a/libravatar/lang/de/messages.po b/libravatar/lang/de/messages.po index 6c0d7c01..60575f0c 100644 --- a/libravatar/lang/de/messages.po +++ b/libravatar/lang/de/messages.po @@ -12,10 +12,10 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 09:49+0000\n" -"Last-Translator: Tobias Diekershoff , 2021\n" -"Language-Team: German (http://app.transifex.com/Friendica/friendica/language/de/)\n" +"POT-Creation-Date: 2020-12-08 07:16+0000\n" +"PO-Revision-Date: 2021-02-01 06:30+0000\n" +"Last-Translator: Tobias Diekershoff \n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/libravatar/lang/eo/messages.po b/libravatar/lang/eo/messages.po deleted file mode 100644 index 7dccdb84..00000000 --- a/libravatar/lang/eo/messages.po +++ /dev/null @@ -1,70 +0,0 @@ -# ADDON libravatar -# Copyright (C) -# This file is distributed under the same license as the Friendica libravatar addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-01 18:15+0100\n" -"PO-Revision-Date: 2014-06-23 09:49+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: libravatar.php:68 -msgid "generic profile image" -msgstr "" - -#: libravatar.php:69 -msgid "random geometric pattern" -msgstr "" - -#: libravatar.php:70 -msgid "monster face" -msgstr "" - -#: libravatar.php:71 -msgid "computer generated face" -msgstr "" - -#: libravatar.php:72 -msgid "retro arcade style face" -msgstr "" - -#: libravatar.php:73 -msgid "roboter face" -msgstr "" - -#: libravatar.php:74 -msgid "retro adventure game character" -msgstr "" - -#: libravatar.php:78 -msgid "Information" -msgstr "" - -#: libravatar.php:78 -msgid "" -"Gravatar addon is installed. Please disable the Gravatar addon.
The " -"Libravatar addon will fall back to Gravatar if nothing was found at " -"Libravatar." -msgstr "" - -#: libravatar.php:83 -msgid "Save Settings" -msgstr "" - -#: libravatar.php:84 -msgid "Default avatar image" -msgstr "" - -#: libravatar.php:84 -msgid "Select default avatar image if none was found. See README" -msgstr "" diff --git a/libravatar/lang/eo/strings.php b/libravatar/lang/eo/strings.php index 68e8a64c..455f0e2a 100644 --- a/libravatar/lang/eo/strings.php +++ b/libravatar/lang/eo/strings.php @@ -1,7 +1,17 @@ -strings["Could NOT install Libravatar successfully.
It requires PHP >= 5.3"] = "NE SUKCESIS instali la bibliotekon Libravatar.
Ĝi bezonas PHP >= 5.3"; +$a->strings["generic profile image"] = "komuna profilbildo"; +$a->strings["random geometric pattern"] = "loteca geometria skemo"; +$a->strings["monster face"] = "monstrobildo"; +$a->strings["computer generated face"] = "komputita vizaĝo"; +$a->strings["retro arcade style face"] = "retrostila videoludstila vizaĝo"; +$a->strings["Warning"] = "Averto"; +$a->strings["Your PHP version %s is lower than the required PHP >= 5.3."] = "Via PHP versio %s estas malpli alta ol la bezonata PHP >= 5.3."; +$a->strings["This addon is not functional on your server."] = "Tiu ĉi kromprogramo ne funkcieblas je via servilo."; +$a->strings["Information"] = "Informo"; +$a->strings["Gravatar addon is installed. Please disable the Gravatar addon.
The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar."] = "La Gravatar kromprogramo estas instalita. Bonvolu malŝalti la Gravatar kromprogramon.
- - - - - {{foreach $th_users as $k=>$th}} - {{if $k < 2 || $order_users == $th.1 || ($k==4 && !in_array($order_users,[$th_users.2.1, $th_users.3.1, $th_users.5.1])) }} - - {{/if}} - {{/foreach}} - - - - - {{foreach $users as $u}} - - - - - - {{if $order_users == $th_users.2.1}} - - {{/if}} - - {{if $order_users == $th_users.3.1}} - - {{/if}} - - {{if $order_users == $th_users.5.1}} - - {{/if}} - - {{if !in_array($order_users,[$th_users.2.1, $th_users.3.1, $th_users.5.1]) }} - - {{/if}} - - - - - - - - - {{/foreach}} - -
- - {{if $order_users == $th.1}} - {{if $order_direction_users == "+"}} - ↓ - {{else}} - ↑ - {{/if}} - {{else}} - ↕ - {{/if}} - {{$th.0}} - -
{{$u.name}}{{$u.email}}{{$u.register_date}}{{$u.login_date}} - - - {{if $u.page_flags_raw==0 && $u.account_type_raw > 0}} - - {{/if}} - {{if $u.is_admin}}{{/if}} - {{if $u.account_expired}}{{/if}} - {{$u.lastitem_date}} - -
- {{$pager nofilter}} - - diff --git a/rendertime/lang/bg/messages.po b/rendertime/lang/bg/messages.po deleted file mode 100644 index f55f683f..00000000 --- a/rendertime/lang/bg/messages.po +++ /dev/null @@ -1,53 +0,0 @@ -# ADDON rendertime -# Copyright (C) -# This file is distributed under the same license as the Friendica rendertime addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-12 22:09+0000\n" -"PO-Revision-Date: 2014-06-23 12:36+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Bulgarian (http://app.transifex.com/Friendica/friendica/language/bg/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: bg\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: rendertime.php:30 -msgid "Save Settings" -msgstr "" - -#: rendertime.php:31 -msgid "Show callstack" -msgstr "" - -#: rendertime.php:31 -msgid "" -"Show detailed performance measures in the callstack. When deactivated, only " -"the summary will be displayed." -msgstr "" - -#: rendertime.php:32 -msgid "Minimal time" -msgstr "" - -#: rendertime.php:32 -msgid "Minimal time that an activity needs to be listed in the callstack." -msgstr "" - -#: rendertime.php:57 -#, php-format -msgid "" -"Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: " -"%s, Total: %s" -msgstr "" - -#: rendertime.php:74 -#, php-format -msgid "Class-Init: %s, Boot: %s, Init: %s, Content: %s, Other: %s, Total: %s" -msgstr "" diff --git a/rendertime/lang/bg/strings.php b/rendertime/lang/bg/strings.php deleted file mode 100644 index d912b572..00000000 --- a/rendertime/lang/bg/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -\n" -"Language-Team: Catalan (http://app.transifex.com/Friendica/friendica/language/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: rendertime.php:30 -msgid "Save Settings" -msgstr "" - -#: rendertime.php:31 -msgid "Show callstack" -msgstr "" - -#: rendertime.php:31 -msgid "" -"Show detailed performance measures in the callstack. When deactivated, only " -"the summary will be displayed." -msgstr "" - -#: rendertime.php:32 -msgid "Minimal time" -msgstr "" - -#: rendertime.php:32 -msgid "Minimal time that an activity needs to be listed in the callstack." -msgstr "" - -#: rendertime.php:57 -#, php-format -msgid "" -"Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: " -"%s, Total: %s" -msgstr "" - -#: rendertime.php:74 -#, php-format -msgid "Class-Init: %s, Boot: %s, Init: %s, Content: %s, Other: %s, Total: %s" -msgstr "" diff --git a/rendertime/lang/ca/strings.php b/rendertime/lang/ca/strings.php index d34874f6..ab4fa67a 100644 --- a/rendertime/lang/ca/strings.php +++ b/rendertime/lang/ca/strings.php @@ -1,7 +1,2 @@ -, 2014 +# Michal Šupler , 2014 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-12 22:09+0000\n" -"PO-Revision-Date: 2014-06-23 12:36+0000\n" -"Last-Translator: Aditoo, 2018\n" -"Language-Team: Czech (http://app.transifex.com/Friendica/friendica/language/cs/)\n" +"POT-Creation-Date: 2014-06-22 13:18+0200\n" +"PO-Revision-Date: 2014-07-28 18:10+0000\n" +"Last-Translator: Michal Šupler \n" +"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" -"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" #: rendertime.php:30 -msgid "Save Settings" -msgstr "" - -#: rendertime.php:31 -msgid "Show callstack" -msgstr "" - -#: rendertime.php:31 -msgid "" -"Show detailed performance measures in the callstack. When deactivated, only " -"the summary will be displayed." -msgstr "" - -#: rendertime.php:32 -msgid "Minimal time" -msgstr "" - -#: rendertime.php:32 -msgid "Minimal time that an activity needs to be listed in the callstack." -msgstr "" - -#: rendertime.php:57 #, php-format msgid "" -"Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: " -"%s, Total: %s" -msgstr "" - -#: rendertime.php:74 -#, php-format -msgid "Class-Init: %s, Boot: %s, Init: %s, Content: %s, Other: %s, Total: %s" -msgstr "" +"Performance: Database: %s, Network: %s, Rendering: %s, Parser: %s, I/O: %s, " +"Other: %s, Total: %s" +msgstr "Výkonnost: Databáze: %s, Síť: %s, Rendering: %s, Parser: %s, I/O: %s, Ostatní: %s, Celkem: %s" diff --git a/rendertime/lang/cs/strings.php b/rendertime/lang/cs/strings.php index ce2e465e..1fc547fa 100644 --- a/rendertime/lang/cs/strings.php +++ b/rendertime/lang/cs/strings.php @@ -3,5 +3,6 @@ if(! function_exists("string_plural_select_cs")) { function string_plural_select_cs($n){ $n = intval($n); - if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; } + if (($n==1)) { return 0; } else if (($n>=2 && $n<=4)) { return 1; } else { return 2; } }} +$a->strings['Performance: Database: %s, Network: %s, Rendering: %s, Parser: %s, I/O: %s, Other: %s, Total: %s'] = 'Výkonnost: Databáze: %s, Síť: %s, Rendering: %s, Parser: %s, I/O: %s, Ostatní: %s, Celkem: %s'; diff --git a/rendertime/lang/de/messages.po b/rendertime/lang/de/messages.po index 293ed698..f615f1b3 100644 --- a/rendertime/lang/de/messages.po +++ b/rendertime/lang/de/messages.po @@ -11,9 +11,9 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-12 22:09+0000\n" -"PO-Revision-Date: 2014-06-23 12:36+0000\n" -"Last-Translator: Tobias Diekershoff , 2021-2022\n" -"Language-Team: German (http://app.transifex.com/Friendica/friendica/language/de/)\n" +"PO-Revision-Date: 2022-01-22 17:39+0000\n" +"Last-Translator: Tobias Diekershoff \n" +"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/rendertime/lang/eo/messages.po b/rendertime/lang/eo/messages.po deleted file mode 100644 index 9017ec33..00000000 --- a/rendertime/lang/eo/messages.po +++ /dev/null @@ -1,53 +0,0 @@ -# ADDON rendertime -# Copyright (C) -# This file is distributed under the same license as the Friendica rendertime addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-12 22:09+0000\n" -"PO-Revision-Date: 2014-06-23 12:36+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Esperanto (http://app.transifex.com/Friendica/friendica/language/eo/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: eo\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: rendertime.php:30 -msgid "Save Settings" -msgstr "" - -#: rendertime.php:31 -msgid "Show callstack" -msgstr "" - -#: rendertime.php:31 -msgid "" -"Show detailed performance measures in the callstack. When deactivated, only " -"the summary will be displayed." -msgstr "" - -#: rendertime.php:32 -msgid "Minimal time" -msgstr "" - -#: rendertime.php:32 -msgid "Minimal time that an activity needs to be listed in the callstack." -msgstr "" - -#: rendertime.php:57 -#, php-format -msgid "" -"Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: " -"%s, Total: %s" -msgstr "" - -#: rendertime.php:74 -#, php-format -msgid "Class-Init: %s, Boot: %s, Init: %s, Content: %s, Other: %s, Total: %s" -msgstr "" diff --git a/rendertime/lang/eo/strings.php b/rendertime/lang/eo/strings.php index 68e8a64c..ab4fa67a 100644 --- a/rendertime/lang/eo/strings.php +++ b/rendertime/lang/eo/strings.php @@ -1,7 +1,2 @@ -\n" -"Language-Team: Estonian (http://app.transifex.com/Friendica/friendica/language/et/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: et\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: rendertime.php:30 -msgid "Save Settings" -msgstr "" - -#: rendertime.php:31 -msgid "Show callstack" -msgstr "" - -#: rendertime.php:31 -msgid "" -"Show detailed performance measures in the callstack. When deactivated, only " -"the summary will be displayed." -msgstr "" - -#: rendertime.php:32 -msgid "Minimal time" -msgstr "" - -#: rendertime.php:32 -msgid "Minimal time that an activity needs to be listed in the callstack." -msgstr "" - -#: rendertime.php:57 -#, php-format -msgid "" -"Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: " -"%s, Total: %s" -msgstr "" - -#: rendertime.php:74 -#, php-format -msgid "Class-Init: %s, Boot: %s, Init: %s, Content: %s, Other: %s, Total: %s" -msgstr "" diff --git a/rendertime/lang/et/strings.php b/rendertime/lang/et/strings.php deleted file mode 100644 index dfe78358..00000000 --- a/rendertime/lang/et/strings.php +++ /dev/null @@ -1,7 +0,0 @@ -, 2022 # Nicolas Derive, 2022 # Thecross, 2017 @@ -14,8 +13,8 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-12 22:09+0000\n" "PO-Revision-Date: 2014-06-23 12:36+0000\n" -"Last-Translator: cracrayol, 2025\n" -"Language-Team: French (http://app.transifex.com/Friendica/friendica/language/fr/)\n" +"Last-Translator: Nicolas Derive, 2022\n" +"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -24,7 +23,7 @@ msgstr "" #: rendertime.php:30 msgid "Save Settings" -msgstr "Sauvegarder les paramètres" +msgstr "Enregistrer les paramètres" #: rendertime.php:31 msgid "Show callstack" diff --git a/rendertime/lang/fr/strings.php b/rendertime/lang/fr/strings.php index 2d21fdad..d6aed6fa 100644 --- a/rendertime/lang/fr/strings.php +++ b/rendertime/lang/fr/strings.php @@ -5,7 +5,7 @@ function string_plural_select_fr($n){ $n = intval($n); if (($n == 0 || $n == 1)) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } }} -$a->strings['Save Settings'] = 'Sauvegarder les paramètres'; +$a->strings['Save Settings'] = 'Enregistrer les paramètres'; $a->strings['Show callstack'] = 'Afficher le callstack'; $a->strings['Show detailed performance measures in the callstack. When deactivated, only the summary will be displayed.'] = 'Affiche les performances détaillées dans le callstack. Si désactivé, seul le résumé sera affiché.'; $a->strings['Minimal time'] = 'Temps minimal'; diff --git a/rendertime/lang/gd/messages.po b/rendertime/lang/gd/messages.po deleted file mode 100644 index 9362eb06..00000000 --- a/rendertime/lang/gd/messages.po +++ /dev/null @@ -1,53 +0,0 @@ -# ADDON rendertime -# Copyright (C) -# This file is distributed under the same license as the Friendica rendertime addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-12 22:09+0000\n" -"PO-Revision-Date: 2014-06-23 12:36+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Gaelic, Scottish (http://app.transifex.com/Friendica/friendica/language/gd/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: gd\n" -"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n" - -#: rendertime.php:30 -msgid "Save Settings" -msgstr "" - -#: rendertime.php:31 -msgid "Show callstack" -msgstr "" - -#: rendertime.php:31 -msgid "" -"Show detailed performance measures in the callstack. When deactivated, only " -"the summary will be displayed." -msgstr "" - -#: rendertime.php:32 -msgid "Minimal time" -msgstr "" - -#: rendertime.php:32 -msgid "Minimal time that an activity needs to be listed in the callstack." -msgstr "" - -#: rendertime.php:57 -#, php-format -msgid "" -"Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: " -"%s, Total: %s" -msgstr "" - -#: rendertime.php:74 -#, php-format -msgid "Class-Init: %s, Boot: %s, Init: %s, Content: %s, Other: %s, Total: %s" -msgstr "" diff --git a/rendertime/lang/gd/strings.php b/rendertime/lang/gd/strings.php deleted file mode 100644 index dcbcfe0a..00000000 --- a/rendertime/lang/gd/strings.php +++ /dev/null @@ -1,7 +0,0 @@ - 2 && $n < 20)) { return 2; } else { return 3; } -}} diff --git a/rendertime/lang/is/messages.po b/rendertime/lang/is/messages.po deleted file mode 100644 index 9812a11f..00000000 --- a/rendertime/lang/is/messages.po +++ /dev/null @@ -1,53 +0,0 @@ -# ADDON rendertime -# Copyright (C) -# This file is distributed under the same license as the Friendica rendertime addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-12 22:09+0000\n" -"PO-Revision-Date: 2014-06-23 12:36+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Icelandic (http://app.transifex.com/Friendica/friendica/language/is/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: is\n" -"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n" - -#: rendertime.php:30 -msgid "Save Settings" -msgstr "" - -#: rendertime.php:31 -msgid "Show callstack" -msgstr "" - -#: rendertime.php:31 -msgid "" -"Show detailed performance measures in the callstack. When deactivated, only " -"the summary will be displayed." -msgstr "" - -#: rendertime.php:32 -msgid "Minimal time" -msgstr "" - -#: rendertime.php:32 -msgid "Minimal time that an activity needs to be listed in the callstack." -msgstr "" - -#: rendertime.php:57 -#, php-format -msgid "" -"Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: " -"%s, Total: %s" -msgstr "" - -#: rendertime.php:74 -#, php-format -msgid "Class-Init: %s, Boot: %s, Init: %s, Content: %s, Other: %s, Total: %s" -msgstr "" diff --git a/rendertime/lang/is/strings.php b/rendertime/lang/is/strings.php index 975c341e..ab4fa67a 100644 --- a/rendertime/lang/is/strings.php +++ b/rendertime/lang/is/strings.php @@ -1,7 +1,2 @@ -, 2021\n" -"Language-Team: Italian (http://app.transifex.com/Friendica/friendica/language/it/)\n" +"POT-Creation-Date: 2021-02-01 18:15+0100\n" +"PO-Revision-Date: 2021-02-16 13:01+0000\n" +"Last-Translator: Sylke Vicious \n" +"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: rendertime.php:30 -msgid "Save Settings" -msgstr "" - -#: rendertime.php:31 -msgid "Show callstack" -msgstr "" - -#: rendertime.php:31 -msgid "" -"Show detailed performance measures in the callstack. When deactivated, only " -"the summary will be displayed." -msgstr "" - -#: rendertime.php:32 -msgid "Minimal time" -msgstr "" - -#: rendertime.php:32 -msgid "Minimal time that an activity needs to be listed in the callstack." -msgstr "" - -#: rendertime.php:57 +#: rendertime.php:36 #, php-format msgid "" "Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: " "%s, Total: %s" msgstr "Database: %s/%s, Rete: %s, Rendering: %s, Sessione: %s, I/O: %s, Altro: %s, Totale: %s" -#: rendertime.php:74 +#: rendertime.php:53 #, php-format msgid "Class-Init: %s, Boot: %s, Init: %s, Content: %s, Other: %s, Total: %s" msgstr "Class-Init: %s, Boot: %s, Init: %s, Content: %s, Altro: %s, Totale: %s" diff --git a/rendertime/lang/it/strings.php b/rendertime/lang/it/strings.php index 5b05d933..6eaf200c 100644 --- a/rendertime/lang/it/strings.php +++ b/rendertime/lang/it/strings.php @@ -3,7 +3,7 @@ if(! function_exists("string_plural_select_it")) { function string_plural_select_it($n){ $n = intval($n); - if ($n == 1) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; } + return intval($n != 1); }} $a->strings['Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: %s, Total: %s'] = 'Database: %s/%s, Rete: %s, Rendering: %s, Sessione: %s, I/O: %s, Altro: %s, Totale: %s'; $a->strings['Class-Init: %s, Boot: %s, Init: %s, Content: %s, Other: %s, Total: %s'] = 'Class-Init: %s, Boot: %s, Init: %s, Content: %s, Altro: %s, Totale: %s'; diff --git a/rendertime/lang/ru/messages.po b/rendertime/lang/ru/messages.po deleted file mode 100644 index 7c4eba71..00000000 --- a/rendertime/lang/ru/messages.po +++ /dev/null @@ -1,53 +0,0 @@ -# ADDON rendertime -# Copyright (C) -# This file is distributed under the same license as the Friendica rendertime addon package. -# -# -# Translators: -msgid "" -msgstr "" -"Project-Id-Version: friendica\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-12 22:09+0000\n" -"PO-Revision-Date: 2014-06-23 12:36+0000\n" -"Last-Translator: FULL NAME \n" -"Language-Team: Russian (http://app.transifex.com/Friendica/friendica/language/ru/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" - -#: rendertime.php:30 -msgid "Save Settings" -msgstr "" - -#: rendertime.php:31 -msgid "Show callstack" -msgstr "" - -#: rendertime.php:31 -msgid "" -"Show detailed performance measures in the callstack. When deactivated, only " -"the summary will be displayed." -msgstr "" - -#: rendertime.php:32 -msgid "Minimal time" -msgstr "" - -#: rendertime.php:32 -msgid "Minimal time that an activity needs to be listed in the callstack." -msgstr "" - -#: rendertime.php:57 -#, php-format -msgid "" -"Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: " -"%s, Total: %s" -msgstr "" - -#: rendertime.php:74 -#, php-format -msgid "Class-Init: %s, Boot: %s, Init: %s, Content: %s, Other: %s, Total: %s" -msgstr "" diff --git a/rendertime/lang/ru/strings.php b/rendertime/lang/ru/strings.php index 0579fc21..ab4fa67a 100644 --- a/rendertime/lang/ru/strings.php +++ b/rendertime/lang/ru/strings.php @@ -1,7 +1,2 @@ -=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; } -}} +isSiteAdmin() && (($_GET['mode'] ?? '') != 'minimal') && !DI::mode()->isMobile() && !DI::mode()->isMobile() && !$ignored) { - $o = $o . '