Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Delete bunch of unused strings - WIP #5352

Merged
merged 5 commits into from
Feb 25, 2022
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
9 changes: 0 additions & 9 deletions vector/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,9 @@ android {
versionName "${versionMajor}.${versionMinor}.${versionPatch}-sonar"

buildConfigField "String", "GIT_REVISION", "\"${gitRevision()}\""
resValue "string", "git_revision", "\"${gitRevision()}\""

buildConfigField "String", "GIT_REVISION_DATE", "\"${gitRevisionDate()}\""
resValue "string", "git_revision_date", "\"${gitRevisionDate()}\""

buildConfigField "String", "GIT_BRANCH_NAME", "\"${gitBranchName()}\""
resValue "string", "git_branch_name", "\"${gitBranchName()}\""

buildConfigField "String", "BUILD_NUMBER", "\"${buildNumber}\""
resValue "string", "build_number", "\"${buildNumber}\""

buildConfigField "im.vector.app.features.VectorFeatures.OnboardingVariant", "ONBOARDING_VARIANT", "im.vector.app.features.VectorFeatures.OnboardingVariant.FTUE_AUTH"

Expand Down Expand Up @@ -233,7 +226,6 @@ android {
applicationIdSuffix ".debug"
resValue "string", "app_name", "Element dbg"

resValue "bool", "debug_mode", "true"
buildConfigField "boolean", "LOW_PRIVACY_LOG_ENABLE", "false"
// Set to true if you want to enable strict mode in debug
buildConfigField "boolean", "ENABLE_STRICT_MODE_LOGS", "false"
Expand All @@ -244,7 +236,6 @@ android {
release {
resValue "string", "app_name", "Element"

resValue "bool", "debug_mode", "false"
buildConfigField "boolean", "LOW_PRIVACY_LOG_ENABLE", "false"
buildConfigField "boolean", "ENABLE_STRICT_MODE_LOGS", "false"

Expand Down
33 changes: 33 additions & 0 deletions vector/lint.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,39 @@
<issue id="IconExpectedSize" severity="error" />
<issue id="LocaleFolder" severity="error" />

<!-- String resource has to be used, for the rest we can ignore for now
TODO: stop ignoring warning at all those locations -->
<issue id="UnusedResources" severity="error">
<ignore path="**/build.gradle" />
<ignore path="**/anim/**" />
<ignore path="**/color/**" />
<ignore path="**/drawable*/**" />
<ignore path="**/layout/**" />
<ignore path="**/menu/**" />
<ignore path="**/raw/**" />
<ignore path="**/values/dimens.xml" />
<ignore path="**/values/colors.xml" />
<ignore path="**/values/palette.xml" />
<ignore path="**/values/palette_mobile.xml" />
<ignore path="**/values/donottranslate.xml" />
<ignore path="**/values/strings_login_v2.xml" />
<ignore path="**/library/ui-styles/src/main/res/values/**" />
<ignore path="**/xml/**" />

<!-- Following resources are for F-Droid variant only, so ignore for GPlay -->
<ignore regexp="settings_troubleshoot_test_service_boot_*" />
<ignore regexp="settings_troubleshoot_test_bg_restricted_*" />
<ignore regexp="settings_troubleshoot_test_battery_*" />

<!-- Following resources are for GPlay variant only, so ignore for F-Droid -->
<ignore regexp="settings_troubleshoot_test_play_services_" />
<ignore regexp="settings_troubleshoot_test_push_loop_" />
<ignore regexp="settings_troubleshoot_test_token_registration_" />
<ignore regexp="settings_troubleshoot_test_fcm_" />
<ignore regexp="no_valid_google_play_services_apk" />
<ignore regexp="sas_error_unknown" />
</issue>

<!-- UX -->
<issue id="ButtonOrder" severity="error" />
<issue id="TextFields" severity="error" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ class BugReporter @Inject constructor(
.addFormDataPart("can_contact", canContact.toString())
.addFormDataPart("device_id", deviceId)
.addFormDataPart("version", versionProvider.getVersion(longFormat = true, useBuildNumber = false))
.addFormDataPart("branch_name", context.getString(R.string.git_branch_name))
.addFormDataPart("branch_name", BuildConfig.GIT_BRANCH_NAME)
.addFormDataPart("matrix_sdk_version", Matrix.getSdkVersion())
.addFormDataPart("olm_version", olmVersion)
.addFormDataPart("device", Build.MODEL.trim())
Expand All @@ -289,7 +289,7 @@ class BugReporter @Inject constructor(
}
}

val buildNumber = context.getString(R.string.build_number)
val buildNumber = BuildConfig.BUILD_NUMBER
if (buildNumber.isNotEmpty() && buildNumber != "0") {
builder.addFormDataPart("build_number", buildNumber)
}
Expand Down Expand Up @@ -329,7 +329,7 @@ class BugReporter @Inject constructor(
// add some github labels
builder.addFormDataPart("label", BuildConfig.VERSION_NAME)
builder.addFormDataPart("label", BuildConfig.FLAVOR_DESCRIPTION)
builder.addFormDataPart("label", context.getString(R.string.git_branch_name))
builder.addFormDataPart("label", BuildConfig.GIT_BRANCH_NAME)

// Special for Element
builder.addFormDataPart("label", "[Element]")
Expand Down
2 changes: 1 addition & 1 deletion vector/src/main/res/layout/composer_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
android:layout_height="wrap_content"
android:nextFocusLeft="@id/composerEditText"
android:nextFocusUp="@id/composerEditText"
tools:hint="@string/room_message_placeholder_not_encrypted"
tools:hint="@string/room_message_placeholder"
tools:ignore="MissingConstraints" />

<ImageButton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
style="@style/Widget.Vector.EditText.Composer"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="@string/room_message_placeholder_not_encrypted"
android:hint="@string/room_message_placeholder"
android:nextFocusLeft="@id/composerEditText"
android:nextFocusUp="@id/composerEditText"
app:layout_constraintBottom_toBottomOf="parent"
Expand Down

This file was deleted.

104 changes: 0 additions & 104 deletions vector/src/main/res/layout/fragment_user_directory.xml

This file was deleted.

Loading