Skip to content

Commit f06d284

Browse files
authored
Move strings to correct module for bookmark added dialog (#7127)
Task/Issue URL: https://app.asana.com/1/137249556945/project/1208273769335188/task/1211950205463651?focus=true ### Description Moves the strings used in the "bookmark added" dialog to the correct module (`app`). Before, the strings lived inside the `saved-sites-impl` module but the `app` was reaching into that `impl` module for its strings. ### Steps to test this PR - qa optional
1 parent 475d99c commit f06d284

File tree

52 files changed

+581
-30
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+581
-30
lines changed

app/src/main/java/com/duckduckgo/app/bookmarks/dialog/BookmarkAddedConfirmationDialog.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ import android.view.LayoutInflater
2626
import android.view.WindowManager
2727
import android.widget.FrameLayout
2828
import androidx.lifecycle.lifecycleScope
29+
import com.duckduckgo.app.browser.R
2930
import com.duckduckgo.app.browser.databinding.BottomSheetAddBookmarkBinding
3031
import com.duckduckgo.common.utils.ConflatedJob
3132
import com.duckduckgo.savedsites.api.models.BookmarkFolder
32-
import com.google.android.material.R
3333
import com.google.android.material.bottomsheet.BottomSheetBehavior
3434
import com.google.android.material.bottomsheet.BottomSheetDialog
3535
import com.google.android.material.shape.CornerFamily
@@ -38,6 +38,7 @@ import com.google.android.material.shape.ShapeAppearanceModel
3838
import kotlinx.coroutines.delay
3939
import kotlinx.coroutines.launch
4040
import com.duckduckgo.mobile.android.R as CommonR
41+
import com.google.android.material.R as MaterialR
4142

4243
@SuppressLint("NoBottomSheetDialog")
4344
class BookmarkAddedConfirmationDialog(
@@ -96,7 +97,8 @@ class BookmarkAddedConfirmationDialog(
9697

9798
private fun getBookmarksBottomSheetTitle(context: Context, bookmarkFolder: BookmarkFolder?): SpannableString {
9899
val folderName = bookmarkFolder?.name ?: ""
99-
val fullText = context.getString(com.duckduckgo.saved.sites.impl.R.string.bookmarkAddedInBookmarks, folderName)
100+
101+
val fullText = context.getString(R.string.addBookmarkDialogBookmarkAddedInFolder, folderName)
100102
val spannableString = SpannableString(fullText)
101103

102104
val boldStart = fullText.indexOf(folderName)
@@ -114,7 +116,7 @@ class BookmarkAddedConfirmationDialog(
114116
private fun roundCornersAlways(dialog: BottomSheetDialog) {
115117
dialog.setOnShowListener { dialogInterface ->
116118
val bottomSheetDialog = dialogInterface as BottomSheetDialog
117-
val bottomSheet = bottomSheetDialog.findViewById<FrameLayout>(R.id.design_bottom_sheet)
119+
val bottomSheet = bottomSheetDialog.findViewById<FrameLayout>(MaterialR.id.design_bottom_sheet)
118120
bottomSheet?.background = MaterialShapeDrawable(
119121
ShapeAppearanceModel.builder().apply {
120122
setTopLeftCorner(CornerFamily.ROUNDED, context.resources.getDimension(CommonR.dimen.dialogBorderRadius))

app/src/main/res/layout/bottom_sheet_add_bookmark.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
android:layout_width="match_parent"
4545
android:layout_height="wrap_content"
4646
app:leadingIconBackground="circular"
47-
app:primaryText="@string/addToFavorites"
47+
app:primaryText="@string/addBookmarkDialogAddToFavorites"
4848
app:leadingIcon="@drawable/ic_favorite_24" />
4949

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

6767
</LinearLayout>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright (c) 2025 DuckDuckGo
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
-->
17+
<!-- smartling.entity_escaping = false -->
18+
<!-- smartling.instruction_attributes = instruction -->
19+
<resources>
20+
<string name="addBookmarkDialogBookmarkAddedInFolder" instruction="%1$s is the folder name">Отметката е добавена в %1$s</string>
21+
<string name="addBookmarkDialogAddToFavorites">Добавяне към любими</string>
22+
<string name="addBookmarkDialogEditBookmark">Редактиране на отметка</string>
23+
</resources>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright (c) 2025 DuckDuckGo
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
-->
17+
<!-- smartling.entity_escaping = false -->
18+
<!-- smartling.instruction_attributes = instruction -->
19+
<resources>
20+
<string name="addBookmarkDialogBookmarkAddedInFolder" instruction="%1$s is the folder name">Záložku jsme přidali do složky %1$s</string>
21+
<string name="addBookmarkDialogAddToFavorites">Přidat do oblíbených</string>
22+
<string name="addBookmarkDialogEditBookmark">Upravit záložku</string>
23+
</resources>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright (c) 2025 DuckDuckGo
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
-->
17+
<!-- smartling.entity_escaping = false -->
18+
<!-- smartling.instruction_attributes = instruction -->
19+
<resources>
20+
<string name="addBookmarkDialogBookmarkAddedInFolder" instruction="%1$s is the folder name">Bogmærke tilføjet i %1$s.</string>
21+
<string name="addBookmarkDialogAddToFavorites">Tilføj til favoritter</string>
22+
<string name="addBookmarkDialogEditBookmark">Rediger bogmærke</string>
23+
</resources>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright (c) 2025 DuckDuckGo
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
-->
17+
<!-- smartling.entity_escaping = false -->
18+
<!-- smartling.instruction_attributes = instruction -->
19+
<resources>
20+
<string name="addBookmarkDialogBookmarkAddedInFolder" instruction="%1$s is the folder name">Lesezeichen zu %1$s hinzugefügt</string>
21+
<string name="addBookmarkDialogAddToFavorites">Zu Favoriten hinzufügen</string>
22+
<string name="addBookmarkDialogEditBookmark">Lesezeichen bearbeiten</string>
23+
</resources>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright (c) 2025 DuckDuckGo
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
-->
17+
<!-- smartling.entity_escaping = false -->
18+
<!-- smartling.instruction_attributes = instruction -->
19+
<resources>
20+
<string name="addBookmarkDialogBookmarkAddedInFolder" instruction="%1$s is the folder name">Ο σελιδοδείκτης προστέθηκε στο %1$s</string>
21+
<string name="addBookmarkDialogAddToFavorites">Προσθήκη στα Αγαπημένα</string>
22+
<string name="addBookmarkDialogEditBookmark">Επεξεργασία σελιδοδείκτη</string>
23+
</resources>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright (c) 2025 DuckDuckGo
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
-->
17+
<!-- smartling.entity_escaping = false -->
18+
<!-- smartling.instruction_attributes = instruction -->
19+
<resources>
20+
<string name="addBookmarkDialogBookmarkAddedInFolder" instruction="%1$s is the folder name">Marcador añadido en %1$s</string>
21+
<string name="addBookmarkDialogAddToFavorites">Añadir a favoritos</string>
22+
<string name="addBookmarkDialogEditBookmark">Editar marcador</string>
23+
</resources>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright (c) 2025 DuckDuckGo
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
-->
17+
<!-- smartling.entity_escaping = false -->
18+
<!-- smartling.instruction_attributes = instruction -->
19+
<resources>
20+
<string name="addBookmarkDialogBookmarkAddedInFolder" instruction="%1$s is the folder name">Järjehoidja lisati kausta %1$s</string>
21+
<string name="addBookmarkDialogAddToFavorites">Lisa lemmikutesse</string>
22+
<string name="addBookmarkDialogEditBookmark">Redigeeri järjehoidjat</string>
23+
</resources>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright (c) 2025 DuckDuckGo
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
-->
17+
<!-- smartling.entity_escaping = false -->
18+
<!-- smartling.instruction_attributes = instruction -->
19+
<resources>
20+
<string name="addBookmarkDialogBookmarkAddedInFolder" instruction="%1$s is the folder name">Kirjanmerkki lisätty kansioon %1$s</string>
21+
<string name="addBookmarkDialogAddToFavorites">Lisää suosikkeihin</string>
22+
<string name="addBookmarkDialogEditBookmark">Muokkaa kirjanmerkkiä</string>
23+
</resources>

0 commit comments

Comments
 (0)