Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import android.view.LayoutInflater
import android.view.WindowManager
import android.widget.FrameLayout
import androidx.lifecycle.lifecycleScope
import com.duckduckgo.app.browser.R
import com.duckduckgo.app.browser.databinding.BottomSheetAddBookmarkBinding
import com.duckduckgo.common.utils.ConflatedJob
import com.duckduckgo.savedsites.api.models.BookmarkFolder
import com.google.android.material.R
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.shape.CornerFamily
Expand All @@ -38,6 +38,7 @@ import com.google.android.material.shape.ShapeAppearanceModel
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import com.duckduckgo.mobile.android.R as CommonR
import com.google.android.material.R as MaterialR

@SuppressLint("NoBottomSheetDialog")
class BookmarkAddedConfirmationDialog(
Expand Down Expand Up @@ -96,7 +97,8 @@ class BookmarkAddedConfirmationDialog(

private fun getBookmarksBottomSheetTitle(context: Context, bookmarkFolder: BookmarkFolder?): SpannableString {
val folderName = bookmarkFolder?.name ?: ""
val fullText = context.getString(com.duckduckgo.saved.sites.impl.R.string.bookmarkAddedInBookmarks, folderName)

val fullText = context.getString(R.string.addBookmarkDialogBookmarkAddedInFolder, folderName)
val spannableString = SpannableString(fullText)

val boldStart = fullText.indexOf(folderName)
Expand All @@ -114,7 +116,7 @@ class BookmarkAddedConfirmationDialog(
private fun roundCornersAlways(dialog: BottomSheetDialog) {
dialog.setOnShowListener { dialogInterface ->
val bottomSheetDialog = dialogInterface as BottomSheetDialog
val bottomSheet = bottomSheetDialog.findViewById<FrameLayout>(R.id.design_bottom_sheet)
val bottomSheet = bottomSheetDialog.findViewById<FrameLayout>(MaterialR.id.design_bottom_sheet)
bottomSheet?.background = MaterialShapeDrawable(
ShapeAppearanceModel.builder().apply {
setTopLeftCorner(CornerFamily.ROUNDED, context.resources.getDimension(CommonR.dimen.dialogBorderRadius))
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/bottom_sheet_add_bookmark.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:leadingIconBackground="circular"
app:primaryText="@string/addToFavorites"
app:primaryText="@string/addBookmarkDialogAddToFavorites"
app:leadingIcon="@drawable/ic_favorite_24" />

<com.duckduckgo.common.ui.view.DaxSwitch
Expand All @@ -62,6 +62,6 @@
android:layout_height="wrap_content"
app:leadingIcon="@drawable/ic_edit_24"
app:leadingIconBackground="circular"
app:primaryText="@string/editBookmark" />
app:primaryText="@string/addBookmarkDialogEditBookmark" />

</LinearLayout>
23 changes: 23 additions & 0 deletions app/src/main/res/values-bg/strings-saved-sites.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2025 DuckDuckGo
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<!-- smartling.entity_escaping = false -->
<!-- smartling.instruction_attributes = instruction -->
<resources>
<string name="addBookmarkDialogBookmarkAddedInFolder" instruction="%1$s is the folder name">Отметката е добавена в %1$s</string>
<string name="addBookmarkDialogAddToFavorites">Добавяне към любими</string>
<string name="addBookmarkDialogEditBookmark">Редактиране на отметка</string>
</resources>
23 changes: 23 additions & 0 deletions app/src/main/res/values-cs/strings-saved-sites.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2025 DuckDuckGo
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<!-- smartling.entity_escaping = false -->
<!-- smartling.instruction_attributes = instruction -->
<resources>
<string name="addBookmarkDialogBookmarkAddedInFolder" instruction="%1$s is the folder name">Záložku jsme přidali do složky %1$s</string>
<string name="addBookmarkDialogAddToFavorites">Přidat do oblíbených</string>
<string name="addBookmarkDialogEditBookmark">Upravit záložku</string>
</resources>
23 changes: 23 additions & 0 deletions app/src/main/res/values-da/strings-saved-sites.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2025 DuckDuckGo
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<!-- smartling.entity_escaping = false -->
<!-- smartling.instruction_attributes = instruction -->
<resources>
<string name="addBookmarkDialogBookmarkAddedInFolder" instruction="%1$s is the folder name">Bogmærke tilføjet i %1$s.</string>
<string name="addBookmarkDialogAddToFavorites">Tilføj til favoritter</string>
<string name="addBookmarkDialogEditBookmark">Rediger bogmærke</string>
</resources>
23 changes: 23 additions & 0 deletions app/src/main/res/values-de/strings-saved-sites.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2025 DuckDuckGo
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<!-- smartling.entity_escaping = false -->
<!-- smartling.instruction_attributes = instruction -->
<resources>
<string name="addBookmarkDialogBookmarkAddedInFolder" instruction="%1$s is the folder name">Lesezeichen zu %1$s hinzugefügt</string>
<string name="addBookmarkDialogAddToFavorites">Zu Favoriten hinzufügen</string>
<string name="addBookmarkDialogEditBookmark">Lesezeichen bearbeiten</string>
</resources>
23 changes: 23 additions & 0 deletions app/src/main/res/values-el/strings-saved-sites.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2025 DuckDuckGo
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<!-- smartling.entity_escaping = false -->
<!-- smartling.instruction_attributes = instruction -->
<resources>
<string name="addBookmarkDialogBookmarkAddedInFolder" instruction="%1$s is the folder name">Ο σελιδοδείκτης προστέθηκε στο %1$s</string>
<string name="addBookmarkDialogAddToFavorites">Προσθήκη στα Αγαπημένα</string>
<string name="addBookmarkDialogEditBookmark">Επεξεργασία σελιδοδείκτη</string>
</resources>
23 changes: 23 additions & 0 deletions app/src/main/res/values-es/strings-saved-sites.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2025 DuckDuckGo
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<!-- smartling.entity_escaping = false -->
<!-- smartling.instruction_attributes = instruction -->
<resources>
<string name="addBookmarkDialogBookmarkAddedInFolder" instruction="%1$s is the folder name">Marcador añadido en %1$s</string>
<string name="addBookmarkDialogAddToFavorites">Añadir a favoritos</string>
<string name="addBookmarkDialogEditBookmark">Editar marcador</string>
</resources>
23 changes: 23 additions & 0 deletions app/src/main/res/values-et/strings-saved-sites.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2025 DuckDuckGo
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<!-- smartling.entity_escaping = false -->
<!-- smartling.instruction_attributes = instruction -->
<resources>
<string name="addBookmarkDialogBookmarkAddedInFolder" instruction="%1$s is the folder name">Järjehoidja lisati kausta %1$s</string>
<string name="addBookmarkDialogAddToFavorites">Lisa lemmikutesse</string>
<string name="addBookmarkDialogEditBookmark">Redigeeri järjehoidjat</string>
</resources>
23 changes: 23 additions & 0 deletions app/src/main/res/values-fi/strings-saved-sites.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2025 DuckDuckGo
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<!-- smartling.entity_escaping = false -->
<!-- smartling.instruction_attributes = instruction -->
<resources>
<string name="addBookmarkDialogBookmarkAddedInFolder" instruction="%1$s is the folder name">Kirjanmerkki lisätty kansioon %1$s</string>
<string name="addBookmarkDialogAddToFavorites">Lisää suosikkeihin</string>
<string name="addBookmarkDialogEditBookmark">Muokkaa kirjanmerkkiä</string>
</resources>
23 changes: 23 additions & 0 deletions app/src/main/res/values-fr/strings-saved-sites.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2025 DuckDuckGo
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<!-- smartling.entity_escaping = false -->
<!-- smartling.instruction_attributes = instruction -->
<resources>
<string name="addBookmarkDialogBookmarkAddedInFolder" instruction="%1$s is the folder name">Favori ajouté dans %1$s</string>
<string name="addBookmarkDialogAddToFavorites">Ajouter aux favoris</string>
<string name="addBookmarkDialogEditBookmark">Modifier le signet</string>
</resources>
23 changes: 23 additions & 0 deletions app/src/main/res/values-hr/strings-saved-sites.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2025 DuckDuckGo
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<!-- smartling.entity_escaping = false -->
<!-- smartling.instruction_attributes = instruction -->
<resources>
<string name="addBookmarkDialogBookmarkAddedInFolder" instruction="%1$s is the folder name">Knjižna oznaka dodana u %1$s</string>
<string name="addBookmarkDialogAddToFavorites">Dodaj u Omiljeno</string>
<string name="addBookmarkDialogEditBookmark">Uredi knjižnu oznaku</string>
</resources>
23 changes: 23 additions & 0 deletions app/src/main/res/values-hu/strings-saved-sites.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2025 DuckDuckGo
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<!-- smartling.entity_escaping = false -->
<!-- smartling.instruction_attributes = instruction -->
<resources>
<string name="addBookmarkDialogBookmarkAddedInFolder" instruction="%1$s is the folder name">Könyvjelző hozzáadva a(z) %1$s mappához</string>
<string name="addBookmarkDialogAddToFavorites">Hozzáadás a kedvencekhez</string>
<string name="addBookmarkDialogEditBookmark">Könyvjelző szerkesztése</string>
</resources>
23 changes: 23 additions & 0 deletions app/src/main/res/values-it/strings-saved-sites.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2025 DuckDuckGo
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<!-- smartling.entity_escaping = false -->
<!-- smartling.instruction_attributes = instruction -->
<resources>
<string name="addBookmarkDialogBookmarkAddedInFolder" instruction="%1$s is the folder name">Segnalibro aggiunto in %1$s</string>
<string name="addBookmarkDialogAddToFavorites">Aggiungi ai Preferiti</string>
<string name="addBookmarkDialogEditBookmark">Modifica segnalibro</string>
</resources>
23 changes: 23 additions & 0 deletions app/src/main/res/values-lt/strings-saved-sites.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2025 DuckDuckGo
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<!-- smartling.entity_escaping = false -->
<!-- smartling.instruction_attributes = instruction -->
<resources>
<string name="addBookmarkDialogBookmarkAddedInFolder" instruction="%1$s is the folder name">Žymė įtraukta į %1$s</string>
<string name="addBookmarkDialogAddToFavorites">Pridėti prie mėgstamų</string>
<string name="addBookmarkDialogEditBookmark">Redaguoti žymę</string>
</resources>
Loading
Loading