Compare commits

..

9 Commits

Author SHA1 Message Date
c1e5787120 Add validation to prevent whitespaces be inputted on NIP-05 input field 2023-03-27 10:34:39 -04:00
William Casarin
0b40cd127c Revert "Revert "Don't make previews full bleed""
This reverts commit 57006b928b.
2023-03-26 09:36:02 -06:00
William Casarin
754ee254e9 Revert "Revert "New Timeline""
This reverts commit f5ed9cd5d4.
2023-03-26 09:35:53 -06:00
William Casarin
963cb37762 Revert "Increase image size"
This reverts commit b6d5b6f45e.
2023-03-26 09:35:07 -06:00
William Casarin
159d0fa2b5 Don't render @note link if there is only one 2023-03-25 07:54:04 -06:00
William Casarin
61fddf800e Reduced padding for more information density
Changelog-Changed: Reduced padding for more information density
2023-03-25 06:51:56 -06:00
William Casarin
b6d5b6f45e Increase image size 2023-03-25 06:38:06 -06:00
William Casarin
f5ed9cd5d4 Revert "New Timeline"
This reverts commit f84d4516db.
2023-03-25 06:31:24 -06:00
William Casarin
57006b928b Revert "Don't make previews full bleed"
This reverts commit 98f0b2f2d2.
2023-03-25 06:31:18 -06:00
10 changed files with 31 additions and 83 deletions

View File

@@ -1,49 +0,0 @@
name: Export Source Translations
on:
push:
branches:
- master
jobs:
export-source-translations:
name: Update translations branch
runs-on: macos-12
strategy:
matrix:
include:
- xcode: "14.2"
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Run export script
run: |
sh devtools/export-source-translation.sh
- name: Push source translations to Transifex
uses: transifex/cli-action@v2
with:
token: ${{ secrets.TX_TOKEN }}
args: push --branch ''
- name: Remove extraneous /tmp/tx file from running transifex cli that breaks the next pull step
run: |
rm -rf /tmp/tx
- name: Pull translations from Transifex
uses: transifex/cli-action@v2
with:
token: ${{ secrets.TX_TOKEN }}
args: pull --branch ''
- name: Commit translation changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update Translations 🤖
branch: translations
create_branch: true
push_options: '--force'
- name: Create Pull Request
uses: repo-sync/pull-request@v2
with:
source_branch: "translations"
destination_branch: "master"
pr_title: "Update Translations 🤖"
if: steps.auto-commit-action.outputs.changes_detected == 'true'

View File

@@ -1,24 +0,0 @@
[main]
host = https://www.transifex.com
lang_map = aa_DJ: aa-DJ, af_ZA: af-ZA, am_ET: am-ET, ar_AA: ar-AA, ar_AE: ar-AE, ar_DZ: ar-DZ, ar_EG: ar-EG, ar_IQ: ar-IQ, ar_JO: ar-JO, ar_LB: ar-LB, ar_SA: ar-SA, ar_SD: ar-SD, ar_SY: ar-SY, as_IN: as-IN, ast_ES: ast-ES, az_AZ: az-AZ, az_IR: az-IR, be_BY: be-BY, bem_ZM: bem-ZM, bg_BG: bg-BG, bg_US: bg-US, bn_BD: bn-BD, bn_IN: bn-IN, bo_CN: bo-CN, bqi_IR: bqi-IR, br_FR: br-FR, bs_BA: bs-BA, bs_BA-SRP: bs-BA-SRP, ca_ES: ca-ES, cs_CZ: cs-CZ, cy_GB: cy-GB, da_DK: da-DK, de_AT: de-AT, de_CH: de-CH, de_DE: de-DE, dz_BT: dz-BT, el_CY: el-CY, el_DE: el-DE, el_GR: el-GR, en_AE: en-AE, en_AL: en-AL, en_AT: en-AT, en_AU: en-AU, en_BA: en-BA, en_BA-SRP: en-BA-SRP, en_BD: en-BD, en_BE: en-BE, en_BG: en-BG, en_BH: en-BH, en_BR: en-BR, en_CA: en-CA, en_CH: en-CH, en_CL: en-CL, en_CO: en-CO, en_CY: en-CY, en_CZ: en-CZ, en_DE: en-DE, en_DK: en-DK, en_EC: en-EC, en_EG: en-EG, en_ES: en-ES, en_FI: en-FI, en_FJ: en-FJ, en_FR: en-FR, en_GB: en-GB, en_GH: en-GH, en_GR: en-GR, en_HK: en-HK, en_HR: en-HR, en_HU: en-HU, en_IE: en-IE, en_IN: en-IN, en_IT: en-IT, en_JP: en-JP, en_KR: en-KR, en_KW: en-KW, en_LK: en-LK, en_MX: en-MX, en_MY: en-MY, en_NG: en-NG, en_NL: en-NL, en_NO: en-NO, en_NZ: en-NZ, en_PE: en-PE, en_PG: en-PG, en_PH: en-PH, en_PK: en-PK, en_PL: en-PL, en_PR: en-PR, en_PT: en-PT, en_QA: en-QA, en_RO: en-RO, en_RS: en-RS, en_SA: en-SA, en_SE: en-SE, en_SG: en-SG, en_SI: en-SI, en_SK: en-SK, en_TT: en-TT, en_UG: en-UG, en_ZA: en-ZA, en_ZM: en-ZM, en_ee: en-ee, en_lt: en-lt, en_lv: en-lv, es_419: es-419, es_AR: es-AR, es_BO: es-BO, es_CL: es-CL, es_CO: es-CO, es_CR: es-CR, es_CU: es-CU, es_DO: es-DO, es_EC: es-EC, es_ES: es-ES, es_GT: es-GT, es_HN: es-HN, es_MX: es-MX, es_NI: es-NI, es_PA: es-PA, es_PE: es-PE, es_PR: es-PR, es_PY: es-PY, es_SA: es-SA, es_SV: es-SV, es_US: es-US, es_UY: es-UY, es_VE: es-VE, et_EE: et-EE, eu_ES: eu-ES, fa_AF: fa-AF, fa_IR: fa-IR, ff_SN: ff-SN, fi_FI: fi-FI, fil_PH: fil-PH, fo_FO: fo-FO, fr_BE: fr-BE, fr_CA: fr-CA, fr_CH: fr-CH, fr_CI: fr-CI, fr_CM: fr-CM, fr_FR: fr-FR, fr_GA: fr-GA, fr_LU: fr-LU, fy_NL: fy-NL, ga_IE: ga-IE, gl_ES: gl-ES, gu_IN: gu-IN, gug_PY: gug-PY, he_IL: he-IL, hi_IN: hi-IN, hr_BA: hr-BA, hr_BA-SRP: hr-BA-SRP, hr_HR: hr-HR, ht_HT: ht-HT, hu_HU: hu-HU, hu_RO: hu-RO, hu_SK: hu-SK, hy_AM: hy-AM, hy_RU: hy-RU, hye_RU: hye-RU, id_ID: id-ID, is_IS: is-IS, it_CH: it-CH, it_IT: it-IT, ja_JP: ja-JP, ka_GE: ka-GE, kk_KZ: kk-KZ, km_KH: km-KH, kn_IN: kn-IN, ko_KR: ko-KR, ks_IN: ks-IN, ku_IQ: ku-IQ, lg_UG: lg-UG, lo_LA: lo-LA, loz_ZM: loz-ZM, lt_LT: lt-LT, lv_LV: lv-LV, mhr_RU: mhr-RU, mk_MK: mk-MK, ml_IN: ml-IN, mn_MN: mn-MN, mr_IN: mr-IN, ms_BN: ms-BN, ms_MY: ms-MY, mt_MT: mt-MT, my_MM: my-MM, nb_NO: nb-NO, ne_NP: ne-NP, nl_BE: nl-BE, nl_NL: nl-NL, nn_NO: nn-NO, no_NO: no-NO, or_IN: or-IN, pa_IN: pa-IN, pa_PK: pa-PK, pl_PL: pl-PL, ps_AF: ps-AF, pt_AO: pt-AO, pt_BR: pt-BR, pt_MZ: pt-MZ, pt_PT: pt-PT, qu_EC: qu-EC, ro_MD: ro-MD, ro_RO: ro-RO, ru_RU: ru-RU, ru_UA: ru-UA, ru_ee: ru-ee, ru_lt: ru-lt, ru_lv: ru-lv, si_LK: si-LK, sk_SK: sk-SK, sl_SI: sl-SI, sq_AL: sq-AL, sr_BA-SRP: sr-BA-SRP, sr_ME: sr-ME, sr_RS: sr-RS, st_ZA: st-ZA, sv_FI: sv-FI, sv_SE: sv-SE, sw_CD: sw-CD, sw_KE: sw-KE, sw_TZ: sw-TZ, sw_UG: sw-UG, ta_IN: ta-IN, ta_LK: ta-LK, te_IN: te-IN, tg_TJ: tg-TJ, th_TH: th-TH, tk_TM: tk-TM, tl_PH: tl-PH, tr_CY: tr-CY, tr_DE: tr-DE, tr_TR: tr-TR, uk_UA: uk-UA, ur_PK: ur-PK, uz_UZ: uz-UZ, vi_VN: vi-VN, wo_SN: wo-SN, yue_CN: yue-CN, zh_CN: zh-CN, zh_HK: zh-HK, zh_SG: zh-SG, zh_TW: zh-TW, zu_ZA: zu-ZA
[o:damus:p:damus-ios-staging:r:infopliststrings]
file_filter = damus/<lang>.lproj/InfoPlist.strings
source_file = damus/en-US.xcloc/Source Contents/damus/en-US.lproj/InfoPlist.strings
type = STRINGS_UTF8
minimum_perc = 0
resource_name = damus..en-US.lproj/InfoPlist.strings (translations)
[o:damus:p:damus-ios-staging:r:localizablestrings]
file_filter = damus/<lang>.lproj/Localizable.strings
source_file = damus/en-US.xcloc/Source Contents/damus/en-US.lproj/Localizable.strings
type = STRINGS_UTF8
minimum_perc = 0
resource_name = damus..en-US.lproj/Localizable.strings (translations)
[o:damus:p:damus-ios-staging:r:localizablestringsdict]
file_filter = damus/<lang>.lproj/Localizable.stringsdict
source_file = damus/en-US.xcloc/Source Contents/damus/en-US.lproj/Localizable.stringsdict
type = STRINGSDICT
minimum_perc = 0
resource_name = damus..en-US.lproj/Localizable.stringsdict (translations)

View File

@@ -20,7 +20,7 @@ struct TranslateView: View {
@State var translated_artifacts: NoteArtifacts? = nil
var TranslateButton: some View {
Button(NSLocalizedString("Translate Note into your language", comment: "Button to translate note from different language.")) {
Button(NSLocalizedString("Translate Note", comment: "Button to translate note from different language.")) {
show_translated_note = true
}
.translate_button_style()

View File

@@ -94,6 +94,14 @@ enum Block {
return nil
}
var is_note_mention: Bool {
guard case .mention(let mention) = self else {
return false
}
return mention.type == .event
}
var is_mention: Bool {
if case .mention = self {
return true

View File

@@ -40,7 +40,7 @@ struct ShareAction: View {
HStack(alignment: .top, spacing: 25) {
ShareActionButton(img: "link", text: NSLocalizedString("Copy Link TempChange", comment: "Button to copy link to note"), col: col) {
ShareActionButton(img: "link", text: NSLocalizedString("Copy Link", comment: "Button to copy link to note"), col: col) {
show_share_action = false
UIPasteboard.general.string = "https://damus.io/" + (bech32_note_id(event.id) ?? event.id)
}

View File

@@ -6,6 +6,7 @@
//
import SwiftUI
import Combine
let PPM_SIZE: CGFloat = 80.0
let BANNER_HEIGHT: CGFloat = 150.0;
@@ -196,6 +197,9 @@ struct EditMetadataView: View {
TextField(NSLocalizedString("jb55@jb55.com", comment: "Placeholder example text for identifier used for NIP-05 verification."), text: $nip05)
.autocorrectionDisabled(true)
.textInputAutocapitalization(.never)
.onReceive(Just(nip05)) { newValue in
self.nip05 = newValue.trimmingCharacters(in: .whitespaces)
}
}, header: {
Text("NIP-05 Verification", comment: "Label for NIP-05 Verification section of user profile form.")
}, footer: {

View File

@@ -240,6 +240,7 @@ struct NoteArtifacts {
func render_note_content(ev: NostrEvent, profiles: Profiles, privkey: String?) -> NoteArtifacts {
let blocks = ev.blocks(privkey)
return render_blocks(blocks: blocks, profiles: profiles, privkey: privkey)
}
@@ -247,9 +248,17 @@ func render_blocks(blocks: [Block], profiles: Profiles, privkey: String?) -> Not
var invoices: [Invoice] = []
var img_urls: [URL] = []
var link_urls: [URL] = []
let one_note_ref = blocks
.filter({ $0.is_note_mention })
.count == 1
let txt: AttributedString = blocks.reduce("") { str, block in
switch block {
case .mention(let m):
if m.type == .event && one_note_ref {
return str
}
return str + mention_str(m, profiles: profiles)
case .text(let txt):
return str + AttributedString(stringLiteral: txt)

View File

@@ -42,10 +42,10 @@ struct InnerTimelineView: View {
nav_target = ev.inner_event ?? ev
navigating = true
}
.padding(.top, 10)
.padding(.top, 7)
Divider()
.padding([.top], 10)
.padding([.top], 7)
}
}
}

View File

@@ -336,9 +336,9 @@ Sentence composed of 2 variables to describe how many people are following a use
<target>Copy LNURL</target>
<note>Context menu option for copying a user's Lightning URL.</note>
</trans-unit>
<trans-unit id="Copy Link TempChange" xml:space="preserve">
<source>Copy Link TempChange</source>
<target>Copy Link TempChange</target>
<trans-unit id="Copy Link" xml:space="preserve">
<source>Copy Link</source>
<target>Copy Link</target>
<note>Button to copy link to note</note>
</trans-unit>
<trans-unit id="Copy Note ID" xml:space="preserve">
@@ -1170,9 +1170,9 @@ Picker option to indicate that a zap should be sent privately and not identify t
<target>Thread</target>
<note>Navigation bar title for note thread.</note>
</trans-unit>
<trans-unit id="Translate Note into your language" xml:space="preserve">
<source>Translate Note into your language</source>
<target>Translate Note into your language</target>
<trans-unit id="Translate Note" xml:space="preserve">
<source>Translate Note</source>
<target>Translate Note</target>
<note>Button to translate note from different language.</note>
</trans-unit>
<trans-unit id="Translated from (lang)" xml:space="preserve">